casanovaC4's picture

Permanent Rotation Help . . . . ..

Hy,

I am using OpenTK in C# to create my application.
I want to rotate the 3D objects not by rotating the modelview matrix but by manipulating the points of the 3D objects.
I cant figure out how to.
The Matrix4 Rotate function in OpenTK.Math is not working for me, whereas GL.Rotate rotates the current matrix.
Tell me how i can rotate the coords of the 3D object itself, what function or class should i use in OpenTK, does OpenTK even provides any such functionality?
Will be greatly thankful.

Regards.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

The matrices are identical. What changes is the order of multiplication:

myCurrentModelViewMatrix *= Matrix4.Rotate(...); // which is identical to:
myCurrentModelViewMatrix = myCurrentModelViewMatrix * Matrix4.Rotate(...);

vs

myCurrentModelViewMatrix = Matrix4.Rotate(...) * myCurrentModelViewMatrix;