javax.media.j3d
Class PickCone

java.lang.Object
  extended by javax.media.j3d.PickShape
      extended by javax.media.j3d.PickCone
Direct Known Subclasses:
PickConeRay, PickConeSegment

public abstract class PickCone
extends PickShape

PickCone is the abstract base class of all cone pick shapes.

Since:
Java 3D 1.2

Field Summary
(package private)  Vector3d direction
           
(package private)  Point3d origin
           
(package private)  double spreadAngle
           
 
Fields inherited from class javax.media.j3d.PickShape
PICKBOUNDINGBOX, PICKBOUNDINGPOLYTOPE, PICKBOUNDINGSPHERE, PICKCONE, PICKCYLINDER, PICKPOINT, PICKRAY, PICKSEGMENT, PICKUNKNOWN
 
Constructor Summary
PickCone()
          Constructs an empty PickCone.
 
Method Summary
 void getDirection(Vector3d direction)
          Gets the direction of this PickCone.
 void getOrigin(Point3d origin)
          Gets the origin of this PickCone.
(package private)  int getPickType()
           
(package private)  double getRadius(double distance)
          Gets the radius of this PickCone at the specified distance.
 double getSpreadAngle()
          Gets the spread angle of this PickCone.
(package private)  Point3d getStartPoint()
           
(package private) abstract  boolean intersect(Bounds bounds, Point4d pickPos)
          Return true if shape intersect with bounds.
 
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

spreadAngle

double spreadAngle
Constructor Detail

PickCone

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

Method Detail

getOrigin

public void getOrigin(Point3d origin)
Gets the origin of this PickCone.

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

getDirection

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

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

getSpreadAngle

public double getSpreadAngle()
Gets the spread angle of this PickCone.

Returns:
the spread angle.

getRadius

double getRadius(double distance)
Gets the radius of this PickCone at the specified distance.

Parameters:
distance - the distance from the origin at which we want the radius of the cone
Returns:
the radius at the specified distance

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

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.