List of usage examples for javax.media.j3d Locale addBranchGraph
public void addBranchGraph(BranchGroup branchGroup)
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(); }