javax.media.j3d
Class PickSegment

java.lang.Object
  extended by javax.media.j3d.PickShape
      extended by javax.media.j3d.PickSegment

public final class PickSegment
extends PickShape

PickSegment is a line segment pick shape. It can be used as an argument to the picking methods in BranchGroup and Locale.

See Also:
BranchGroup.pickAll(javax.media.j3d.PickShape), Locale.pickAll(javax.media.j3d.PickShape)

Field Summary
(package private)  Point3d end
           
(package private)  Point3d start
           
 
Fields inherited from class javax.media.j3d.PickShape
PICKBOUNDINGBOX, PICKBOUNDINGPOLYTOPE, PICKBOUNDINGSPHERE, PICKCONE, PICKCYLINDER, PICKPOINT, PICKRAY, PICKSEGMENT, PICKUNKNOWN
 
Constructor Summary
PickSegment()
          Constructs an empty PickSegment.
PickSegment(Point3d start, Point3d end)
          Constructs a line segment pick shape from the specified parameters.
 
Method Summary
 void get(Point3d start, Point3d end)
          Gets the parameters from this PickSegment.
(package private)  int getPickType()
           
(package private)  Point3d getStartPoint()
           
(package private)  boolean intersect(Bounds bounds, Point4d pickPos)
          Return true if shape intersect with bounds.
 void set(Point3d start, Point3d end)
          Sets the parameters of this PickSegment to the specified values.
(package private)  PickShape transform(Transform3D t3d)
           
 
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

start

Point3d start

end

Point3d end
Constructor Detail

PickSegment

public PickSegment()
Constructs an empty PickSegment. The start and end points of the line segment are initialized to (0,0,0).


PickSegment

public PickSegment(Point3d start,
                   Point3d end)
Constructs a line segment pick shape from the specified parameters.

Parameters:
start - the start point of the line segment.
end - the end point of the line segment.
Method Detail

set

public void set(Point3d start,
                Point3d end)
Sets the parameters of this PickSegment to the specified values.

Parameters:
start - the start point of the line segment.
end - the end point of the line segment.

get

public void get(Point3d start,
                Point3d end)
Gets the parameters from this PickSegment.

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

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 PickShape

transform

PickShape transform(Transform3D t3d)
Specified by:
transform 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.