Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualNercury

Posted 28 February 2013 - 07:58 AM

I meant, keeping such a matrix for every object, and calling glMatrixMult before drawing the object.
If you didn't do this, wouldn't you need to call a glTranslate and 3 glRotates for every object either way?

You are right, I would smile.png

To store each rotation, i'd imagine you mantain 3 angles for the object, which you modify according to user input, and from these you transform the unit vectors of the axes
( [1 0 0] , [0 1 0] , [0 0 1]) to get the transformed orientation.

Yeah, I am keeping euler for such objects like my camera, because they better map to mouse input (heading - X, pitch - Y).
I think most of my other objects will not need euler angles at all, so I am planning on storing only the quaternion which represents current rotation.

#1Nercury

Posted 28 February 2013 - 07:52 AM

I meant, keeping such a matrix for every object, and calling glMatrixMult before drawing the object.
If you didn't do this, wouldn't you need to call a glTranslate and 3 glRotates for every object either way?

You are right, I would smile.png

PARTNERS