Example usage for javax.media.j3d Locale addBranchGraph

List of usage examples for javax.media.j3d Locale addBranchGraph

Introduction

In this page you can find the example usage for javax.media.j3d Locale addBranchGraph.

Prototype

public void addBranchGraph(BranchGroup branchGroup) 

Source Link

Document

Add a new branch graph rooted at BranchGroup to the list of branch graphs.

Usage

From source file:HiResCoordTest.java

public void initJava3d() {
    super.initJava3d();

    // create a second locale for the earth and attach it to the universe
    Locale locale = createLocaleEarth(m_Universe);

    BranchGroup sceneBranchGroup = createSceneBranchGroupEarth();
    sceneBranchGroup.addChild(createBackground());

    m_ViewPlatformArray[1] = createViewPlatform();
    BranchGroup viewBranchGroup = createViewBranchGroup(getViewTransformGroupArray(1), m_ViewPlatformArray[1]);

    //      getJ3dTree().recursiveApplyCapability(sceneBranchGroup);
    //   getJ3dTree().recursiveApplyCapability(viewBranchGroup);

    locale.addBranchGraph(sceneBranchGroup);
    addViewBranchGroup(locale, viewBranchGroup);

    // create a third locale for the house on earth and attach it to the
    // universe//  ww w  . jav  a2s  . c om
    locale = createLocaleHouse(m_Universe);

    sceneBranchGroup = createSceneBranchGroupHouse();
    sceneBranchGroup.addChild(createBackground());

    m_ViewPlatformArray[2] = createViewPlatform();
    viewBranchGroup = createViewBranchGroup(getViewTransformGroupArray(2), m_ViewPlatformArray[2]);

    //      getJ3dTree().recursiveApplyCapability(sceneBranchGroup);
    //   getJ3dTree().recursiveApplyCapability(viewBranchGroup);

    locale.addBranchGraph(sceneBranchGroup);
    addViewBranchGroup(locale, viewBranchGroup);

    onDoneInit();
}