aboutsummaryrefslogtreecommitdiff
path: root/src/raymath.h
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2016-06-02 20:23:09 +0200
committerraysan5 <raysan5@gmail.com>2016-06-02 20:23:09 +0200
commit0bc71d84f8ca2b8cbe48eae8769fb16958b98531 (patch)
tree0bf28414c77626e12235b857eb156e04b78e8640 /src/raymath.h
parent2168d8aa1af1e60467983099c5f72b7ac5ab5144 (diff)
downloadraylib-0bc71d84f8ca2b8cbe48eae8769fb16958b98531.tar.gz
raylib-0bc71d84f8ca2b8cbe48eae8769fb16958b98531.zip
Added functions to customize internal matrix
Internal modelview and projection matrices can be replaced before drawing.
Diffstat (limited to 'src/raymath.h')
-rw-r--r--src/raymath.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/raymath.h b/src/raymath.h
index 188bd610..4075a1a9 100644
--- a/src/raymath.h
+++ b/src/raymath.h
@@ -339,15 +339,14 @@ RMDEF Vector3 VectorReflect(Vector3 vector, Vector3 normal)
return result;
}
-// Transforms a Vector3 with a given Matrix
+// Transforms a Vector3 by a given Matrix
+// TODO: Review math (matrix transpose required?)
RMDEF void VectorTransform(Vector3 *v, Matrix mat)
{
float x = v->x;
float y = v->y;
float z = v->z;
- //MatrixTranspose(&mat);
-
v->x = mat.m0*x + mat.m4*y + mat.m8*z + mat.m12;
v->y = mat.m1*x + mat.m5*y + mat.m9*z + mat.m13;
v->z = mat.m2*x + mat.m6*y + mat.m10*z + mat.m14;