Example usage for javax.media.j3d Interpolator setSchedulingBounds

List of usage examples for javax.media.j3d Interpolator setSchedulingBounds

Introduction

In this page you can find the example usage for javax.media.j3d Interpolator setSchedulingBounds.

Prototype

public void setSchedulingBounds(Bounds region) 

Source Link

Document

Set the Behavior's scheduling region to the specified bounds.

Usage

From source file:InterpolatorTest.java

private BranchGroup createBranchGroup(TransformGroup bgShared, Interpolator interpolator) {
    BranchGroup bg = new BranchGroup();
    bg.addChild(bgShared);/*from   ww w . j  a  v a  2 s  .c om*/
    bg.addChild(interpolator);
    interpolator.setSchedulingBounds(getApplicationBounds());

    // strip the package name from szClass (everything before the final ".")
    String szClass = interpolator.getClass().getName();
    int nIndex = szClass.lastIndexOf(".");

    String szTrimedClass = szClass;

    if (nIndex > -1)
        szTrimedClass = szClass.substring(nIndex + 1, szClass.length());

    Text2D text = new Text2D(szTrimedClass, new Color3f(1, 1, 1), "SansSerif", 20, Font.PLAIN);
    bg.addChild(text);

    return bg;
}