• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Representing Rotations

Translation and scaling are easy to represent, since they're just three simple floating-point or double-precision numbers. Rotation, however, is more complex. There are several ways of expressing a rotation, and Java 3D supports all of them.

If your application is able to generate a rotation matrix directly, you can have Java 3D set that matrix directly into a Transform3D object. That works, but it puts the burden of computing the matrix onto your application software. Alternatively, you can create a separate rotation matrix for the X rotation, the Y rotation, and the Z rotation, and then tell Java 3D to combine them into a single matrix.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint