I think, I have a Lw3dLoader problem.
My program loads two Scenes, one of them is loaded from a .obj file and the other is loaded from a .lws file.
Then, these capabilities are set by calling this function:
private void kur (Scene sce) { Hashtable hash = sce.getNamedObjects();
for (Enumeration e = hash.keys() ; e.hasMoreElements(); ) { Object obj = hash.get(e.nextElement());
if (obj != null && (obj instanceof Shape3D)) { Shape3D shape = (Shape3D) obj; shape.setCapability(Shape3D.ALLOW_GEOMETRY_READ); shape.setCapability(Shape3D.ALLOW_GEOMETRY_WRITE); shape.setCapability(Shape3D.ENABLE_PICK_REPORTING); shape.setCapability(Shape3D.ALLOW_PICKABLE_READ); shape.setCapability(Shape3D.ALLOW_PICKABLE_WRITE); shape.setCapability(Shape3D.ALLOW_LOCAL_TO_VWORLD_READ); PickTool.setCapabilities(shape, PickTool.INTERSECT_FULL); }
} }
When I run the program and pick the shapes that are loaded from .lws file, this error is given:
javax.media.j3d.CapabilityNotSetException: Shape3D: no capability to get geometry at javax.media.j3d.Shape3D.numGeometries(Shape3D.java:398) at com.sun.j3d.utils.picking.PickResult.storeGeometry(PickResult.java:508) at com.sun.j3d.utils.picking.PickResult.generateIntersections(PickResult.java:632) at com.sun.j3d.utils.picking.PickResult.numIntersections(PickResult.java:428) at com.sun.j3d.utils.picking.PickTool.pickGeomAllSortedIntersect(PickTool.java:854) at com.sun.j3d.utils.picking.PickTool.pickAllSorted(PickTool.java:528) at line.IntersectInfoBehavior.processStimulus(IntersectInfoBehavior.java:97) at javax.media.j3d.BehaviorScheduler.doWork(BehaviorScheduler.java:172) at javax.media.j3d.J3dThread.run(J3dThread.java:250)
However, when I pick the other shapes that are loaded from .obj file, there is no error.
Can anyone tell me, what is wrong(or missing)?
Nagehan Pala
_________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail
=========================================================================== 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".