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:
parent
8d2d0d11bd
commit
03bfe9b7a7
3 changed files with 8 additions and 15 deletions
|
@ -31,10 +31,6 @@ pub use self::point::Point;
|
|||
pub use self::point::{Point2, AsPoint2};
|
||||
pub use self::point::{Point3, AsPoint3};
|
||||
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 quat;
|
||||
|
@ -43,7 +39,6 @@ pub mod vec;
|
|||
pub mod plane;
|
||||
pub mod point;
|
||||
pub mod ray;
|
||||
pub mod rotation;
|
||||
|
||||
pub trait Dimensioned<T,Slice> {
|
||||
pub fn index<'a>(&'a self, i: uint) -> &'a T;
|
||||
|
|
|
@ -28,12 +28,7 @@
|
|||
|
||||
use std::cast;
|
||||
|
||||
use math::{Dimensioned, SwapComponents};
|
||||
use math::{Mat, NumMat, FloatMat};
|
||||
use math::{Mat3, ToMat3};
|
||||
use math::{Mat4, ToMat4};
|
||||
use math::{Quat, ToQuat};
|
||||
use math::{Vec3, ToVec3, AsVec3};
|
||||
use math::*;
|
||||
|
||||
use math::{Point3, Ray3};
|
||||
|
||||
|
@ -327,10 +322,8 @@ impl<T:Float> ToMat4<T> for AxisAngle<T> {
|
|||
|
||||
#[cfg(test)]
|
||||
mod axis_angle_tests {
|
||||
use math::mat::*;
|
||||
use math::quat::*;
|
||||
use math::rotation::*;
|
||||
use math::vec::*;
|
||||
use math::*;
|
||||
use transform::*;
|
||||
|
||||
#[test]
|
||||
fn test_to_quat() {
|
|
@ -14,10 +14,15 @@
|
|||
// limitations under the License.
|
||||
|
||||
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};
|
||||
|
||||
pub mod projection;
|
||||
pub mod rotation;
|
||||
|
||||
pub trait Transform<T> {}
|
||||
|
||||
|
|
Loading…
Reference in a new issue