Morning all,
I'm working with the fullsail fltloader and am trying to get the
gemoetries of the shapes in a scene. The problem is, everytime I try to get
a shape3D from a scene it throws a classCastException. I tried to use the
method of getNamedObjects and the resulting hashtable's get method to obtain
the shape3D(casted btw). I based this off of an obj. loader example I saw,
is the fltloader different or is there a better way? Thanks.
Shaun
/** Here's a snippet of my code ***/
Hashtable h = s.getNamedObjects();
System.out.println(h.toString());
System.out.println(h.keys().nextElement());
Enumeration en = h.keys();
while (en.hasMoreElements()) {
String str = (String)en.nextElement();
Node temp = (Node)h.get(str);
System.out.println("Temp: " + temp.toString());
if (temp instanceof Shape3D) {
Shape3D shape = (Shape3D) temp;
GeometryArray g = (GeometryArray)shape.getGeometry();
System.out.println("Vertex Count: " + g.getVertexCount());
}
}
/*** Error given ***/
java.lang.ClassCastException: com.fullsail.j3d.loaders.flt.FLTgroup
at TriangleTest.createSceneGraph(TriangleTest.java:71)
at TriangleTest.<init>(TriangleTest.java:27)
at TriangleTest.main(TriangleTest.java:32)
===========================================================================
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".