329

Viewing the scene
ViewPlatform example code

  • Create a TransformGroup to steer the platform
    TransformGroup viewGroup = new TransformGroup( );
    viewGroup.setCapability( TransformGroup.ALLOW_TRANSFORM_WRITE );

  • Add a ViewPlatform
    ViewPlatform myPlatform = new ViewPlatform( );
    myPlatform.setActivationRadius( 1000.0f );
    myPlatform.setViewAttachPolicy( View.NOMINAL_HEAD );
    viewGroup.addChild( myPlatform );

  • Add them to a BranchGroup view branch
    BranchGroup viewBranch = new BranchGroup( );
    viewBranch.addChild( viewGroup );
    myLocale.addBranchGraph( viewBranch );