|
Multiple Geometries in a Single Shape3D Node |
|
|
Java3D API version 1.2 added some methods to the Shape3D class to allow
Shape3D object to reference multiple Geometry NodeComponents. This new feature
may yield better performance due to the reduction of the number of objects in
a scene graph.
Shape3D objects refer to one geometry objects:
LineArray axisXLines=new LineArray(2,LineArray.COORDINATES);
Shape3D axisXShape=new Shape3D(axisXLines);
objRoot.addChild(axisXShape);
LineArray axisYLines=new LineArray(2,LineArray.COORDINATES);
Shape3D axisYShape=new Shape3D(axisYLines);
objRoot.addChild(axisYShape);
LineArray axisZLines=new LineArray(10,LineArray.COORDINATES);
Shape3D aixsZShape=new Shape3D(axisZLines);
objRoot.addChild(axisZShape);
|
Multiple Geometries in a Single Shape3D Node:
Shape3D axisShape3D = new Shape3D();
axisShape3D.removeGeometry(0);
axisShape3D.addGeometry(axisXLines);
axisShape3D.addGeometry(axisYLines);
axisShape3D.addGeometry(axisZLines);
|
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.