]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Math.hh
revamped scene drawing in preparation for octree
[chaz/yoink] / src / Moof / Math.hh
index c4e3484ebebc56b5bad7e05cee6c13f9ef657557..4e1cda8c1a25f3a4f57cffe616a56564040f45f6 100644 (file)
@@ -57,6 +57,27 @@ typedef cml::matrix< Scalar, cml::fixed<4,4>,
 typedef cml::quaternion< Scalar, cml::fixed<>, cml::vector_first,
                cml::positive_cross >                                   Quaternion;
 
+typedef cml::constants<Scalar>                                 Constants;
+
+
+inline Vector3& demoteVector(Vector3& left, const Vector4& right)
+{
+       left[0] = right[0];
+       left[1] = right[1];
+       left[2] = right[2];
+       return left;
+}
+
+inline Vector4& promoteVector(Vector4& left, const Vector3& right)
+{
+       left[0] = right[0];
+       left[1] = right[1];
+       left[2] = right[2];
+       left[3] = 1.0;
+       return left;
+}
+
+
 
 const Scalar EPSILON = 0.000001;
 
This page took 0.018369 seconds and 4 git commands to generate.