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
 
----- Original Message -----
Sent: Friday, April 22, 2005 12:56 PM
Subject: [JAVA3D] multiple BranchGroup

Hi All,
I want to know how can I have multiple Object in a SimpleUnivers ?
For example two ColorCubes in a simpleUnivers ?
 
Regards,
Saeed

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com =========================================================================== 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".

=========================================================================== 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".

Reply via email to