diff --git a/src/bounds/cylinder.rs b/src/bounds/cylinder.rs index a966fd6..9459784 100644 --- a/src/bounds/cylinder.rs +++ b/src/bounds/cylinder.rs @@ -14,4 +14,3 @@ // limitations under the License. //! Bounding cylinder - diff --git a/src/core/core.rs b/src/core/core.rs index 0aa9c42..8638cca 100644 --- a/src/core/core.rs +++ b/src/core/core.rs @@ -15,7 +15,9 @@ //! Core datatypes and conversion traits for 3D mathematics -pub use self::mat::{Mat2, ToMat2, Mat3, ToMat3, Mat4, ToMat4}; +pub use self::mat::{Mat2, ToMat2}; +pub use self::mat::{Mat3, ToMat3}; +pub use self::mat::{Mat4, ToMat4}; pub use self::quat::{Quat, ToQuat}; pub use self::vec::{Vec2, ToVec2, AsVec2}; pub use self::vec::{Vec3, ToVec3, AsVec3}; @@ -35,3 +37,10 @@ pub trait Dimensional { pub trait Swap { pub fn swap(&mut self, a: uint, b: uint); } + +pub trait ComponentWise { + pub fn component_add(&self) -> T; + pub fn component_mul(&self) -> T; + pub fn component_min(&self) -> T; + pub fn component_max(&self) -> T; +} diff --git a/src/geom/ray.rs b/src/geom/ray.rs index cf5ad12..b04d151 100644 --- a/src/geom/ray.rs +++ b/src/geom/ray.rs @@ -31,7 +31,6 @@ impl Ray2 { } } - #[deriving(Clone, Eq)] pub struct Ray3 { origin: Point3,