mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-15 07:48:15 +00:00
Added functions to customize internal matrix
Internal modelview and projection matrices can be replaced before drawing.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user