javax.media.j3d
Class PickCylinderSegment

java.lang.Object
  extended by javax.media.j3d.PickShape
      extended by javax.media.j3d.PickCylinder
          extended by javax.media.j3d.PickCylinderSegment

public final class PickCylinderSegment
extends PickCylinder

PickCylinderSegment is a finite cylindrical segment 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
(package private)  Point3d end
           
 
Fields inherited from class javax.media.j3d.PickCylinder
direction, origin, radius
 
Fields inherited from class javax.media.j3d.PickShape
PICKBOUNDINGBOX, PICKBOUNDINGPOLYTOPE, PICKBOUNDINGSPHERE, PICKCONE, PICKCYLINDER, PICKPOINT, PICKRAY, PICKSEGMENT, PICKUNKNOWN
 
Constructor Summary
PickCylinderSegment()
          Constructs an empty PickCylinderSegment.
PickCylinderSegment(Point3d origin, Point3d end, double radius)
          Constructs a finite cylindrical segment pick shape from the specified parameters.
 
Method Summary
private  void calcDirection()
          Calculates the direction for this PickCylinderSegment, based on start and end points.
 void getEnd(Point3d end)
          Gets the end point of this PickCylinderSegment.
(package private)  boolean intersect(Bounds bounds, Point4d pickPos)
          Returns true if shape intersect with bounds.
 void set(Point3d origin, Point3d end, double radius)
          Sets the parameters of this PickCylinderSegment to the specified values.
(package private)  PickShape transform(Transform3D t3d)
           
 
Methods inherited from class javax.media.j3d.PickCylinder
getDirection, getOrigin, getPickType, getRadius, getStartPoint, pointInPolytope
 
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
 

Field Detail

end

Point3d end
Constructor Detail

PickCylinderSegment

public PickCylinderSegment()
Constructs an empty PickCylinderSegment. The origin and end points of the cylindrical segment are initialized to (0,0,0). The radius is initialized to 0.


PickCylinderSegment

public PickCylinderSegment(Point3d origin,
                           Point3d end,
                           double radius)
Constructs a finite cylindrical segment pick shape from the specified parameters.

Parameters:
origin - the origin point of the cylindrical segment.
end - the end point of the cylindrical segment.
radius - the radius of the cylindrical segment.
Method Detail

set

public void set(Point3d origin,
                Point3d end,
                double radius)
Sets the parameters of this PickCylinderSegment to the specified values.

Parameters:
origin - the origin point of the cylindrical segment.
end - the end point of the cylindrical segment.
radius - the radius of the cylindrical segment.

calcDirection

private void calcDirection()
Calculates the direction for this PickCylinderSegment, based on start and end points.


getEnd

public void getEnd(Point3d end)
Gets the end point of this PickCylinderSegment.

Parameters:
end - the Point3d object into which the end point will be copied.

intersect

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

Specified by:
intersect in class PickCylinder
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.