public class StraightLine3D extends Object implements ContinuousCurve3D
Shape3D.EmptySet3D| Modifier and Type | Field and Description |
|---|---|
protected Point3D |
origin |
protected Vector3D |
vector |
protected Vector3D |
vectorInverse |
ACCURACY, ACCURACY_INVERSE, EMPTY_SET| Constructor and Description |
|---|
StraightLine3D() |
StraightLine3D(double x0,
double y0,
double z0,
double dx,
double dy,
double dz) |
StraightLine3D(Point3D p1,
Point3D p2)
Constructs a line passing through the 2 points.
|
StraightLine3D(Point3D origin,
Vector3D vector) |
| Modifier and Type | Method and Description |
|---|---|
Shape3D |
clip(Box3D box) |
boolean |
contains(Point3D point) |
Box3D |
getBoundingBox() |
Collection<StraightLine3D> |
getContinuousCurves()
Returns the collection of continuous curves which constitute this curve.
|
double |
getDistance(Point3D p)
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 |
getExamplePoint1() |
Point3D |
getExamplePoint2() |
Point3D |
getFirstPoint()
Get the first point of the curve.
|
Point3D |
getLastPoint()
Get the last point of the curve.
|
Point3D |
getOrigin() |
Point3D |
getPlaneIntersection(Plane3D plane)
Compute intersection with a plane.
|
double |
getPlaneIntersectionParametric(Plane3D plane)
Compute intersection with a plane
|
Point3D |
getPoint(double t)
Gets the point from a parametric representation of the curve.
|
Point3D |
getPoint(double t,
Point3D point)
Deprecated.
Point3D shall be immutable
|
double |
getPosition(Point3D point)
Get position of the point on the curve.
|
StraightLine3D |
getReverseCurve()
Returns the curve with same trace on the plane with parametrization in
reverse order.
|
Collection<Point3D> |
getSingularPoints()
Returns an empty array of Point3D.
|
Curve3D |
getSubCurve(double t0,
double t1)
Returns a portion of the original curve, delimited by two positions on
the curve.
|
double |
getT0()
Returns -INFINITY;
|
double |
getT1()
Returns +INFINITY;
|
Vector3D |
getVector() |
Vector3D |
getVectorInverse() |
boolean |
isBounded()
Returns true if the shape is bounded, that is if we can draw a finite
rectangle enclosing the shape.
|
boolean |
isEmpty() |
StraightLine3D |
project(Plane3D plane) |
double |
project(Point3D point)
Compute the position of the orthogonal projection of the given point on
this line.
|
Point3D |
projectPoint(Point3D point) |
StraightLine3D |
transform(AffineTransform3D trans)
Transforms the curve by an affine transform.
|
protected Point3D origin
protected Vector3D vector
protected transient Vector3D vectorInverse
public StraightLine3D()
public StraightLine3D(Point3D p1, Point3D p2)
p1 - the first pointp2 - the second pointpublic StraightLine3D(double x0,
double y0,
double z0,
double dx,
double dy,
double dz)
public Point3D getOrigin()
public Point3D getExamplePoint1()
public Point3D getExamplePoint2()
public Vector3D getVector()
public Vector3D getVectorInverse()
public StraightLine3D project(Plane3D plane)
public boolean isBounded()
Shape3Dpublic Box3D getBoundingBox()
getBoundingBox in interface Shape3Dpublic double getDistance(Point3D p)
Shape3DgetDistance in interface Shape3Dpublic StraightLine3D transform(AffineTransform3D trans)
Curve3Dpublic Point3D getFirstPoint()
Curve3DgetPoint(getT0()).getFirstPoint in interface Curve3Dpublic Point3D getLastPoint()
Curve3DgetPoint(getT1()).getLastPoint in interface Curve3Dpublic Point3D getPoint(double t)
Curve3D@Deprecated public Point3D getPoint(double t, Point3D point)
Curve3Dpublic double getPosition(Point3D point)
Curve3DgetPosition in interface Curve3Dpoint - a point belonging to the curvepublic StraightLine3D getReverseCurve()
Curve3DgetReverseCurve in interface Curve3Dpublic Collection<Point3D> getSingularPoints()
getSingularPoints in interface Curve3Dpublic Curve3D getSubCurve(double t0, double t1)
Curve3DgetSubCurve in interface Curve3Dt0 - position of the start of the sub-curvet1 - position of the end of the sub-curvepublic double project(Point3D point)
public double getPlaneIntersectionParametric(Plane3D plane)
plane - plane to compute intersection withpublic Point3D getPlaneIntersection(Plane3D plane)
plane - plane to compute intersection withpublic Collection<StraightLine3D> getContinuousCurves()
Curve3DgetContinuousCurves in interface Curve3DCopyright © 2018 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All rights reserved.