Java Reference
In-Depth Information
Figure 4. Third code segment and result snapshoots for PickBehaviour.java
78. public pickApp()
79.
{
80.
setLayout(new BorderLayout());
81.
Canvas3D canvas3D = new Canvas3D(null);
82.
add("Center", canvas3D);
83.
SimpleUniverse simpleU = new SimpleUniverse(canvas3D);
84.
BranchGroup scene = createSceneGraph(canvas3D);
85.
simpleU.getViewingPlatform().setNominalViewingTransform();
86.
simpleU.addBranchGraph(scene);
87.
88.
}
89.
90.
public static void main(String[] args)
91.
{
92.
Frame frame = new MainFrame(new pickApp(), 256, 256);
93.
}
94.
95. }// end of class pickApp
PickTool.setCapabilties(Node, int) can be used to ensure that the relevant capabili-
ties are set. A CapabilityNotSet exception will be generated if attempts are made to
obtain data without having the right capabilities set.
PickIntersection: This is a part of PickResult and holds information on an intersection
of a PickShape with a Node, including intersected geometry, intersected primitive,
intersection point, and closest vertex.
Search WWH ::




Custom Search