|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ProGAL.geom3d.volumes.LSS
public class LSS
A line-segment swept sphere (also known as a line-swept-sphere, capsule or sometimes 'cigar') class. The LSS is represented by a line-segment and a radius, and is a cylinder capped with hemispheres. Distance calculations (and thereby collision checks) can be performed very fast, but finding the minimum capsule bounding a set of points can be somewhat time-consuming and no well-documented methods exist for doing this. For a heuristic see [Ericsson 05].
Field Summary | |
---|---|
double |
rad
|
LineSegment |
segment
|
Constructor Summary | |
---|---|
LSS(LineSegment segment,
double r)
Construct a capsule using a line-segment and a radius (used both for hemispheres and cylinder shape). |
|
LSS(Point p1,
Point p2,
double r)
Construct a capsule using two endpoints (center of hemispheres) and a radius (used both for hemispheres and cylinder shape). |
Method Summary | |
---|---|
LSS |
clone()
Make a deep clone this volume. |
double |
closestSegmentPoint(LSS capsule)
|
boolean |
contains(Point p)
|
static LSS |
createBoundingLSS_covariance(PointList points)
|
static LSS |
createBoundingLSS_MaxDist(LSS v1,
LSS v2)
|
static LSS |
createBoundingLSS(PointList points)
|
double |
distanceToPoint(Point point)
|
Point |
getCenter()
Get the geometric center of the shape. |
double |
getVolume()
Get the volume. |
boolean |
overlaps(LSS capsule)
|
boolean |
overlaps(Volume vol)
Determine if this volume overlaps vol. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public LineSegment segment
public double rad
Constructor Detail |
---|
public LSS(Point p1, Point p2, double r)
public LSS(LineSegment segment, double r)
Method Detail |
---|
public static LSS createBoundingLSS(PointList points)
public static LSS createBoundingLSS_covariance(PointList points)
public static LSS createBoundingLSS_MaxDist(LSS v1, LSS v2)
public double distanceToPoint(Point point)
public boolean overlaps(LSS capsule)
public double closestSegmentPoint(LSS capsule)
public boolean overlaps(Volume vol)
Volume
overlaps
in interface Volume
public boolean contains(Point p)
public double getVolume()
Volume
getVolume
in interface Volume
public LSS clone()
Volume
clone
in interface Volume
clone
in class java.lang.Object
public Point getCenter()
Shape
getCenter
in interface Shape
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |