Ok, I think its possible to do this ... check my math and let me know what u think.
Have a group that is to be copied.
The copies of the group are to be translated and rotated.
I think it is possible to get the rotation of the groups by doing the following:
* translating the copy back to the origin (where the location of the original is)
* calculate the rotation of the x,y,z axis via the location of vertaces.
-> ie, take the first vertex from the copy and the first vertex from the original and
apply the math below
The above math is derived from the information found at the link below.
http://www.tpub.com/math2/5.htm
So what do you think? Does this sound feasible? I need functions that do the following
- translate group to origin
- Get a specific vertex in a group (the first one)
- arc tan function
I know there are functions available in the ac3d headers that do the first 2. So can I use the Math.h functions to get arc tan or is there something available in the headers for that?
(Update) I've answered my own question here - I just tried atan and Math.h works!