FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

_SIO2transform->dir and _SIO2transform->mat What effect???

4 posters

Go down

_SIO2transform->dir and _SIO2transform->mat What effect??? Empty _SIO2transform->dir and _SIO2transform->mat What effect???

Post  guola Thu Sep 17, 2009 10:25 am

_SIO2transform->loc=====》An object's local coordinates

_SIO2transform->dir =====>?????
_SIO2transform->mat=====>?????

help me!

guola

Posts : 3
Join date : 2009-03-05

Back to top Go down

_SIO2transform->dir and _SIO2transform->mat What effect??? Empty Re: _SIO2transform->dir and _SIO2transform->mat What effect???

Post  zyzyandzyzy Fri Sep 18, 2009 12:22 am

dir stands for direction, I guess

zyzyandzyzy

Posts : 11
Join date : 2009-09-18

Back to top Go down

_SIO2transform->dir and _SIO2transform->mat What effect??? Empty Re: _SIO2transform->dir and _SIO2transform->mat What effect???

Post  Francescu Fri Sep 18, 2009 12:42 am

_SIO2transform->mat --> (OGL) transformation matrix (for an object)

Check tutorial09 for instance to see how it is being used / updated / etc

Francescu

Posts : 136
Join date : 2009-03-18

Back to top Go down

_SIO2transform->dir and _SIO2transform->mat What effect??? Empty Re: _SIO2transform->dir and _SIO2transform->mat What effect???

Post  Faikus Fri Sep 18, 2009 3:22 am

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.

Faikus

Posts : 23
Join date : 2009-05-26
Location : Berlin

Back to top Go down

_SIO2transform->dir and _SIO2transform->mat What effect??? Empty Re: _SIO2transform->dir and _SIO2transform->mat What effect???

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum