Hi,
 I�m have a potential bug report when using the pickAny() method.

  When my scene is drawn, at one point I engage a Behavior that goes to
an object within the scene and attempts to find out which other objects
are in its �line of sight�.  I do this by finding a point on the surface
of the shape and a vector in the sight direction which is encapsulated
(with other info) into a user defined LightBeam object.  The behavior
then calls the shootBeam method below to find the other shapes in its
vicinity.

public void shootBeam(LightBeam beam) {
     Object pickedObject = new Object();

    PickRay nextPick = new PickRay(beam.startPoint, beam.direction);
    SceneGraphPath pickPath = new SceneGraphPath();
    sceneObjectsBranchRoot.pickAny(nextPick);
    pickedObject = pickPath.getObject();

    if(pickedObject != null)
      System.out.println("Obj = " + pickedObject.toString());

  } //end shootBeam()

The program compiled successfully and ran, but never found any
intercepted objects.  However, when the fourth line is changed to:

   pickPath = sceneObjectsBranchRoot.pickAny(nextPick);

it will indeed find the intercepts.  The question is, why did it compile
and run correctly if no provision was originally made for accepting the
returned value from pickAny()?

   Thanks - Gary Graf
(Actually, this e-mail started out as a question as to why it wasn�t
working and as is often the case, while typing it I saw the problem).

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