public final class LineSegTrans extends LineSegment implements GeomTransform<LineSegment>
GeomTransform
object that refers to a LineSegment
object
and masquerades as a LineSegment object itself.
Modified by: Joseph A. Huwaldt
GTOL
RESOURCES
Modifier and Type | Method and Description |
---|---|
LineSegTrans |
copy()
Returns a copy of this LineSegTrans instance allocated by the calling
thread (possibly on the stack).
|
LineSegment |
copyToReal()
Return a copy of the child object transformed by this transformation.
|
boolean |
equals(java.lang.Object obj)
Compares this LineSegTrans against the specified object for strict
equality.
|
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).
|
LineSegment |
getChild()
Returns the child object transformed by this transform element.
|
GeomVector<Length> |
getDerivativeVector()
Return the dimensional derivative vector for this line segment.
|
GeomPoint |
getEnd()
Return the end point of the line segment.
|
int |
getPhyDimension()
Returns the number of physical dimensions of the geometry element.
|
Point |
getRealPoint(double s)
Calculate a point on the curve for the given parametric distance along
the curve,
p(s) . |
java.util.List<Vector<Length>> |
getSDerivatives(double s,
int grade)
Calculate all the derivatives from
0 to grade
with respect to parametric distance on the curve for the given parametric
distance along the curve, d^{grade}p(s)/d^{grade}s . |
GeomPoint |
getStart()
Return the starting point of the line segment.
|
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.
|
LineSegTrans |
getTransformed(GTransform transform)
Returns transformed version of this element.
|
Unit<Length> |
getUnit()
Returns the unit in which this curve is stated.
|
GeomVector<Dimensionless> |
getUnitVector()
Get unit direction vector for the line segment.
|
int |
hashCode()
Returns the hash code for this parameter.
|
static LineSegTrans |
newInstance(LineSegment child,
GTransform transform)
|
static void |
recycle(LineSegTrans instance)
Recycles a
LineSegTrans instance immediately (on the stack
when executing in a StackContext). |
LineSegTrans |
reverse()
Return a new curve that is identical to this one, but with the
parameterization reversed.
|
void |
setTransform(GTransform transform)
Sets the transformation represented by this transformation element.
|
int |
size()
Returns the number of child-elements that make up this geometry element.
|
LineSegTrans |
to(Unit<Length> unit)
Returns the equivalent to this curve but stated in the specified unit.
|
LineSegTrans |
toDimension(int newDim)
Return the equivalent of this line segment converted to the specified
number of physical dimensions.
|
NurbsCurve |
toNurbs(Parameter<Length> tol)
Return a transformed NURBS curve representation of this line segment.
|
extractGrid, getArcLength, getCurvature, getLimitPoint, getNumberOfPoints, getPointAtArcLength, getTorsion, getVariationOfCurvature, gridToTolerance, intersect, intersect, isCircular, isLine, isPlanar, isValid, splitAt, toNurbs, toText
getArcLength, getArcLength, getBinormal, getBinormal, getClosest, getClosest, getClosest, getClosest, getClosest, getClosest, getCurvature, getDerivatives, getEnclosedArea, getFarthest, getFarthest, getFarthest, getParDimension, getPoint, getPoint, getPrincipalNormal, getPrincipalNormal, getRealPoint, getSDerivative, getSDerivatives, getTangencyPoint, getTangent, getTangent, getTorsion, getVariationOfCurvature, intersect, intersect, intersect, isDegenerate, splitAt
addChangeListener, clone, compareTo, getAllUserData, getID, getName, getUserData, putAllUserData, putUserData, removeChangeListener, removeUserData, reset, setName, toString
addChangeListener, getAllUserData, getID, getLimitPoint, getName, getParDimension, getUserData, isValid, putAllUserData, putUserData, removeChangeListener, removeUserData, setName, toText
public static LineSegTrans newInstance(LineSegment child, GTransform transform)
child
- The LineSegment 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<LineSegment>
public GTransform getTotalTransform()
getTotalTransform
in interface GeomTransform<LineSegment>
public void setTransform(GTransform transform)
setTransform
in interface GeomTransform<LineSegment>
transform
- The transform to set this transform element to (may not
be null
).public LineSegment getChild()
getChild
in interface GeomTransform<LineSegment>
public LineSegment copyToReal()
copyToReal
in interface Curve<LineSegment>
copyToReal
in interface GeomElement<LineSegment>
copyToReal
in interface GeomTransform<LineSegment>
public GeomPoint getStart()
getStart
in class LineSegment
public GeomPoint getEnd()
getEnd
in class LineSegment
public GeomVector<Length> getDerivativeVector()
getDerivativeVector
in class LineSegment
public GeomVector<Dimensionless> getUnitVector()
getUnitVector
in class LineSegment
public int size()
size
in interface GeomElement<LineSegment>
size
in class LineSegment
public int getPhyDimension()
getPhyDimension
in interface GeomElement<LineSegment>
getPhyDimension
in class LineSegment
public Point getRealPoint(double s)
p(s)
.getRealPoint
in interface Curve<LineSegment>
s
- parametric distance to calculate a point for (0.0 to 1.0
inclusive).public java.util.List<Vector<Length>> getSDerivatives(double s, int grade)
0
to grade
with respect to parametric distance on the curve for the given parametric
distance along the curve, d^{grade}p(s)/d^{grade}s
.
Example:
1st derivative (grade = 1), this returns [p(s), dp(s)/ds]
;
2nd derivative (grade = 2), this returns [p(s), dp(s)/ds, d^2p(s)/d^2s]
; etc.
getSDerivatives
in interface Curve<LineSegment>
s
- Parametric distance to calculate derivatives for (0.0 to 1.0
inclusive).grade
- The maximum grade to calculate the derivatives for (1=1st
derivative, 2=2nd derivative, etc)java.lang.IllegalArgumentException
- if the grade is < 0.public LineSegTrans reverse()
reverse
in interface Curve<LineSegment>
public Point getBoundsMin()
getBoundsMin
in interface GeomElement<LineSegment>
java.lang.IndexOutOfBoundsException
- if this list contains no elements.public Point getBoundsMax()
getBoundsMax
in interface GeomElement<LineSegment>
java.lang.IndexOutOfBoundsException
- if this list contains no elements.public LineSegTrans getTransformed(GTransform transform)
GeomTransform
and contains this element as a child.getTransformed
in interface Transformable<LineSegment>
getTransformed
in class LineSegment
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<LineSegment>
getUnit
in class LineSegment
public LineSegTrans to(Unit<Length> unit) throws ConversionException
to
in interface Curve<LineSegment>
to
in interface GeomElement<LineSegment>
to
in interface ParametricGeometry<LineSegment>
to
in interface PointGeometry<LineSegment>
to
in class LineSegment
unit
- the length unit of the curve to be returned. May not be null.ConversionException
- if the the input unit is not a length unit.public LineSegTrans toDimension(int newDim)
toDimension
in interface Curve<LineSegment>
toDimension
in interface GeomElement<LineSegment>
toDimension
in interface ParametricGeometry<LineSegment>
newDim
- The dimension of the line segment to return. MUST equal 3.java.lang.IllegalArgumentException
- if the new dimension is anything other
than 3.public NurbsCurve toNurbs(Parameter<Length> tol)
toNurbs
in interface Curve<LineSegment>
toNurbs
in class LineSegment
tol
- Ignored. May pass null
.public LineSegTrans copy()
copy
in interface Curve<LineSegment>
copy
in interface GeomElement<LineSegment>
copy
in interface ParametricGeometry<LineSegment>
public boolean equals(java.lang.Object obj)
equals
in class AbstractGeomElement<LineSegment>
obj
- the object to compare with.true
if this transform is identical to that
transform; false
otherwise.public int hashCode()
hashCode
in class AbstractGeomElement<LineSegment>
public static void recycle(LineSegTrans instance)
LineSegTrans
instance immediately (on the stack
when executing in a StackContext).instance
- The instance to recycle immediately.