public final class NurbsCurveTrans extends NurbsCurve implements GeomTransform<NurbsCurve>
GeomTransform
object that refers to a NurbsCurve
object and
masquerades as a NurbsCurve object itself.
Modified by: Joseph A. Huwaldt
GTOL
RESOURCES
Modifier and Type | Method and Description |
---|---|
NurbsCurveTrans |
copy()
Returns a copy of this NurbsCurveTrans instance
allocated by the calling thread
(possibly on the stack). |
BasicNurbsCurve |
copyToReal()
Return a copy of the child object transformed by this transformation.
|
boolean |
equals(java.lang.Object obj)
Compares this NurbsCurveTrans 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).
|
NurbsCurve |
getChild()
Returns the child object transformed by this transform element.
|
java.util.List<ControlPoint> |
getControlPoints()
Return a list of transformed control points for this curve.
|
int |
getDegree()
Return the degree of the NURBS curve.
|
KnotVector |
getKnotVector()
Return the knot vector of this curve.
|
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 . |
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.
|
Unit<Length> |
getUnit()
Returns the unit in which the control points in this curve are stated.
|
int |
hashCode()
Returns the hash code for this parameter.
|
BasicNurbsCurve |
immutable()
Return an immutable version of this NURBS curve.
|
static NurbsCurveTrans |
newInstance(NurbsCurve child,
GTransform transform)
|
static void |
recycle(NurbsCurveTrans instance)
Recycles a
NurbsCurveTrans instance immediately (on the stack when
executing in a StackContext). |
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.
|
NurbsCurveTrans |
to(Unit<Length> unit)
Returns the equivalent to this curve but stated in the specified unit.
|
NurbsCurveTrans |
toDimension(int newDim)
Return the equivalent of this curve converted to the specified number of physical
dimensions.
|
getArcLength, getArcLength, getTransformed, gridToTolerance, insertKnot, intersect, isDegenerate, isLine, isPlanar, isValid, mergeKnotVector, refineKnotVector, refineKnotVector, removeKnot, reverse, splitAt, toNurbs, toNurbs, toText
extractGrid, getArcLength, getBinormal, getBinormal, getClosest, getClosest, getClosest, getClosest, getClosest, getClosest, getCurvature, getCurvature, getDerivatives, getEnclosedArea, getFarthest, getFarthest, getFarthest, getLimitPoint, getParDimension, getPoint, getPoint, getPointAtArcLength, getPrincipalNormal, getPrincipalNormal, getRealPoint, getSDerivative, getSDerivatives, getTangencyPoint, getTangent, getTangent, getTorsion, getTorsion, getVariationOfCurvature, getVariationOfCurvature, intersect, intersect, intersect, intersect, isCircular, splitAt
addChangeListener, clone, compareTo, getAllUserData, getID, getName, getUserData, putAllUserData, putUserData, removeChangeListener, removeUserData, reset, setName, toString
getTransformed
addChangeListener, getAllUserData, getID, getLimitPoint, getName, getParDimension, getUserData, isValid, putAllUserData, putUserData, removeChangeListener, removeUserData, setName, toText
public static NurbsCurveTrans newInstance(NurbsCurve child, GTransform transform)
child
- The NurbsCurve 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<NurbsCurve>
public GTransform getTotalTransform()
getTotalTransform
in interface GeomTransform<NurbsCurve>
public void setTransform(GTransform transform)
setTransform
in interface GeomTransform<NurbsCurve>
transform
- The transform to set this transform element to (may not be
null
).public NurbsCurve getChild()
getChild
in interface GeomTransform<NurbsCurve>
public BasicNurbsCurve copyToReal()
copyToReal
in interface Curve<NurbsCurve>
copyToReal
in interface GeomElement<NurbsCurve>
copyToReal
in interface GeomTransform<NurbsCurve>
public BasicNurbsCurve immutable()
immutable
in class NurbsCurve
public int size()
size
in interface GeomElement<NurbsCurve>
public int getPhyDimension()
getPhyDimension
in interface GeomElement<NurbsCurve>
public java.util.List<ControlPoint> getControlPoints()
getControlPoints
in class NurbsCurve
public KnotVector getKnotVector()
getKnotVector
in class NurbsCurve
public int getDegree()
getDegree
in class NurbsCurve
public Point getRealPoint(double s)
p(s)
.getRealPoint
in interface Curve<NurbsCurve>
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<NurbsCurve>
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 Point getBoundsMin()
getBoundsMin
in interface GeomElement<NurbsCurve>
java.lang.IndexOutOfBoundsException
- if this list contains no elements.public Point getBoundsMax()
getBoundsMax
in interface GeomElement<NurbsCurve>
java.lang.IndexOutOfBoundsException
- if this list contains no elements.public Unit<Length> getUnit()
getUnit
in interface GeomElement<NurbsCurve>
public NurbsCurveTrans to(Unit<Length> unit) throws ConversionException
to
in interface Curve<NurbsCurve>
to
in interface GeomElement<NurbsCurve>
to
in interface ParametricGeometry<NurbsCurve>
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 NurbsCurveTrans toDimension(int newDim)
toDimension
in interface Curve<NurbsCurve>
toDimension
in interface GeomElement<NurbsCurve>
toDimension
in interface ParametricGeometry<NurbsCurve>
newDim
- The dimension of the curve to return. MUST equal 3.java.lang.IllegalArgumentException
- if the new dimension is anything other than 3.public NurbsCurveTrans copy()
allocated
by the calling thread
(possibly on the stack).copy
in interface Curve<NurbsCurve>
copy
in interface GeomElement<NurbsCurve>
copy
in interface ParametricGeometry<NurbsCurve>
public boolean equals(java.lang.Object obj)
equals
in class AbstractGeomElement<NurbsCurve>
obj
- the object to compare with.true
if this transform is identical to that transform;
false
otherwise.public int hashCode()
hashCode
in class AbstractGeomElement<NurbsCurve>
public static void recycle(NurbsCurveTrans instance)
NurbsCurveTrans
instance immediately (on the stack when
executing in a StackContext).instance
- The instance to be recycled.