Greg:

thanks, for the insight but i tried it , and did not get any results from
that.
public class PickResult extends java.lang.Object

Stores information about a pick hit. Detailed information about the pick and
each intersection of the PickShape with the picked Node can be inquired. The
PickResult is constructed with basic information and more detailed
information is generated as needed. The additional information is only
available if capability bits on the scene graph Nodes are set properly;
PickTool.setCapabilties(Node, int) can be used to ensure correct capabilites
are set. Inquiring data which is not available due to capabilties not being
set will generate a CapabilityNotSet exception.

A PickResult can be used to calculate intersections on Node which is not
part of a live scene graph using the constructor which takes a local to
VWorld transformation for the Node

 the ERROR that i am getting is

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:502)
atcom.sun.j3d.utils.picking.PickResult.generateIntersections(PickResult.java
:626)atcom.sun.j3d.utils.picking.PickResult.numIntersections(PickResult.java
:422)atcom.sun.j3d.utils.picking.PickTool.pickGeomAllSortedIntersect(PickToo
l.java:854)atcom.sun.j3d.utils.picking.PickTool.pickGeomClosestIntersect(Pic
kTool.java:915)at
com.sun.j3d.utils.picking.PickTool.pickClosest(PickTool.java:566)

at GraphicDisplay.mouseClicked(GraphicDisplay.java:666)

since the error is coming from PickResult, it means that i need to set the
capability for the PickTool, this is because PickTool.setCapabilties(Node,
int) can be used to ensure correct capabilites are set. Inquiring data which
is not available due to capabilties not being set will generate a
CapabilityNotSet exception.
check java3d/com/sun/j3d/utils/picking/PickResult.html for the detail of the
constructor.

what i am currently doing is trying to set the correct capabilities for the
PickTool, but i keep getting an error like

java.lang.IllegalArgumentException: Improper level
at com.sun.j3d.utils.picking.PickTool.setCapabilities(PickTool.java:265)
at GraphicDisplay.enumKids(GraphicDisplay.java:452)

this is the method that sets the capabilities for the PickTool

when i finish creating the cones, i have the method eumKids() which tries to
set the capability as shown below:

 void enumKids(Group tg)
    {

        java.util.Enumeration enumKids = tg.getAllChildren();
        while (enumKids.hasMoreElements())
        {
                //System.out.println("More elements to check");
      SceneGraphObject sg = (SceneGraphObject) enumKids.nextElement();
                if (sg instanceof Shape3D || sg instanceof Morph)
                {
        sg.setCapability(Group.ENABLE_PICK_REPORTING);
       PickTool.setCapabilities((Node) sg, PickTool.INTERSECT_FULL);
                   sg.setCapability(PickTool.INTERSECT_FULL);
System.out.println("Capability = " +
sg.getCapability(PickTool.INTERSECT_FULL));
System.out.println("Capability = " +
sg.getCapability(PickTool.GEOMETRY_INTERSECT_INFO));
                }
        }
    }

i get capability = false when i try to set capability for
GEOMETRY_INTERSECT_INFO


this little error is taking all my time, so any help that can lead to fix it
will be greatly appreciated.

thanks in advance,


Isaac

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