|
26th September 2006, 09:14 AM | #1 |
Member
Advanced member
Join Date: May 2006
Posts: 36
|
Re: Get Rotation of a Group or Object
Hot dang your right. Just saw your post today ... so I'll try that tonight.
Thanks |
26th September 2006, 08:54 PM | #2 |
Member
Advanced member
Join Date: May 2006
Posts: 36
|
Re: Get Rotation of a Group or Object
Humm. Seems like the above code rotates an object about the origin. How would I rotate it about the center of the object? I would like the same functionality as the rotate buttons on the left side bar.
Thanks. |
26th September 2006, 09:38 PM | #3 | |
Senior Member
Professional user
Join Date: Jul 2003
Posts: 899
|
Re: Get Rotation of a Group or Object
Quote:
Alternatively, you could call the code that AC3D uses when you use the left side bar rotate function. Check out the ac3d.tcl file in the "scripts" directory and look for "ac3d rotate_axis_angle". This snippet might help: Code:
// Specify axis where 0 = x, 1 = y, 2 = z int axis = 1; float degrees = 90.0f; tcl_command( "ac3d rotate_axis_angle %d %g", axis, degrees ); Good luck |
|
27th September 2006, 01:56 PM | #4 |
Member
Advanced member
Join Date: May 2006
Posts: 36
|
Re: Get Rotation of a Group or Object
Yep. That did the trick.
Thanks!!!! |
25th October 2006, 04:52 PM | #5 |
Junior Member
Member
Join Date: Sep 2005
Posts: 10
|
Re: Get Rotation of a Group or Object
I have examining the file format for rotation values. The description of the format says that there a field called "rot" followed by values of the rotation matrix. After rotating objects and groups of objects all over the place and saving the file at various steps of the process, I failed to find "rot" anywhere in the saved file. It appears that a rotation is applied to the vertices then simply forgotten. However, that does not seem to be the case for translations. This seems to me to be an odd inconsistancy and an omission of some useful information that is needed to restore the initial condition of object.
|
|
|