|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectmath.geom3d.line.LineSegment3D
public class LineSegment3D
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface math.geom3d.Shape3D |
|---|
Shape3D.EmptySet3D |
| Field Summary | |
|---|---|
protected double |
x1
|
protected double |
x2
|
protected double |
y1
|
protected double |
y2
|
protected double |
z1
|
protected double |
z2
|
| Fields inherited from interface math.geom3d.Shape3D |
|---|
ACCURACY, EMPTY_SET |
| Constructor Summary | |
|---|---|
LineSegment3D(Point3D p1,
Point3D p2)
|
|
| Method Summary | |
|---|---|
Shape3D |
clip(Box3D box)
|
boolean |
contains(Point3D point)
|
Box3D |
getBoundingBox()
|
Collection<LineSegment3D> |
getContinuousCurves()
Returns the collection of continuous curves which constitute this curve. |
double |
getDistance(LineSegment3D segment)
Returns distance of this segment from 'segment'. |
double |
getDistance(Point3D point)
Gets the distance of the shape to the given point, or the distance of point to the frontier of the shape in the case of a plain shape. |
Point3D |
getFirstPoint()
Get the first point of the curve. |
Point3D |
getLastPoint()
Get the last point of the curve. |
Point3D |
getPoint(double t)
Gets the point from a parametric representation of the curve. |
Point3D |
getPoint(double t,
Point3D point)
Same as getPoint(t), but gives the point as a parameter. |
double |
getPosition(Point3D point)
If point does not project on the line segment, return Double.NaN. |
Curve3D |
getReverseCurve()
Returns the curve with same trace on the plane with parametrization in reverse order. |
Collection<Point3D> |
getSingularPoints()
Returns the2 end points. |
LineSegment3D |
getSubCurve(double t0,
double t1)
Returns a portion of the original curve, delimited by two positions on the curve. |
StraightLine3D |
getSupportingLine()
|
double |
getT0()
Return 0, by definition of LineSegment. |
double |
getT1()
Return 1, by definition of LineSegment. |
boolean |
isBounded()
Returns true, as a LineSegment3D is always bounded. |
boolean |
isEmpty()
Returns false, as a LineSegment3D is never empty. |
double |
project(Point3D point)
Returns the position of the closest orthogonal projection of the point on the curve, or of the closest singular point. |
Point3D |
projectPoint(Point3D point)
|
Curve3D |
transform(AffineTransform3D trans)
Transforms the curve by an affine transform. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double x1
protected double y1
protected double z1
protected double x2
protected double y2
protected double z2
| Constructor Detail |
|---|
public LineSegment3D(Point3D p1,
Point3D p2)
| Method Detail |
|---|
public StraightLine3D getSupportingLine()
public Point3D projectPoint(Point3D point)
public Collection<LineSegment3D> getContinuousCurves()
Curve3D
getContinuousCurves in interface Curve3Dpublic Point3D getFirstPoint()
Curve3DgetPoint(getT0()).
getFirstPoint in interface Curve3Dpublic Point3D getLastPoint()
Curve3DgetPoint(getT1()).
getLastPoint in interface Curve3Dpublic Point3D getPoint(double t)
Curve3D
getPoint in interface Curve3D
public Point3D getPoint(double t,
Point3D point)
Curve3D
getPoint in interface Curve3Dpublic double getPosition(Point3D point)
getPosition in interface Curve3Dpoint - a point belonging to the curve
Curve3D.getPosition(math.geom3d.Point3D)public Curve3D getReverseCurve()
Curve3D
getReverseCurve in interface Curve3Dpublic Collection<Point3D> getSingularPoints()
getSingularPoints in interface Curve3DCurve3D.getSingularPoints()
public LineSegment3D getSubCurve(double t0,
double t1)
Curve3D
getSubCurve in interface Curve3Dt0 - position of the start of the sub-curvet1 - position of the end of the sub-curve
public double getT0()
getT0 in interface Curve3DCurve3D.getT0()public double getT1()
getT1 in interface Curve3DCurve3D.getT1()public double project(Point3D point)
Curve3D
project in interface Curve3Dpoint - a point to project
public Curve3D transform(AffineTransform3D trans)
Curve3D
transform in interface Curve3Dtransform in interface Shape3Dpublic Shape3D clip(Box3D box)
clip in interface Shape3Dpublic boolean contains(Point3D point)
contains in interface Shape3Dpublic Box3D getBoundingBox()
getBoundingBox in interface Shape3Dpublic double getDistance(Point3D point)
Shape3D
getDistance in interface Shape3Dpublic double getDistance(LineSegment3D segment)
Based on: http://softsurfer.com/Archive/algorithm_0106/
dist3D_Segment_to_Segment()
segment -
public boolean isBounded()
isBounded in interface Shape3DShape3D.isBounded()public boolean isEmpty()
isEmpty in interface Shape3DShape3D.isEmpty()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||