52

Building 3D content with a scene graph
HelloWorld example code

  • Set up an animation behavior to spin the shapes . . .
        // Make a behavor to spin the shape
        Alpha spinAlpha = new Alpha( -1, 4000 );
        RotationInterpolator spinner =
            new RotationInterpolator( spinAlpha, trans );
        spinner.setSchedulingBounds(
    	    new BoundingSphere( new Point3d( ), 1000.0 ) );
        trans.addChild( spinner );
    
        return branch;
    }