Java Reference
In-Depth Information
Figure 18. Third code segment and result of LOD.java
79. public LOD()
80. {
81. setLayout(new BorderLayout());
82. Canvas3D canvas3D = new Canvas3D(null);
83. add("Center", canvas3D);
84. BranchGroup scene = createSceneGraph();
85. SimpleUniverse simpleU = new SimpleUniverse(canvas3D);
86. simpleU.getViewingPlatform().setNominalViewingTransform();
87. simpleU.addBranchGraph(scene);
88. }
89.
90. public static void main(String[] args)
91. {
92. Frame frame = new MainFrame(new LOD(), 256, 256);
93. } // end of method LOD
94.
95. } // end of class LOD
lator is used to move the object back and forth in this example, the alpha of the object, the
axis of translation and the start and end positions must also be declared.
morph
If it is desired to produce animation that cannot be created by pre-determined behavior
such as those under interpolators, billboard or LOD, the Morph class can be used. The ef-
Search WWH ::




Custom Search