public abstract class GeomPlane extends AbstractGeomElement<GeomPlane> implements Transformable<GeomPlane>
Modified by: Joseph A. Huwaldt
RESOURCES
Constructor and Description |
---|
GeomPlane() |
Modifier and Type | Method and Description |
---|---|
Plane |
changeRefPoint(GeomPoint p)
Return a new Plane that is identical to this plane, but with a different reference
point (the plane is shifted to pass through the specified point).
|
abstract GeomPlane |
copy()
Returns a copy of this GeomPlane instance
allocated by the calling thread
(possibly on the stack). |
Point |
getBoundsMax()
Return the coordinate point representing the maximum bounding box corner (e.g.: max
X, max Y, max Z).
|
Point |
getBoundsMin()
Return the coordinate point representing the minimum bounding box corner (e.g.: min
X, min Y, min Z).
|
Point |
getClosest(GeomPoint p)
Return the closest point on this plane to the input point.
|
abstract Parameter<Length> |
getConstant()
Return the constant term of the plane equation (e.g.: "D" for a 3D plane:
A*x + B*y + C*z = D ). |
GeomPoint |
getLimitPoint(int dim,
boolean max,
double tol)
Returns the most extreme point, either minimum or maximum, in the specified
coordinate direction on this geometry element.
|
abstract GeomVector<Dimensionless> |
getNormal()
Return the normal vector for the plane.
|
int |
getParDimension()
Returns the number of parametric dimensions of the geometry element.
|
abstract GeomPoint |
getRefPoint()
Return the reference point for this plane.
|
GeomPlaneTrans |
getTransformed(GTransform transform)
Returns transformed version of this element.
|
abstract Plane |
immutable()
Return an immutable version of this plane.
|
PointString |
intersect(Curve curve,
double tol)
Return the intersection between a curve and this plane.
|
IntersectType |
intersect(GeomPoint L0,
GeomVector Lu,
MutablePoint out)
Return the intersection between an infinite line/ray and this plane.
|
PointString<SubrangePoint> |
intersect(LineSegment line)
Return the intersection between a line segment and this plane.
|
boolean |
isValid()
Return
true if this GeomPlane contains valid and finite numerical
components. |
int |
size()
Returns the number of child-elements that make up this geometry element.
|
abstract GeomPlane |
toDimension(int newDim)
Return a copy of this plane converted to the specified number of physical
dimensions.
|
javolution.text.Text |
toText()
Returns the text representation of this geometry element that consists of the name
followed by the equation of a plane.
|
addChangeListener, clone, compareTo, equals, getAllUserData, getID, getName, getUserData, hashCode, putAllUserData, putUserData, removeChangeListener, removeUserData, reset, setName, toString
addChangeListener, copyToReal, getAllUserData, getID, getName, getPhyDimension, getUnit, getUserData, putAllUserData, putUserData, removeChangeListener, removeUserData, setName, to
public GeomPlane()
public abstract Plane immutable()
public int size()
size
in interface GeomElement<GeomPlane>
public int getParDimension()
getParDimension
in interface GeomElement<GeomPlane>
public abstract GeomVector<Dimensionless> getNormal()
public abstract Parameter<Length> getConstant()
A*x + B*y + C*z = D
).public abstract GeomPoint getRefPoint()
public abstract GeomPlane toDimension(int newDim)
toDimension
in interface GeomElement<GeomPlane>
newDim
- The dimension of the plane to return.public Plane changeRefPoint(GeomPoint p)
p
- The new reference point that the plane should pass through. May not be null.public Point getBoundsMin()
getBoundsMin
in interface GeomElement<GeomPlane>
public Point getBoundsMax()
getBoundsMax
in interface GeomElement<GeomPlane>
public GeomPoint getLimitPoint(int dim, boolean max, double tol)
getLimitPoint
in interface GeomElement<GeomPlane>
dim
- An index indicating the dimension to find the min/max point for (0=X,
1=Y, 2=Z, etc).max
- Set to true
to return the maximum value, false
to return the minimum.tol
- Fractional tolerance to refine the min/max point position to if
necessary.getBoundsMin()
,
getBoundsMax()
public Point getClosest(GeomPoint p)
p
- The point to find the closest point on this plane to. May not be null.public PointString intersect(Curve curve, double tol)
curve
- The curve to intersect with this plane. May not be null.tol
- Fractional tolerance (in parameter space) to refine the point
positions to.public IntersectType intersect(GeomPoint L0, GeomVector Lu, MutablePoint out) throws DimensionException
L0
- A point on the line (origin of the line). May not be null.Lu
- The direction vector for the line (does not have to be a unit vector).
May not be null.out
- The pre-defined output point on the line that will be filled in to
represent the intersection of the line and the plane (not modified if
there is no intersection). If null
is passed, then the
point is not calculated, but the return codes of this method are still
valid.DimensionException
public PointString<SubrangePoint> intersect(LineSegment line) throws DimensionException
line
- The line segment to intersect with this plane. May not be null.DimensionException
public abstract GeomPlane copy()
allocated
by the calling thread
(possibly on the stack).copy
in interface GeomElement<GeomPlane>
public boolean isValid()
true
if this GeomPlane contains valid and finite numerical
components. A value of false
will be returned if any of the coordinate
values are NaN or Inf.isValid
in interface GeomElement<GeomPlane>
public GeomPlaneTrans getTransformed(GTransform transform)
GeomTransform
and contains this element as a child.getTransformed
in interface Transformable<GeomPlane>
transform
- The transformation to apply to this geometry. May not be null.DimensionException
- if this plane is not 3D.public javolution.text.Text toText()
{aPlane = {1, 0, 0, 2 ft}}If there is no name, then the output looks like this:
{1, 0, 0, 2 ft}
toText
in interface GeomElement<GeomPlane>
toText
in class AbstractGeomElement<GeomPlane>