javax.media.j3d
Class PickConeRay

java.lang.Object
  extended by javax.media.j3d.PickShape
      extended by javax.media.j3d.PickCone
          extended by javax.media.j3d.PickConeRay

public final class PickConeRay
extends PickCone

PickConeRay is an infinite cone ray pick shape. It can be used as an argument to the picking methods in BranchGroup and Locale.

Since:
Java 3D 1.2
See Also:
BranchGroup.pickAll(javax.media.j3d.PickShape), Locale.pickAll(javax.media.j3d.PickShape)

Field Summary
 
Fields inherited from class javax.media.j3d.PickCone
direction, origin, spreadAngle
 
Fields inherited from class javax.media.j3d.PickShape
PICKBOUNDINGBOX, PICKBOUNDINGPOLYTOPE, PICKBOUNDINGSPHERE, PICKCONE, PICKCYLINDER, PICKPOINT, PICKRAY, PICKSEGMENT, PICKUNKNOWN
 
Constructor Summary
PickConeRay()
          Constructs an empty PickConeRay.
PickConeRay(Point3d origin, Vector3d direction, double spreadAngle)
          Constructs an infinite cone pick shape from the specified parameters.
 
Method Summary
(package private)  boolean intersect(Bounds bounds, Point4d pickPos)
          Return true if shape intersect with bounds.
 void set(Point3d origin, Vector3d direction, double spreadAngle)
          Sets the parameters of this PickCone to the specified values.
(package private)  PickShape transform(Transform3D t3d)
           
 
Methods inherited from class javax.media.j3d.PickCone
getDirection, getOrigin, getPickType, getRadius, getSpreadAngle, getStartPoint
 
Methods inherited from class javax.media.j3d.PickShape
distance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PickConeRay

public PickConeRay()
Constructs an empty PickConeRay. The origin and direction of the cone are initialized to (0,0,0). The spread angle is initialized to PI/64 radians.


PickConeRay

public PickConeRay(Point3d origin,
                   Vector3d direction,
                   double spreadAngle)
Constructs an infinite cone pick shape from the specified parameters.

Parameters:
origin - the origin of the cone
direction - the direction of the cone
spreadAngle - the spread angle of the cone in radians
Method Detail

set

public void set(Point3d origin,
                Vector3d direction,
                double spreadAngle)
Sets the parameters of this PickCone to the specified values.

Parameters:
origin - the origin of the cone
direction - the direction of the cone
spreadAngle - the spread angle of the cone in radians

intersect

final boolean intersect(Bounds bounds,
                        Point4d pickPos)
Return true if shape intersect with bounds. The point of intersection is stored in pickPos.

Specified by:
intersect in class PickCone
Parameters:
bounds - the bounds object to check
pickPos - the location of the point of intersection (not used for method. Provided for compatibility).

transform

PickShape transform(Transform3D t3d)
Specified by:
transform in class PickShape


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.