Hi,
I managed to get the Java3D 1.2 Pick funktionaliy to work, but it is still
not working with Polygons I create with the help of GeometryInfo-Objects.
I get the following capability set exception:
javax.media.j3d.CapabilityNotSetException: Shape3D: no capability to allow
inter
sect
at javax.media.j3d.Shape3D.intersect(Shape3D.java:434)
at
com.sun.j3d.utils.picking.PickTool.pickGeomAllSorted(PickTool.java:67
2)
at
com.sun.j3d.utils.picking.PickTool.pickGeomClosest(PickTool.java:736)
at
com.sun.j3d.utils.picking.PickTool.pickClosest(PickTool.java:512)
at
app.gis3D.PickObjectBehavior.updateScene(PickObjectBehavior.java:115)
at
com.sun.j3d.utils.picking.behaviors.PickMouseBehavior.processStimulus
(PickMouseBehavior.java:153)
at
javax.media.j3d.BehaviorScheduler.doWork(BehaviorScheduler.java:167)
at javax.media.j3d.J3dThread.run(J3dThread.java:256)
I tried to set the capabilites with the following:
ginfo.setCoordinates(coordsccw);
ginfo.setStripCounts(stripCounts);
Triangulator tr = new Triangulator();
tr.triangulate(ginfo);
NormalGenerator ng = new NormalGenerator();
ng.generateNormals(ginfo);
Stripifier st = new Stripifier();
st.stripify(ginfo);
// Set Appearance
Appearance app = createAppearance();
PolygonAttributes polyAppear = new PolygonAttributes();
polyAppear.setCullFace(PolygonAttributes.CULL_NONE);
app.setPolygonAttributes(polyAppear);
-> ginfo.getGeometryArray().setCapability(Geometry.ALLOW_INTERSECT);
// Create Shape3D
Shape3D shape = new Shape3D();
shape.setAppearance(app);
shape.setGeometry(ginfo.getGeometryArray());
shape.setCapability(Shape3D.ALLOW_APPEARANCE_READ);
shape.setCapability(Shape3D.ALLOW_APPEARANCE_WRITE);
-> shape.setCapability(Geometry.ALLOW_INTERSECT);
sf3d.addChild(shape);
But it is not working. So what now?
I really appreciate your help, thanks Desiree
o------------------------------------------------------------------------o
| Desiree Hilbring Institut fuer Photogrammetrie und Fernerkundung |
| Universitaet Karlsruhe, Germany |
| |
| email: [EMAIL PROTECTED] |
| # 0721 6083676 |
o------------------------------------------------------------------------o
===========================================================================
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".