Working on rotation math...

[models] Added DrawQuad()
This commit is contained in:
raysan5
2014-12-16 11:15:56 +01:00
parent cfa60ab7e6
commit 2e5f58255a
4 changed files with 52 additions and 15 deletions

View File

@ -559,8 +559,8 @@ Matrix MatrixFromAxisAngle2(Vector3 axis, float angle)
float axisX = axis.x, axisY = axis.y, axisZ = axis.y;
// Calculate angles
float cosres = (float)cos(-angle);
float sinres = (float)sin(-angle);
float cosres = (float)cos(angle);
float sinres = (float)sin(angle);
float t = 1.0f - cosres;
// Do the conversion math once
@ -672,6 +672,8 @@ Matrix MatrixTransform(Vector3 translation, Vector3 rotation, Vector3 scale)
{
Matrix result = MatrixIdentity();
// TODO: Review, use DEG2RAD here?
//Matrix mRotation = MatrixRotate(rotation.x*DEG2RAD, rotation.y*DEG2RAD, rotation.z*DEG2RAD);
Matrix mRotation = MatrixRotate(rotation.x, rotation.y, rotation.z);
Matrix mScale = MatrixScale(scale.x, scale.y, scale.z);
Matrix mTranslate = MatrixTranslate(translation.x, translation.y, translation.z);