Change values using translation

The glTranslate translates objects on the screen.
I have put to a structure the values of some objects .

How can i translate objects on the screen and at the same time the values of the objects in the structure be changed accordly to the translation ?

The translation is happening by click and moving the mouse.

Should i use glMultmatrix? If yes how can i use it? Is there any way to multiply the matrixes so the values of the structure to be changed ?

Thanks

Simply use some basic vector maths, you know AB+BC = AC and such. Translations remains trivial as long as you don’t face a new rotated basis.

You can use glTranslate to define and glGet the matrix and multiply your vertices manually. Remember to reset your modelview/project matrix to identity.

Originally posted by GreenCat:
[b]The glTranslate translates objects on the screen.
I have put to a structure the values of some objects .

How can i translate objects on the screen and at the same time the values of the objects in the structure be changed accordly to the translation ?

The translation is happening by click and moving the mouse.

Should i use glMultmatrix? If yes how can i use it? Is there any way to multiply the matrixes so the values of the structure to be changed ?

Thanks[/b]