Add some missing "pub" qualifiers
This commit is contained in:
parent
76a7299fb9
commit
3244181a08
|
|
@ -1,22 +1,20 @@
|
||||||
use nalgebra::{RealField, Vector3};
|
use nalgebra::{RealField, Vector3};
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
struct Ray<T: RealField> {
|
pub struct Ray<T: RealField> {
|
||||||
origin: Vector3<T>,
|
origin: Vector3<T>,
|
||||||
direction: Vector3<T>,
|
direction: Vector3<T>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: RealField> Ray<T> {
|
impl<T: RealField> Ray<T> {
|
||||||
fn new(origin: Vector3<T>, direction: Vector3<T>) -> Ray<T> {
|
pub fn new(origin: Vector3<T>, direction: Vector3<T>) -> Ray<T> {
|
||||||
Ray {
|
Ray {
|
||||||
origin,
|
origin,
|
||||||
direction: direction.normalize(),
|
direction: direction.normalize(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
impl<T: RealField> Ray<T> {
|
pub fn point_at(&self, t: T) -> Vector3<T> {
|
||||||
fn point_at(&self, t: T) -> Vector3<T> {
|
|
||||||
return self.origin + self.direction * t;
|
return self.origin + self.direction * t;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue