RE: LDView 4.2 Released
2017-10-23, 4:43 (This post was last modified: 2017-10-23, 5:09 by Michael Horvath.)
2017-10-23, 4:43 (This post was last modified: 2017-10-23, 5:09 by Michael Horvath.)
(2017-10-23, 4:05)Travis Cobbs Wrote:(2017-10-22, 20:52)Michael Horvath Wrote: Will this create the correct type of matrix?
Code:TCFloat identity[16] =
{
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0
};
TCVector::calcRotationMatrix(cameraXRotate, cameraYRotate, identity);
I believe it will. That function rotates around X and then rotates around Y by the given amounts. Side note: you don't have to initialize the array of floats that you pass in; that's a purely out parameter.
One more question: does the calcRotationMatrix function rotate about the camera's axes or the universe's axes? It's supposed to rotate around the camera's x axis and the universe's y axis, according to the link I provided. Or does the function already take this into account?