Hi Dominic,
Just did that with a VRML loaded scene today.. so u r in luck, considering
that the method will work for 3ds too ;-))

Consider s is the scene you got from 3Ds loader, then

  BranchGroup tmpBg = s.getSceneGroup();
  Enumeration en = tmpBg.getAllChildren();
  TransformGroup tg = null;
  while (en.hasMoreElements())
  { Object obj = en.nextElement();
   if (obj instanceof TransformGroup)
   { tg = (TransformGroup)obj;
   }

   if (tg != null)
   { Shape3D n = (Shape3D) tg.getChild(0);//this will give you all the
shape3D's
   }
  }

Hope that helps. Note that I am extracting only the Transform groups, but
there is another node called "Link" in the scene. But I haven't looked into
it yet.

-Nikhilesh


----- Original Message -----
From: "Dominik Helleberg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 19, 2001 11:05 AM
Subject: [JAVA3D] Get Shape3D from Loader


> Hi All!
>
> I got a simple question, and tell me if i'm stupid, but i can't find a
> solution right now...
>
> So, I'm using a 3ds-loader, that returns a Scene, that i converted to a
> BranchGroup an added to my SceneGraph. So long, so good. Now I want to set
> the Appearance of the loaded Objects but I've no idea how to do this.
> How can i get the Shape3D Objects from the BranchGroup or the Scene, and
> how can I set it's Appearance??
>
> Thanks a lot for any help....
>
> Dominik
>
>
===========================================================================
> 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