Spatial Orientation (General 3D Question)

This really belongs on the newbie forum but it has not been brought back up yet so i am posting it here. I hope this forum is not only for the Java3D API but rather for doing 3D with Java. If not please let me know where i should repost this question.

I’m really just started to learn how to do 3D programming and to do that i’ve started working/learning on a small custom 3D engine. I can load models and place them in my small game graph, but now i’m to the point where i need to orient the objects. I really need help in this area. I see so many different ways to orient an object in 3D space and i’m confused about exactly which one i should use, and how i should use it. As I understand it there are 4 main ways to store orientation:

Matrix
Euler Angles
Angle Axis
Quaternion

I have seen a lot of information on how to convert each of these to each other format, so the conversion issues are not too much of a problem. What I need help with is which one should I use to store my object orientations? From what I read there are a lot of people that think Quaternion are great and they always talk about using them for the Camera orientation, but I have not read much about using them for general object orientation. Are the conversions to usable formats (the other 3 actually) just too costly to do and thus nobody uses them for anything except where it is very critical like the camera?

If you had an Entity type in your game graph, what would you use to specify the orientation of that entity in the 3d world? Any insight would be great.

Well, for scene node orientations, I use matrices. This is because I use LWJGL (OpenGL) to render and this allows me to do a straight glMultMatrix with my matrix to get the desired model matrix.

I then use Quaternions for Skeletal Animation and Camera. slerp for the animations and stopping gimbal lock for the camera.

I am using JOGL as well as a custom software rasterizer (just to learn mind you) so storing and using a matrix form for orientation would work.

Do you find using quaternions for node orientation causes too much processing overhead and using a matrix (with larger memory overhead) is better for speed? How are you doing interpolation or animation of node orientation? Do you store it as a 3x3 or 4x4 matrix? do you store the orientation and the translation togther in a 4x4 matrix? or do you use a 3x3 rotation matrix and a vector for position? what about scaling?

Not sure if using rotation via a matrix versus a quaternion is faster (probably not by much if at all), I simply do it because it’s straight forward, and what OpenGL expects. I use a 3x3 matrix for rotation and a vector for translation. Scaling I keep as a single float value. So for each node, I have a 1 matrix, 1 vector and 1 float.

Thanks a lot for your insight Mojomonkey.

Does anyone else have any other ways of doing things? I’m specialy interested to hear anyones point of view related to using quaternions.

I started off using axis-angle only for my scenario, I dont like though.

I use euler for GUI editing of object rotations.

I plan to replace axis-angle in the scenario with euler since that is human comprendable.

But I am going to use quats for animation rotations. That is becuase its real easy to interpolate rotations between two quats.