public final class TriangleTrans extends GeomTriangle implements GeomTransform<GeomTriangle>
GeomTransform
object that refers to a Triangle
object
and masquerades as a Triangle object itself.
Modified by: Joseph A. Huwaldt
RESOURCES
Modifier and Type | Method and Description |
---|---|
TriangleTrans |
copy()
Returns a copy of this TriangleTrans instance allocated by the calling
thread (possibly on the stack).
|
Triangle |
copyToReal()
Return a copy of the child object transformed by this transformation.
|
boolean |
equals(java.lang.Object obj)
Compares this TriangleTrans against the specified object for strict
equality.
|
Parameter<Area> |
getArea()
Return the surface area of one side of this triangle.
|
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
of this geometry element (e.g.: min X, min Y, min Z).
|
GeomTriangle |
getChild()
Returns the child object transformed by this transform element.
|
VectorTrans<Dimensionless> |
getNormal()
Return the surface unit normal vector for this triangle.
|
GeomPoint |
getP1()
Return the first vertex in this triangle.
|
GeomPoint |
getP2()
Return the second vertex in this triangle.
|
GeomPoint |
getP3()
Return the third and last vertex in this triangle.
|
int |
getPhyDimension()
Returns the number of physical dimensions of the geometry element.
|
GTransform |
getTotalTransform()
Returns the total transformation represented by an entire chain of
GeomTransform objects below this one.
|
GTransform |
getTransform()
Returns the transformation represented by this transformation element.
|
TriangleTrans |
getTransformed(GTransform transform)
Returns transformed version of this element.
|
Unit<Length> |
getUnit()
Returns the unit in which this triangle is stated.
|
int |
hashCode()
Returns the hash code for this parameter.
|
static TriangleTrans |
newInstance(GeomTriangle child,
GTransform transform)
|
static void |
recycle(TriangleTrans instance)
Recycles a
TriangleTrans instance immediately (on the stack
when executing in a StackContext). |
TriangleTrans |
reverse()
Return a new triangle that is identical to this one, but with the order
of the points (and the surface normal direction) reversed.
|
void |
setTransform(GTransform transform)
Sets the transformation represented by this transformation element.
|
TriangleTrans |
to(Unit<Length> unit)
Returns the equivalent to this element but stated in the specified unit.
|
TriangleTrans |
toDimension(int newDim)
Return a copy of this Triangle converted to the specified number of
physical dimensions.
|
getAll, getLimitPoint, getNumberOfPoints, getParDimension, getPoints, getPoints, isDegenerate, isValid, reset, size, toText
addChangeListener, clone, compareTo, getAllUserData, getID, getName, getUserData, putAllUserData, putUserData, removeChangeListener, removeUserData, setName, toString
addChangeListener, getAllUserData, getID, getLimitPoint, getName, getParDimension, getUserData, isValid, putAllUserData, putUserData, removeChangeListener, removeUserData, setName, size, toText
public static TriangleTrans newInstance(GeomTriangle child, GTransform transform)
child
- The GeomTriangle that is the child of this transform element (may
not be null
).transform
- The transform held by this transform element (may not be
null
).public GTransform getTransform()
getTransform
in interface GeomTransform<GeomTriangle>
public GTransform getTotalTransform()
getTotalTransform
in interface GeomTransform<GeomTriangle>
public void setTransform(GTransform transform)
setTransform
in interface GeomTransform<GeomTriangle>
transform
- The transform to set this transform element to (may not
be null
).public GeomTriangle getChild()
getChild
in interface GeomTransform<GeomTriangle>
public Triangle copyToReal()
copyToReal
in interface GeomElement<GeomTriangle>
copyToReal
in interface GeomTransform<GeomTriangle>
public GeomPoint getP1()
getP1
in class GeomTriangle
public GeomPoint getP2()
getP2
in class GeomTriangle
public GeomPoint getP3()
getP3
in class GeomTriangle
public VectorTrans<Dimensionless> getNormal()
getNormal
in class GeomTriangle
public Parameter<Area> getArea()
getArea
in class GeomTriangle
public int getPhyDimension()
getPhyDimension
in interface GeomElement<GeomTriangle>
getPhyDimension
in class GeomTriangle
public TriangleTrans reverse()
reverse
in class GeomTriangle
public Point getBoundsMin()
getBoundsMin
in interface GeomElement<GeomTriangle>
java.lang.IndexOutOfBoundsException
- if this list contains no elements.public Point getBoundsMax()
getBoundsMax
in interface GeomElement<GeomTriangle>
java.lang.IndexOutOfBoundsException
- if this list contains no elements.public TriangleTrans getTransformed(GTransform transform)
GeomTransform
and contains this element as a child.getTransformed
in interface Transformable<GeomTriangle>
transform
- The transformation to apply to this geometry. May not be null.DimensionException
- if this point is not 3D.public Unit<Length> getUnit()
getUnit
in interface GeomElement<GeomTriangle>
getUnit
in class GeomTriangle
public TriangleTrans to(Unit<Length> unit) throws ConversionException
to
in interface GeomElement<GeomTriangle>
to
in interface PointGeometry<GeomTriangle>
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 TriangleTrans toDimension(int newDim)
toDimension
in interface GeomElement<GeomTriangle>
newDim
- The dimension of the Triangle to return.java.lang.IllegalArgumentException
- if the new dimension is anything other
than 3.public TriangleTrans copy()
copy
in interface GeomElement<GeomTriangle>
public boolean equals(java.lang.Object obj)
equals
in class AbstractGeomElement<GeomTriangle>
obj
- the object to compare with.true
if this transform is identical to that
transform; false
otherwise.public int hashCode()
hashCode
in class AbstractGeomElement<GeomTriangle>
public static void recycle(TriangleTrans instance)
TriangleTrans
instance immediately (on the stack
when executing in a StackContext).instance
- The instance to recycle immediately.