satan

02-20-2002, 01:17 AM

hi everybody

i want to create some simple object classes

tcube for example

it should have some methods/properties which shall be used to draw and transform it

now the problem is what kind of rotation values i shall store and depending on this how i shall rotate the cube before drawing it (i just want to call tcube.draw and all transformations are done dependend on the properties before it is drawn)

as long as i can see using glrotate (and storing three values for the rotations around x,y,z-axis) does not suit my needs

, because the first rotation is always about world axis (=local axis after glloadidentity) and the following are about local axis and of course the order of rotation problem again

is there any way to do rotations about three axis with just one matrix (perhaps about an arbitrary axis) and i do not mean using three matrices and multiply them because it would raise the same problems

the only thing i came up with is doing it like i did in my camera class that is storing three orthonormal vectors and rotate about them but then i cannot load the identity matrix at the start of the rendering routine which in my opinion makes the whole thing numerical instable (i hope this is the right term) and decrease performance

i hope anybody got what i am talking about since my english is not to good

any help is highly welcome as it took me the last three days searching the net for anything helpful but all i got was either useless or dealt with camera rotations which didn't help

thx in advance

sorry for posting again but i deleted the previous one and i wanted to give it a new subject since nobody seemed interested in at all

so just tell me i am to stupid or something but plz reply on this (or shall i post this in advanced? i do not think so since it is basic stuff)

i want to create some simple object classes

tcube for example

it should have some methods/properties which shall be used to draw and transform it

now the problem is what kind of rotation values i shall store and depending on this how i shall rotate the cube before drawing it (i just want to call tcube.draw and all transformations are done dependend on the properties before it is drawn)

as long as i can see using glrotate (and storing three values for the rotations around x,y,z-axis) does not suit my needs

, because the first rotation is always about world axis (=local axis after glloadidentity) and the following are about local axis and of course the order of rotation problem again

is there any way to do rotations about three axis with just one matrix (perhaps about an arbitrary axis) and i do not mean using three matrices and multiply them because it would raise the same problems

the only thing i came up with is doing it like i did in my camera class that is storing three orthonormal vectors and rotate about them but then i cannot load the identity matrix at the start of the rendering routine which in my opinion makes the whole thing numerical instable (i hope this is the right term) and decrease performance

i hope anybody got what i am talking about since my english is not to good

any help is highly welcome as it took me the last three days searching the net for anything helpful but all i got was either useless or dealt with camera rotations which didn't help

thx in advance

sorry for posting again but i deleted the previous one and i wanted to give it a new subject since nobody seemed interested in at all

so just tell me i am to stupid or something but plz reply on this (or shall i post this in advanced? i do not think so since it is basic stuff)