vrml transformations

vrml transformations

Author

Message

Larry D'Cunh#1 / 2

vrml transformations

Hi, I'm having a bit of trouble with the "scaleOrientation" and "center" fields in the Transform nodes. The spec says:

Given a 3-dimensional point P and Transform node, P is transformed into point P' in its parent's coordinate system by a series of intermediate transformations. In matrix transformation notation, where C (center), SR (scaleOrientation), T (translation), R (rotation), and S (scale) are the equivalent transformation matrices,

P' = T C R SR S -SR -C P

for the -SR rotation matrix, am I supposed to negate the angle only or also the x,y,z values?

I have is all the above 4x4 transformation matrices but only the scaleOrientation and center values are messing things up (when not default values). i.e. I can do 'regular' rotate/translate/scale ok

Thanks

Larry

Sat, 18 Aug 2001 03:00:00 GMT

Chris Morle#2 / 2

vrml transformations

Quote:

> Hi, I'm having a bit of trouble with the "scaleOrientation" and "center" > fields in the Transform nodes. The spec says:

> Given a 3-dimensional point P and Transform node, P is transformed into > point P' in its parent's coordinate system by a series of intermediate > transformations. In matrix transformation notation, where C (center), SR > (scaleOrientation), T (translation), R (rotation), and S (scale) are the > equivalent transformation matrices,

> P' = T C R SR S -SR -C P

> for the -SR rotation matrix, am I supposed to negate the angle only or also > the x,y,z values?

You only need to worry about this if you are writing a vrml viewer (the spec is describing what conforming browsers do). But anyway...

You need to invert the SR rotation matrix, that is, undo the rotation. You can do that by either negating the angle or negating the axis, not both.

Quote:

> I have is all the above 4x4 transformation matrices but only the > scaleOrientation and center > values are messing things up (when not default values). i.e. I can do > 'regular' rotate/translate/scale ok