javax.media.j3d
Class PickCylinder

java.lang.Object
  extended by javax.media.j3d.PickShape
      extended by javax.media.j3d.PickCylinder
Direct Known Subclasses:
PickCylinderRay, PickCylinderSegment

public abstract class PickCylinder
extends PickShape

PickCylinder is the abstract base class of all cylindrical pick shapes.

Since:
Java 3D 1.2

Field Summary
(package private)  Vector3d direction
           
(package private)  Point3d origin
           
(package private)  double radius
           
 
Fields inherited from class javax.media.j3d.PickShape
PICKBOUNDINGBOX, PICKBOUNDINGPOLYTOPE, PICKBOUNDINGSPHERE, PICKCONE, PICKCYLINDER, PICKPOINT, PICKRAY, PICKSEGMENT, PICKUNKNOWN
 
Constructor Summary
PickCylinder()
          Constructs an empty PickCylinder.
 
Method Summary
 void getDirection(Vector3d direction)
          Gets the direction of this cylinder.
 void getOrigin(Point3d origin)
          Gets the origin point of this cylinder object.
(package private)  int getPickType()
           
 double getRadius()
          Gets the radius of this cylinder object
(package private)  Point3d getStartPoint()
           
(package private) abstract  boolean intersect(Bounds bounds, Point4d pickPos)
          Return true if shape intersect with bounds.
(package private) static boolean pointInPolytope(BoundingPolytope ptope, double x, double y, double z)
           
 
Methods inherited from class javax.media.j3d.PickShape
distance, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

origin

Point3d origin

direction

Vector3d direction

radius

double radius
Constructor Detail

PickCylinder

public PickCylinder()
Constructs an empty PickCylinder. The origin of the cylinder is initialized to (0,0,0). The radius is initialized to 0.

Method Detail

getOrigin

public void getOrigin(Point3d origin)
Gets the origin point of this cylinder object.

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

getRadius

public double getRadius()
Gets the radius of this cylinder object

Returns:
the radius in radians

getDirection

public void getDirection(Vector3d direction)
Gets the direction of this cylinder.

Parameters:
direction - the Vector3d object into which the direction will be copied

intersect

abstract 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 PickShape

pointInPolytope

static boolean pointInPolytope(BoundingPolytope ptope,
                               double x,
                               double y,
                               double z)

getStartPoint

Point3d getStartPoint()
Specified by:
getStartPoint in class PickShape

getPickType

int getPickType()
Specified by:
getPickType in class PickShape


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