Hey Saeed
After you have created your SimpleUniverse
SimpleUniverse uv = new
SimpleUniverse(viewingPlatform, viewer);
Get an instance of the Local object
javax.media.j3d.Locale locale =
uv.getLocale();
Create a BranchGroup for each of you ColorCubes
BranchGroup bg1
BranchGroup bg2
For each
BranchGroup create a TransformGroup (So that you can position,scale,rotate your
ColorCubes)
TransformGroup tg1
TransformGroup tg2 Add the ColorCubes to the TransformGroup
tg1.addChild(new ColorCube());
tg2.addChild(new ColorCube()); Add the TransformGroup to the BranchGroup
bg1.addChild(tg1);
bg2.addChild(tg2);
Then add each BranchGroup to the Local
locale.addBranchGraph(a); locale.addBranchGraph(b);
That should do it.
Dan
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help". |
- [JAVA3D] multiple BranchGroup Saeed Ansari
- Daniel Freeman