36

Building 3D content with a scene graph
Building a scene graph

  • Build nodes by instantiating Java 3D classes
    Shape3D myShape1 = new Shape3D( myGeom1, myAppear1 );
    Shape3D myShape2 = new Shape3D( myGeom2 );

  • Modify nodes by calling methods on an instance
    myShape2.setAppearance( newAppear2 );

  • Build groups of nodes
    Group myGroup = new Group( );
    myGroup.addChild( myShape1 );
    myGroup.addChild( myShape2 );