Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization
by Alejandro Terrazas, John Ostuni, Michael Barlow
The BillboardBehavior
It is often the case that the programmer wants some scene graph elements to always face a particular way. This situation arises in 3D text labeling of axis and other objects where it would look strange to see the side of the text object.
Java 3D provides an extension to the Behavior class called Billboard that forces the +z direction of an object to always face the viewer. The Billboard class can be quite useful in this regard as we demonstrate in Listing 12.15.
Recall from our MRPhysics visualization that our axes were missing labels. This is a severe limitation in our ability to see where all the movement is oriented. In other words, we cannot tell which way is up as we rotate the axis. We now modify AxisBody by adding ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access