public class StraightLine3D extends Object implements ContinuousCurve3D
Shape3D.EmptySet3D
Modifier and Type | Field and Description |
---|---|
protected double |
dx |
protected double |
dy |
protected double |
dz |
protected double |
x0 |
protected double |
y0 |
protected double |
z0 |
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 direction) |
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.
|
Vector3D |
getDirection() |
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 |
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)
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;
|
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 double x0
protected double y0
protected double z0
protected double dx
protected double dy
protected double dz
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 getDirection()
public StraightLine3D project(Plane3D plane)
public boolean isBounded()
Shape3D
public Box3D getBoundingBox()
getBoundingBox
in interface Shape3D
public double getDistance(Point3D p)
Shape3D
getDistance
in interface Shape3D
public StraightLine3D transform(AffineTransform3D trans)
Curve3D
public Point3D getFirstPoint()
Curve3D
getPoint(getT0())
.getFirstPoint
in interface Curve3D
public Point3D getLastPoint()
Curve3D
getPoint(getT1())
.getLastPoint
in interface Curve3D
public Point3D getPoint(double t)
Curve3D
public Point3D getPoint(double t, Point3D point)
Curve3D
public double getPosition(Point3D point)
Curve3D
getPosition
in interface Curve3D
point
- a point belonging to the curvepublic StraightLine3D getReverseCurve()
Curve3D
getReverseCurve
in interface Curve3D
public Collection<Point3D> getSingularPoints()
getSingularPoints
in interface Curve3D
public Curve3D getSubCurve(double t0, double t1)
Curve3D
getSubCurve
in interface Curve3D
t0
- position of the start of the sub-curvet1
- position of the end of the sub-curvepublic double project(Point3D point)
public Collection<StraightLine3D> getContinuousCurves()
Curve3D
getContinuousCurves
in interface Curve3D
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.