Move rotation module into transform module

This decouples these types from the more general math types. It also makes more sense, because rotations are indeed a type of transformation.
This commit is contained in:
Brendan Zabarauskas 2013-07-16 09:23:57 +10:00
parent 8d2d0d11bd
commit 03bfe9b7a7
3 changed files with 8 additions and 15 deletions

View file

@ -31,10 +31,6 @@ pub use self::point::Point;
pub use self::point::{Point2, AsPoint2}; pub use self::point::{Point2, AsPoint2};
pub use self::point::{Point3, AsPoint3}; pub use self::point::{Point3, AsPoint3};
pub use self::ray::{Ray2, Ray3}; pub use self::ray::{Ray2, Ray3};
pub use self::rotation::Rotation;
pub use self::rotation::{Euler, ToEuler};
pub use self::rotation::{AxisAngle, ToAxisAngle};
pub use self::rotation::{AngleX, AngleY, AngleZ};
pub mod mat; pub mod mat;
pub mod quat; pub mod quat;
@ -43,7 +39,6 @@ pub mod vec;
pub mod plane; pub mod plane;
pub mod point; pub mod point;
pub mod ray; pub mod ray;
pub mod rotation;
pub trait Dimensioned<T,Slice> { pub trait Dimensioned<T,Slice> {
pub fn index<'a>(&'a self, i: uint) -> &'a T; pub fn index<'a>(&'a self, i: uint) -> &'a T;

View file

@ -28,12 +28,7 @@
use std::cast; use std::cast;
use math::{Dimensioned, SwapComponents}; use math::*;
use math::{Mat, NumMat, FloatMat};
use math::{Mat3, ToMat3};
use math::{Mat4, ToMat4};
use math::{Quat, ToQuat};
use math::{Vec3, ToVec3, AsVec3};
use math::{Point3, Ray3}; use math::{Point3, Ray3};
@ -327,10 +322,8 @@ impl<T:Float> ToMat4<T> for AxisAngle<T> {
#[cfg(test)] #[cfg(test)]
mod axis_angle_tests { mod axis_angle_tests {
use math::mat::*; use math::*;
use math::quat::*; use transform::*;
use math::rotation::*;
use math::vec::*;
#[test] #[test]
fn test_to_quat() { fn test_to_quat() {

View file

@ -14,10 +14,15 @@
// limitations under the License. // limitations under the License.
pub use self::projection::{Projection, Perspective, PerspectiveFOV, Ortho}; pub use self::projection::{Projection, Perspective, PerspectiveFOV, Ortho};
pub use self::rotation::Rotation;
pub use self::rotation::{Euler, ToEuler};
pub use self::rotation::{AxisAngle, ToAxisAngle};
pub use self::rotation::{AngleX, AngleY, AngleZ};
use math::{Vec3, Quat}; use math::{Vec3, Quat};
pub mod projection; pub mod projection;
pub mod rotation;
pub trait Transform<T> {} pub trait Transform<T> {}