268

Lighting the environment
Scoping example code

  • Build a group of shapes
    TransformGroup myLightable = new TransformGroup( );
    Shape3D myShape = new Shape3D( myGeom, myAppear );
    myLightable.addChild( myShape );

  • Create a light and add the group to its scope list
    DirectionalLight myLight = new DirectionalLight( );
    myLight.addScope( myLightable );