Subject: Re: [java3d] extract an area from a vrml file Date: Wed, 31 Mar 1999 10:37:02 +0200 From: hind lwahhabi <[EMAIL PROTECTED]> Organization: ENIC To: "ing. P.W.L. JANSSEN" <[EMAIL PROTECTED]> References: 1 , 2 thanks a lot for your answer! One more question (maybe it's silly but i'm new in vrml and 3d field!): Is it possible to select this area of interest in the vrml file displayed by the browser using the mouse? i mean: 1- you open the wrl file in the browser (the vrml97player of sun) 2- you select by clicking an area of interrest. 3- this area is then projected (are there projection primitives in java3d by the way?)and stored as an image (in order to compare this image with others from an image database). Maybe i'm repeating myself and maybe i'm asking a lot! excuse-me if i do:) hind. "ing. P.W.L. JANSSEN" wrote: > 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/