]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - matrixlib.h
Another MSVC error fixed
[xonotic/darkplaces.git] / matrixlib.h
index e6d817ba1056f526b36e6eb0f1a78721849365a3..06890e294b9171ff6d18bfa3f7e4ca4677ec69b0 100644 (file)
@@ -12,6 +12,8 @@ typedef struct matrix4x4_s
 }
 matrix4x4_t;
 
+extern const matrix4x4_t identitymatrix;
+
 // functions for manipulating 4x4 matrices
 
 // copy a matrix4x4
@@ -85,4 +87,9 @@ void Matrix4x4_ConcatScale (matrix4x4_t *out, float x);
 // immediately applies a Scale3 to the matrix
 void Matrix4x4_ConcatScale3 (matrix4x4_t *out, float x, float y, float z);
 
+// extracts origin vector (translate) from matrix
+void Matrix4x4_OriginFromMatrix (const matrix4x4_t *in, float *out);
+// extracts scaling factor from matrix (only works for uniform scaling)
+float Matrix4x4_ScaleFromMatrix (const matrix4x4_t *in);
+
 #endif