|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--drasys.or.geom.rect3.Rect3 | +--drasys.or.geom.rect3.LineSegment
An implementation of a line segment in the 3D rectangular coordinate system. This lineSegment is a container object, it hold the points that define the ends of the line segment. The points must be objects that implement the PointI interface and have immutable coordinates.
Constructor Summary | |
LineSegment(double x1,
double y1,
double z1,
double x2,
double y2,
double z2)
|
|
LineSegment(PointI from,
PointI to)
|
Method Summary | |
PointI |
centroid()
|
double |
distanceProxyTo(PointI point)
Returns an easily computable proxy that can be used to compare the distance from this line segment to the point argument. |
double |
distanceTo(PointI point)
Returns the distance from this line segment to the point argument. |
boolean |
equals(java.lang.Object o)
Returns true if the two corresponding points in each line segment are equal. |
PointI |
from()
Returns the from point of the line segment. |
PointI |
getPoint1()
Returns the from point of the line segment. |
PointI |
getPoint2()
Returns the to point of the line segment. |
int |
hashCode()
|
double |
length()
Returns the length of the line segment. |
PointI |
nearestPointTo(PointI point)
Returns the point along the segment that is closest to the argument. |
PointI |
point1()
|
PointI |
point2()
|
RangeI |
range()
|
PointI |
to()
Returns the to point of the line segment. |
java.lang.String |
toString()
|
double |
x1()
|
double |
x2()
|
double |
y1()
|
double |
y2()
|
double |
z1()
|
double |
z2()
|
Methods inherited from class drasys.or.geom.rect3.Rect3 |
coordinateSystem,
getCentroid,
getDistanceProxyTo,
getDistanceTo,
getNearestPointTo,
getRange |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public LineSegment(double x1, double y1, double z1, double x2, double y2, double z2)
public LineSegment(PointI from, PointI to)
Method Detail |
public PointI getPoint1()
public PointI getPoint2()
public PointI point1()
public PointI point2()
public double x1()
public double y1()
public double z1()
public double x2()
public double y2()
public double z2()
public PointI from()
public PointI to()
public RangeI range()
public PointI centroid()
public PointI nearestPointTo(PointI point)
public double distanceTo(PointI point)
public double distanceProxyTo(PointI point)
public double length()
public int hashCode()
public boolean equals(java.lang.Object o)
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |