Original Post
Hello,
in order to position and orientate the objects in my scene my scene objects currently have a scale, rotate and translate Vector3. From these vectors I build a matrix M that performs a Scale, XYZ rotation and translate: M = Scale * XYZRotate * Translate.
While this approach is very easy to use (for example I can just rotate an object around the y axis by: object->setRotation( Vec3(0, 45, 0)) it also not very flexible, since I have a fixed order (always scale, then rotate, then translate) AND I have a fixed rotation order (always X rotation, then Y, then Z).
Do you think this is a good design or should I change it? Should I just use a general Matrix so the user could apply any matrix? Or should I just make the rotation order variable? Or...?
Thanks for any ideas!
in order to position and orientate the objects in my scene my scene objects currently have a scale, rotate and translate Vector3. From these vectors I build a matrix M that performs a Scale, XYZ rotation and translate: M = Scale * XYZRotate * Translate.
While this approach is very easy to use (for example I can just rotate an object around the y axis by: object->setRotation( Vec3(0, 45, 0)) it also not very flexible, since I have a fixed order (always scale, then rotate, then translate) AND I have a fixed rotation order (always X rotation, then Y, then Z).
Do you think this is a good design or should I change it? Should I just use a general Matrix so the user could apply any matrix? Or should I just make the rotation order variable? Or...?
Thanks for any ideas!