Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>IMO, the most 'user friendly format' for rotation is storing Euler XYZ angles, this is generally how rotations are exposed in any 3d content creation software.</p> <p>Euler angles are easy to transform to matrices, see <a href="http://en.wikipedia.org/wiki/Rotation_representation_%28mathematics%29#Conversion_formulae_between_representations" rel="nofollow">here</a> for the involved matrix product.</p> <p><em>But</em> you should not confuse the format given to the GUI/user and the storage format of the data: Euler XYZ angles have problems of their own when doing animation, <a href="http://en.wikipedia.org/wiki/Gimbal_lock" rel="nofollow">gimbal lock</a> can introduce unwanted behaviour.</p> <p>Another candidate for storing/computing rotations is <a href="http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation" rel="nofollow">quaternions</a>. They offer mathematical advantages over XYZ angles, essentially when interpolating between two rotations. Of course, you don't want to expose the quaternion values directly to any human user, you'll need to convert them to XYZ angles. You'll find plenty of code to that on the Web.</p> <p>I would not recommend storing the rotation directly in matrix format. Extracting user friendly values from it is difficult, it does not offer any interesting behaviour for animation/interpolation, it takes for storage. IMO, matrices are to be created when needed to transform the geometry.</p> <p>To conclude, there are a few options, you should select what suits you most. Do you plan to having animation or not ? etc.</p> <p><em>EDIT</em> Also, you should not make an amalgam with model and view matrices. They are semantically very different, and are combined in OpenGL only for performance reasons. What I had in mind above in the 'model matrix'. The view matrix is generally given by your view system/camera manager, and is combined with you model matrix.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload