Hi Hind lwahhabi,
This is the code to store all parts of the VRML-object into a hashtable.
After that, you can retrieve all elements by calling get(" <the
objectname> ");
Call VrmlScene.getNamedObjects() to get a Hashtable with of the DEF'd nodes
in
the VRML file.
For example, if your VRML file has:
DEF OBJ Transform { ...}
Then you can retieve "OBJ" by calling:
VrmlLoader loader = new VrmlLoader();
VrmlScene scene = loader.load(someUrl);
Hashtable defTable = scene.getNamedObject();
TransformGroup obj = (TransformGroup) defTable.get("OBJ");
Note: The entries in the Hashtable will be stored by the DEF name and will
be
Java3D nodes. The specific node type will depend on the Java3D
implementation
of the VRML node. Most are pretty direct, i.e. Transform->TransformGroup,
although sometimes a single VRML node will be implemented as a subgraph of
Java3D nodes.
Succes,
> hi there!
> I need help for the following problem:
> I'm currently using the java3d-vrml97 working group browser and i want
> to select an area from the vrml file displayed ( a three dimensionnal
> area) in order to project it (according to the point of view selected)
> and to save it to an image format. Does anyone have clues for this? help
> me please .
> thanks for answering.
> Hind.
----------------------------------------------------
ing. Patrick Janssen
3i Communication
Intelligent Interactive Internet Communication
http://www.3icommunication.com/
tel: 040-2960040, fax: 040-2960041
----------------------------------------------------
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/