You might try using the flag, Primitive.ENABLE_GEOMETRY_PICKING when you construct the Box primitive.
When you say a plane, I assume you've creatd a Quad or some other geometry array. You need to set the capabilities:
GeometryArray.ALLOW_INTERSECT
GeometryArray.ALLOW_FORMAT_READ
GeometryArray.ALLOW_COUNT_READ
GeometryArray.ALLOW_COORDINATE_READ
(If you've used indexed array you need ALLOW_COORDINATE_INDEX_READ too)
Set on the geometry (QuadArray?) and
Shape3D.ALLOW_GEOMETRY_READ
set on the shape 3D.
(This is all comes from the PickTool javadoc description)
Kev
Katja Loescher wrote:
[EMAIL PROTECTED]">I looked up the capability bits for boxes in the java doc and added all of
them. But I still get those errors.
Why do I get a Shape3D and a GeometryArray error when I click on a Box?
Thanks!
KatjaI tried to do it with PickCanvas, but I always get a
CapabilityNotSetException: "GeometryArray: no capability to get vertexcount" when I click on theplane and "Shape3D: no capability to get geometry" when I click on oneof theboxes. Which capabilities are have to be set?You need to set the capabilities, the objects (the Geometry array and the
shape3d have setCapability(int) methods (actully inherit it from
SceneGraphObject), the ones you need are GeometryArray.ALLOW_COUNT_READ
and
Shape3D.ALLOW_GEOMETRY_READ, it's all in the java doc for java3d
HTH
Jeremy
--
________________________________________________________
PGP key is here -> http://www.computerbooth.com/pgp.html
* If debugging is the process of removing bugs, then programming must be
the process of putting them in.===========================================================================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".
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
===========================================================================
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".
