Get the geometric transformations of an object

Hi,

I don’t get to grab the geometric transformations of an object in a matrix.

I build the matrix M as follows:

M =
TranslationMatrix(pivotPointVector) *
RotationMatrix(rotationAngle.x, ‘x’) *
RotationMatrix(rotationAngle.y, ‘y’) *
RotationMatrix(rotationAngle.z, ‘z’) *
TranslationMatrix(-pivotPointVector) *

Questions:

  • The rotationAngles have their values in angles instead radians. Is it correct?

  • Is the matrix product in the correct order ?

  • Thanks

1: In OpenGL, tha angle is measured in degrees. Your function is not OpenGL’s fuctions, so can’t say whether they use radians or degrees, or anything else.

2: Correct order for what? You didn’t say what you want, so can’t say if it’s correct. Judging by the name of the variables used, I assume you are trying to rotate about a specific point other than the origin. Still, I can’t say if it’s correct, cause you haven’t described the functions. Order of multiplication for example; this is important to know, since AB is not equal to BA in the world of matrices.

Use quaternions instead of matrices for rotation… mutliplying two quaternions is faster then multiplying a matrix.
You can do SLERP with them etc

Originally posted by CopyCat:
Use quaternions instead of matrices for rotation… mutliplying two quaternions is faster then multiplying a matrix.
You can do SLERP with them etc

Quaternions are such overkill, same thing
can accomplished with regular matrix maths. and yes, you can Slerp with them to:
http://www.gamedev.net/reference/articles/article1199.asp

Originally posted by Informative:
http://www.gamedev.net/reference/articles/article1199.asp

I wish people would stop quoting this article. It’s flawed and misguided.

Quaternians are definately not overkill. The notion that they are longwinded is just bizarre. There do have their uses, in fact we need them quite alot for solving rotation based problems using maths. But just for keeping track of a objects rotation in a game or something it is neither here nor there which format you use.