Package geomss.geom
Class GeomPlaneTrans
- java.lang.Object
-
- geomss.geom.AbstractGeomElement<GeomPlane>
-
- geomss.geom.GeomPlane
-
- geomss.geom.GeomPlaneTrans
-
- All Implemented Interfaces:
GeomElement<GeomPlane>,GeomTransform<GeomPlane>,Transformable<GeomPlane>,java.io.Serializable,java.lang.Cloneable,java.lang.Comparable,javolution.lang.Reusable,javolution.xml.XMLSerializable
public final class GeomPlaneTrans extends GeomPlane implements GeomTransform<GeomPlane>
AGeomTransformelement that refers to aGeomPlaneobject and masquerades as a GeomPlane object itself.Modified by: Joseph A. Huwaldt
- Version:
- September 13, 2016
- Author:
- Joseph A. Huwaldt, Date: June 14, 2009
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class geomss.geom.AbstractGeomElement
RESOURCES
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GeomPlaneTranscopy()Returns a copy of this GeomPlaneTrans instanceallocatedby the calling thread (possibly on the stack).PlanecopyToReal()Return a copy of the child object transformed by this transformation.booleanequals(java.lang.Object obj)Compares this GeomPlaneTrans against the specified object for strict equality (same values and same units).GeomPlanegetChild()Returns the child object transformed by this transform element.Parameter<javax.measure.quantity.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<javax.measure.quantity.Dimensionless>getNormal()Return the normal vector for the plane.intgetPhyDimension()Returns the number of physical dimensions of the geometry element.GeomPointTransgetRefPoint()Return the reference point for this plane.GTransformgetTotalTransform()Returns the total transformation represented by an entire chain of GeomTransform objects below this one.GTransformgetTransform()Returns the transformation represented by this transformation element.javax.measure.unit.Unit<javax.measure.quantity.Length>getUnit()Returns the unit in which the geometry in this element are stated.inthashCode()Returns the hash code for this object.Planeimmutable()Return an immutable version of this plane.static GeomPlaneTransnewInstance(GeomPlane child, GTransform transform)static voidrecycle(GeomPlaneTrans instance)Recycles aGeomPlaneTransinstance immediately (on the stack when executing in aStackContext).voidsetTransform(GTransform transform)Sets the transformation represented by this transformation element.GeomPlaneto(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)Returns the equivalent to this element but stated in the specified unit.GeomPlaneTranstoDimension(int newDim)Return the equivalent of this plane converted to the specified number of physical dimensions.-
Methods inherited from class geomss.geom.GeomPlane
changeRefPoint, getBoundsMax, getBoundsMin, getClosest, getLimitPoint, getParDimension, getTransformed, intersect, intersect, intersect, isValid, size, toText
-
Methods inherited from class geomss.geom.AbstractGeomElement
addChangeListener, clone, compareTo, getAllUserData, getID, getName, getUserData, putAllUserData, putUserData, removeChangeListener, removeUserData, reset, setName, toString
-
Methods inherited from interface geomss.geom.GeomElement
addChangeListener, getAllUserData, getBoundsMax, getBoundsMin, getID, getLimitPoint, getName, getParDimension, getUserData, isValid, putAllUserData, putUserData, removeChangeListener, removeUserData, setName, size, toText
-
Methods inherited from interface geomss.geom.Transformable
getTransformed
-
-
-
-
Method Detail
-
newInstance
public static GeomPlaneTrans newInstance(GeomPlane child, GTransform transform)
- Parameters:
child- The plane that is the child of this transform element (may not benull).transform- The transform held by this transform element (may not benull).- Returns:
- the transform element having the specified values.
- Throws:
DimensionException- if the input element is not 3D.
-
getTransform
public GTransform getTransform()
Returns the transformation represented by this transformation element.- Specified by:
getTransformin interfaceGeomTransform<GeomPlane>- Returns:
- The transformation represented by this transformation element.
-
getTotalTransform
public GTransform getTotalTransform()
Returns the total transformation represented by an entire chain of GeomTransform objects below this one.- Specified by:
getTotalTransformin interfaceGeomTransform<GeomPlane>- Returns:
- The total transformation represented by an entire chain of GeomTransform objects below this one.
-
setTransform
public void setTransform(GTransform transform)
Sets the transformation represented by this transformation element.- Specified by:
setTransformin interfaceGeomTransform<GeomPlane>- Parameters:
transform- The transform to set this transform element to (may not benull).
-
getChild
public GeomPlane getChild()
Returns the child object transformed by this transform element.- Specified by:
getChildin interfaceGeomTransform<GeomPlane>- Returns:
- The child object transformed by this transform element.
-
copyToReal
public Plane copyToReal()
Return a copy of the child object transformed by this transformation.- Specified by:
copyToRealin interfaceGeomElement<GeomPlane>- Specified by:
copyToRealin interfaceGeomTransform<GeomPlane>- Returns:
- A copy of the child object transformed by this transformation.
-
recycle
public static void recycle(GeomPlaneTrans instance)
Recycles aGeomPlaneTransinstance immediately (on the stack when executing in aStackContext).- Parameters:
instance- The instance to be recycled.
-
getPhyDimension
public int getPhyDimension()
Returns the number of physical dimensions of the geometry element. This implementation always returns 3.- Specified by:
getPhyDimensionin interfaceGeomElement<GeomPlane>- Returns:
- The number of physical dimensions of this geometry element.
-
getNormal
public GeomVector<javax.measure.quantity.Dimensionless> getNormal()
Return the normal vector for the plane. The normal vector is a unit vector that is perpendicular to the plane.
-
getConstant
public Parameter<javax.measure.quantity.Length> getConstant()
Return the constant term of the plane equation (e.g.: "D" for a 3D plane:A*x + B*y + C*z = D).- Specified by:
getConstantin classGeomPlane- Returns:
- The constant term of the plane equation for this plane.
-
getRefPoint
public GeomPointTrans getRefPoint()
Return the reference point for this plane. The reference point is an arbitrary point that is contained in the plane and is used as a reference when drawing the plane.- Specified by:
getRefPointin classGeomPlane- Returns:
- The reference point for this plane.
-
toDimension
public GeomPlaneTrans toDimension(int newDim)
Return the equivalent of this plane converted to the specified number of physical dimensions. This implementation will throw an exception if the specified dimension is anything other than 3.- Specified by:
toDimensionin interfaceGeomElement<GeomPlane>- Specified by:
toDimensionin classGeomPlane- Parameters:
newDim- The dimension of the plane to return. MUST equal 3.- Returns:
- The equivalent of this plane converted to the new dimensions.
- Throws:
java.lang.IllegalArgumentException- if the new dimension is anything other than 3.
-
getUnit
public javax.measure.unit.Unit<javax.measure.quantity.Length> getUnit()
Returns the unit in which the geometry in this element are stated.- Specified by:
getUnitin interfaceGeomElement<GeomPlane>- Returns:
- The unit in which the geometry in this element are stated.
-
to
public GeomPlane to(javax.measure.unit.Unit<javax.measure.quantity.Length> unit) throws javax.measure.converter.ConversionException
Returns the equivalent to this element but stated in the specified unit.WARNING: If the unit changes, then the returned transform element DOES NOT refer back to the original plane (the link with the original plane is broken).
- Specified by:
toin interfaceGeomElement<GeomPlane>- Parameters:
unit- the length unit of the element to be returned. May not be null.- Returns:
- an equivalent to this element but stated in the specified unit.
- Throws:
javax.measure.converter.ConversionException- if the the input unit is not a length unit.
-
equals
public boolean equals(java.lang.Object obj)
Compares this GeomPlaneTrans against the specified object for strict equality (same values and same units).- Overrides:
equalsin classAbstractGeomElement<GeomPlane>- Parameters:
obj- the object to compare with.- Returns:
trueif this point is identical to that point;falseotherwise.
-
hashCode
public int hashCode()
Returns the hash code for this object.- Overrides:
hashCodein classAbstractGeomElement<GeomPlane>- Returns:
- the hash code value.
-
copy
public GeomPlaneTrans copy()
Returns a copy of this GeomPlaneTrans instanceallocatedby the calling thread (possibly on the stack).- Specified by:
copyin interfaceGeomElement<GeomPlane>- Specified by:
copyin classGeomPlane- Returns:
- an identical and independent copy of this object.
-
-