]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Math.hh
fixed up video and texture handling
[chaz/yoink] / src / Moof / Math.hh
index 563746e380e5b38fc347f856b3cebd6b3b63c2bd..c4e3484ebebc56b5bad7e05cee6c13f9ef657557 100644 (file)
 #include <cmath>
 #include <cml/cml.h>
 
-
-namespace Mf {
+#include <Moof/OpenGL.hh>              // GLscalar
 
 
-// Basic types.
+namespace Mf {
 
-typedef float                          Scalar;                         ///< Scalar type.
 
-typedef cml::vector2f          Vector2;
-typedef cml::vector3f          Vector3;
-typedef cml::vector4f          Vector4;
+typedef GLscalar                                                               Scalar;
 
-typedef cml::matrix33f_c       Matrix3;
-typedef cml::matrix44f_c       Matrix4;
+typedef cml::vector< Scalar, cml::fixed<2> >   Vector2;
+typedef cml::vector< Scalar, cml::fixed<3> >   Vector3;
+typedef cml::vector< Scalar, cml::fixed<4> >   Vector4;
 
-typedef cml::quaternionf_p     Quaternion;
+typedef cml::matrix< Scalar, cml::fixed<3,3>,
+               cml::col_basis, cml::col_major >                Matrix3;
+typedef cml::matrix< Scalar, cml::fixed<4,4>,
+               cml::col_basis, cml::col_major >                Matrix4;
 
-typedef Vector4                                Color;
+typedef cml::quaternion< Scalar, cml::fixed<>, cml::vector_first,
+               cml::positive_cross >                                   Quaternion;
 
 
-const Scalar EPSILON = 0.000001f;
+const Scalar EPSILON = 0.000001;
 
 /**
  * Check the equality of scalars with a certain degree of error allowed.
This page took 0.017377 seconds and 4 git commands to generate.