Skip to main content

How to get a Shape3d from a VRML file via VRML Loader

1 reply [Last post]
peter
Offline
Joined: 2003-06-11
Points: 0

hi,

does anybody know how i can get a Shape3d from a VRML file.

Currently i use the org.web3d.j3d.loaders.VRML97Loader;

VRML97Loader loader = new VRML97Loader();
Scene scene = (Scene) loader.load(file);
BranchGroup sceneGroup = scene.getSceneGroup();

But then i have only Nodes of the BranchGroup. But if need the Shape3d to set the collision bounds to the shape and not the the bounding box.

...peter

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Alessandro Borges

Hi

I put some code about it in the list yesterday
http://archives.java.sun.com/cgi-bin/wa?A2=ind0410&L=java3d-interest&P=R...

(take care if the link break line)

It is just about set capabilitybits in Shape3D & Geometries nodes inside Scene objects.

Debug and adapt it to meet your needs.

Alessandro

java3d-interest@javadesktop.org wrote:
hi,

does anybody know how i can get a Shape3d from a VRML file.

Currently i use the org.web3d.j3d.loaders.VRML97Loader;

VRML97Loader loader = new VRML97Loader();
Scene scene = (Scene) loader.load(file);
BranchGroup sceneGroup = scene.getSceneGroup();

But then i have only Nodes of the BranchGroup. But if need the Shape3d to set the collision bounds to the shape and not the the bounding box.

...peter
---
[Message sent by forum member 'Peter' (Peter)]

http://www.javadesktop.org/forums/thread.jspa?messageID=35617—w

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
[att1.html]