PDA

View Full Version : modify tranformation matrix



manu
09-03-2001, 09:30 AM
hi,
here's my pb :
I have some objects scaling rotating and translating, and a fixed camera for scale and rotation.
I'd like to have some objects fixed to the camera, I mean to keep their scale factor and rotation angle invariant to the camera.
Whatever the global tranformations applied to them.

I think I would need to reset scale and rotation coordinates from Transformation matrix, to leave them in the default state.

what do you think ?
Any idea ?
thanks

zed
09-03-2001, 12:27 PM
not to sure what u want billboarding?

perhaps the below
glPushMatrix();
glLoadIdentity();
// the above has wiped the camera

// draw object

glPopMatrix();

manu
09-04-2001, 12:10 AM
If I do that, I reset translation too, what I don't want to. I only want to reset rotation and scale.

DaViper
09-04-2001, 01:55 AM
glLoadIdentity()
glScale()
glRotate()
glPushMatrix
glTranslate()
//draw objects
glPopMatrix()
//draw fixed objects

or something similar

Chris