public final class Plane extends GeomPlane implements javolution.lang.ValueType
Modified by: Joseph A. Huwaldt
RESOURCES
Modifier and Type | Method and Description |
---|---|
Plane |
copy()
Returns a copy of this Plane instance
allocated by the calling thread
(possibly on the stack). |
Plane |
copyToReal()
Return a copy of this object with any transformations or subranges removed
(applied).
|
boolean |
equals(java.lang.Object obj)
Compares this Plane against the specified object for strict equality (same values
and same units).
|
static Plane |
fitPoints(java.util.List<? extends GeomPoint> points)
Return a
Plane instance that is fit through the input list of points
resulting in the least-squared orthogonal error between the points and the plane. |
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 ). |
GeomVector<Dimensionless> |
getNormal()
Return the normal vector for the plane.
|
int |
getPhyDimension()
Returns the number of physical dimensions of the geometry element.
|
Point |
getRefPoint()
Return the reference point for this plane.
|
Unit<Length> |
getUnit()
Returns the unit in which the geometry in this element are stated.
|
static Plane |
getXY()
Return a 3D plane that represents the XY plane through the origin.
|
static Plane |
getXZ()
Return a 3D plane that represents the XZ plane through the origin.
|
static Plane |
getYZ()
Returns a 3D plane that represents the YZ plane through the origin.
|
int |
hashCode()
Returns the hash code for this parameter.
|
Plane |
immutable()
Return an immutable version of this plane.
|
static void |
recycle(Plane instance)
Recycles a
Plane instance immediately (on the stack when executing in
a StackContext ). |
Plane |
to(Unit<Length> unit)
Returns the equivalent to this element but stated in the specified unit.
|
Plane |
toDimension(int newDim)
Return the equivalent of this plane converted to the specified number of physical
dimensions.
|
static Plane |
valueOf(double A,
double B,
double C,
Parameter<Length> D)
Returns a
Plane instance with the specified 3D plane equation values. |
static Plane |
valueOf(GeomPoint p,
GeomPoint q,
GeomPoint r)
Returns a
Plane instance that contains the specified 3 independent
points. |
static Plane |
valueOf(GeomTriangle tri)
Returns a
Plane instance that contains the specified triangle. |
static Plane |
valueOf(GeomVector<Dimensionless> normal,
Parameter<Length> constant)
Returns a
Plane instance with the specified normal vector and plane
equation constant. |
static Plane |
valueOf(GeomVector<Dimensionless> normal,
Point p)
Returns a
Plane instance with the specified normal vector and plane
equation constant. |
changeRefPoint, getBoundsMax, getBoundsMin, getClosest, getLimitPoint, getParDimension, getTransformed, intersect, intersect, intersect, isValid, size, toText
addChangeListener, clone, compareTo, getAllUserData, getID, getName, getUserData, putAllUserData, putUserData, removeChangeListener, removeUserData, reset, setName, toString
addChangeListener, getAllUserData, getID, getName, getUserData, putAllUserData, putUserData, removeChangeListener, removeUserData, setName
public static Plane getYZ()
public static Plane getXZ()
public static Plane getXY()
public static Plane valueOf(double A, double B, double C, Parameter<Length> D)
Plane
instance with the specified 3D plane equation values.
The plane equation is: A*x + B*y + C*z = D
.A
- The coefficient on the X axis term.B
- The coefficient on the Y axis term.C
- The coefficient on the Z axis term.D
- The constant term ((normal DOT p0) where p0 is a point in the plane). May
not be null.public static Plane valueOf(GeomVector<Dimensionless> normal, Parameter<Length> constant)
Plane
instance with the specified normal vector and plane
equation constant.normal
- The unit normal of the plane. May not be null.constant
- The constant term of the plane equation ((normal DOT p0) where p0
is a point in the plane). May not be null.DimensionException
- if the input normal vector is not at least 3
dimensional.public static Plane valueOf(GeomVector<Dimensionless> normal, Point p)
Plane
instance with the specified normal vector and plane
equation constant.normal
- The unit normal of the plane. May not be null.p
- A point in the plane (the reference point for the plane). May not be
null.DimensionException
- if the input normal vector is not at least 3
dimensional.public static Plane valueOf(GeomPoint p, GeomPoint q, GeomPoint r) throws DimensionException
Plane
instance that contains the specified 3 independent
points.p
- A point in the plane (not equal to one of the other two). May not be null.q
- A point in the plane (not equal to one of the other two). May not be null.r
- A point in the plane (not equal to one of the other two). May not be null.DimensionException
- if one of the input points does not have at least 3
physical dimensions.java.lang.IllegalArgumentException
- if any of the input points are equal to the
others.public static Plane valueOf(GeomTriangle tri) throws DimensionException
Plane
instance that contains the specified triangle.tri
- A triangle that defines the plane. May not be null.DimensionException
- if the input triangle does not have at least 3
physical dimensions.java.lang.IllegalArgumentException
- if the triangle is degenerate (has two vertices
equal to each other).public static Plane fitPoints(java.util.List<? extends GeomPoint> points)
Plane
instance that is fit through the input list of points
resulting in the least-squared orthogonal error between the points and the plane.points
- The list of points to fit a plane to.public static void recycle(Plane instance)
Plane
instance immediately (on the stack when executing in
a StackContext
).instance
- The instance to be recycled.public int getPhyDimension()
getPhyDimension
in interface GeomElement<GeomPlane>
public Plane toDimension(int newDim)
toDimension
in interface GeomElement<GeomPlane>
toDimension
in class GeomPlane
newDim
- The dimension of the plane to return.public GeomVector<Dimensionless> getNormal()
public Parameter<Length> getConstant()
A*x + B*y + C*z = D
).getConstant
in class GeomPlane
public Point getRefPoint()
getRefPoint
in class GeomPlane
public Unit<Length> getUnit()
getUnit
in interface GeomElement<GeomPlane>
public Plane to(Unit<Length> unit)
to
in interface GeomElement<GeomPlane>
unit
- the length unit of the element to be returned. May not be null.ConversionException
- if the the input unit is not a length unit.public Plane copy()
allocated
by the calling thread
(possibly on the stack).copy
in interface GeomElement<GeomPlane>
copy
in interface javolution.lang.ValueType
copy
in class GeomPlane
public Plane copyToReal()
copyToReal
in interface GeomElement<GeomPlane>
public boolean equals(java.lang.Object obj)
equals
in class AbstractGeomElement<GeomPlane>
obj
- the object to compare with.true
if this object is identical to that object;
false
otherwise.public int hashCode()
hashCode
in class AbstractGeomElement<GeomPlane>