_SIO2transform->dir and _SIO2transform->mat What effect???
4 posters
_SIO2transform->dir and _SIO2transform->mat What effect???
_SIO2transform->loc=====》An object's local coordinates
_SIO2transform->dir =====>?????
_SIO2transform->mat=====>?????
help me!
_SIO2transform->dir =====>?????
_SIO2transform->mat=====>?????
help me!
guola- Posts : 3
Join date : 2009-03-05
Re: _SIO2transform->dir and _SIO2transform->mat What effect???
dir stands for direction, I guess
zyzyandzyzy- Posts : 11
Join date : 2009-09-18
Re: _SIO2transform->dir and _SIO2transform->mat What effect???
_SIO2transform->mat --> (OGL) transformation matrix (for an object)
Check tutorial09 for instance to see how it is being used / updated / etc
Check tutorial09 for instance to see how it is being used / updated / etc
Francescu- Posts : 136
Join date : 2009-03-18
Re: _SIO2transform->dir and _SIO2transform->mat What effect???
mat is the 4x4 matrix that combines the location information from loc, rotation information from rot, and scale information from scl, so that OpenGL can position, orient, and scale the object by multiplying its vertices with one matrix only. So there are two different representations of the object's transformation: the combination of loc, rot, and scl on the one hand and mat on the other. If you manipulate the object, it is easier to manipulate the first representation, for example you might add a vector to loc in order to move the object from one position to the other. Sio2 uses the other representation for rendering, however. If you change loc but not mat, the object will still be shown at the old position. What you usually do is make all necessary changes to loc, rot, and scl and then update mat by calling sio2TransformBindMatrix(mySio2Object->_SIO2transform); This call will overwrite mat to represent the same transformation as loc, rot and scl.
As to "dir", I think this is an alternative to rot. Instead of specifying the orientation by a rotation relative to the object's initial orientation, you specify an absolute direction in world space. This is especially useful for lamps, cameras, and emitters. I think those are the only objects that use dir by default, it seems to me dir has no effect for normal objects.
As to "dir", I think this is an alternative to rot. Instead of specifying the orientation by a rotation relative to the object's initial orientation, you specify an absolute direction in world space. This is especially useful for lamps, cameras, and emitters. I think those are the only objects that use dir by default, it seems to me dir has no effect for normal objects.
Faikus- Posts : 23
Join date : 2009-05-26
Location : Berlin
Permissions in this forum:
You cannot reply to topics in this forum