The Enumeration you get is an enumeration of Geometry objects. Just use:

Enumeration en = shape.getAllGeometries();
while (en.hasMoreElements())
{
    Geometry geometry = (Geometry)en.nextElement();
    if (geometry instanceof TriangleArray)
    {
        doSomethingWithTriangleArrays((TriangleArray)geometry);
    }
    else doSomethingWithGeometry(geometry);
}

Cheers,

Florin

-----Urspr�ngliche Nachricht-----
Von: Philip J Colbert [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 9. Januar 2003 11:35
An: [EMAIL PROTECTED]
Betreff: [JAVA3D] VRML setting Capabilities


Hi Everyone

I have a small request.  I am using the XJ3D loader Vrml97Loader to load
VRML
shapes into  Java3D.  I ultimatly want to be able to use the PickTool to
querry the shapes local coordinates and VRWorld coordinates.  To do this I
need to set the shapes Geometries to ALLOW_COUNT_READ amounst others.  I
have
"walked the Tree" down to the Geometries and use the
shape.getAllGeometries()
method to return the Geomtry as an Enumeration.  The problem I am having or
just can't think of how to solve is:- How do I change an Enumeration to a
GeometryArray (Or TriangleArray in this case)?

I have heard that the VrmlL97Loader has a method that allows the setting of
Geometries at the loading stage but I have not found any examples of how
this
may be done so if there are any examples out there plese point my at them.

Thanks for the help

C YA Phil Colbert :)

Philip J Colbert
Software Engineer
RCID, Bruce Building
University of Newcastle Upon Tyne
NE1 7RU
Phone 0191-2225306
Fax 0191-2225833
This e-mail, including any attached files, may contain confidential and
privileged information for the sole use of the intended recipient(s). If you
are not the intended recipient, please note that any circulation or copying
of this e-mail is strictly prohibited. If you have received this e-mail in
error please contact the sender by reply e-mail and delete all copies of
this message.

The RCID makes every effort to ensure that this e-mail and any attachments
are sent virus free. However it is the responsibility of the recipient to
perform any checks they deem necessary.

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