272

Creating Behaviors
Scheduling Bounds Example Code

  • Set bounds relative to the behavior's coordinate system
    Behavior behavior = new MyBehavior( );
    behavior.setSchedulingBounds( bounds );

  • Or relative to a bounding leaf's coordinate system
    TransformGroup group = new TransformGroup( );
    BoundingLeaf leaf = new BoundingLeaf( bounds );
    group.addChild( leaf );
    . . .
    Behavior behavior = new MyBehavior( );
    behavior.setSchedulingBoundingLeaf( leaf );