public final class SubrangePoint extends GeomPoint implements Subrange<GeomPoint>
GeomPoint
element that refers to a ParametricGeometry
object such as
a Curve
or Surface
and a parametric position on that parametric object.
Modified by: Joseph A. Huwaldt
RESOURCES
Modifier and Type | Method and Description |
---|---|
SubrangePoint |
copy()
Returns a copy of this SubrangePoint instance
allocated by the calling thread
(possibly on the stack). |
Point |
copyToReal()
Return a copy of the child object transformed into a concrete
GeomPoint
object (information on the parametric position on the child parametric geometry is
removed). |
boolean |
equals(java.lang.Object obj)
Compares this SubrangePoint against the specified object for strict equality (same
values and same units).
|
ParametricGeometry |
getChild()
Returns the child object this point is subranged onto.
|
GeomPoint |
getParPosition()
Returns the parametric position on the child object that this point refers to.
|
int |
getPhyDimension()
Returns the number of physical dimensions of the geometry element.
|
GeomPointTrans |
getTransformed(GTransform transform)
Returns transformed version of this element.
|
Unit<Length> |
getUnit()
Returns the unit in which the
values in this point are stated in. |
double |
getValue(int i)
Returns the value of a coordinate in this point as a
double , stated in
this point's unit . |
double |
getValue(int i,
Unit<Length> unit)
Returns the value of a coordinate in this point as a
double , stated in
the specified unit. |
int |
hashCode()
Returns the hash code for this parameter.
|
Point |
immutable()
Return an immutable version of this point.
|
boolean |
isValid()
Return
true if this point contains valid and finite numerical
components. |
Point |
minus(GeomPoint that)
Returns the difference between this point and the one specified.
|
Point |
minus(Parameter<Length> that)
Subtracts the specified parameter from each component of this point.
|
static SubrangePoint |
newInstance(Curve child,
double s)
Returns a
SubrangePoint instance referring to the specified Curve
and parametric location. |
static SubrangePoint |
newInstance(ParametricGeometry child,
GeomPoint par)
Returns a
SubrangePoint instance referring to the specified
ParametricGeometry and parametric location. |
static SubrangePoint |
newInstance(Surface child,
double s,
double t)
Returns a
SubrangePoint instance referring to the specified Surface
and parametric location. |
double |
normSqValue()
Returns the square of the Euclidean norm, magnitude, or length value of the vector
from the origin to this point (the dot product of the origin-to-this-point vector
and itself).
|
Point |
opposite()
Returns the negation of this point (all the values of each dimension negated).
|
Point |
plus(GeomPoint that)
Returns the sum of this point with the one specified.
|
Point |
plus(Parameter<Length> that)
Adds the specified parameter to each component of this point.
|
static void |
recycle(SubrangePoint instance)
Recycles a
SubrangePoint instance immediately (on the stack when
executing in a StackContext ). |
void |
setParPosition(GeomPoint par)
Sets the parametric position on the child object that this point refers to.
|
Point |
times(double k)
Returns the product of this point with the specified coefficient.
|
GeomPoint |
to(Unit<Length> unit)
Returns the equivalent to this point but stated in the specified unit.
|
GeomPoint |
toDimension(int newDim)
Return the equivalent of this point converted to the specified number of physical
dimensions.
|
Float64Vector |
toFloat64Vector()
Returns the values stored in this transformed point, stated in this point's
unit , as a Float64Vector. |
Vector3D<Length> |
toVector3D()
Returns a Vector3D representation of this transformed point if possible.
|
distance, distanceSq, distanceSqValue, distanceValue, divide, divide, get, getBoundsMax, getBoundsMin, getLimitPoint, getNumberOfPoints, getParDimension, isApproxEqual, isApproxEqual, max, min, norm, normSq, normValue, size, times, toArray, toArray, toGeomVector, toParameterVector, 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 SubrangePoint newInstance(Curve child, double s)
SubrangePoint
instance referring to the specified Curve
and parametric location.child
- The Curve
object that this point is subranged onto (may not be
null
).s
- The parametric s-position (between 0 and 1) along curve where the
point is located (may not be null
).public static SubrangePoint newInstance(Surface child, double s, double t)
SubrangePoint
instance referring to the specified Surface
and parametric location.child
- The Surface
object that this point is subranged onto (may not
be null
).s
- The parametric s-position (between 0 and 1) along surface where the
point is located.t
- The parametric t-position (between 0 and 1) along surface where the
point is located.public static SubrangePoint newInstance(ParametricGeometry child, GeomPoint par)
SubrangePoint
instance referring to the specified
ParametricGeometry
and parametric location.child
- The ParametricGeometry
object that this point is subranged
onto (may not be null
).par
- The parametric position (between 0 and 1) along each parametric
dimension where the point is located (may not be null
).DimensionException
- if the input child object's parametric dimension is not
compatible with the input parametric distance point.public GeomPoint getParPosition()
getParPosition
in interface Subrange<GeomPoint>
public void setParPosition(GeomPoint par)
setParPosition
in interface Subrange<GeomPoint>
par
- The parametric position (between 0 and 1) along each parametric
dimension where the point is located (may not be null
).public ParametricGeometry getChild()
public Point copyToReal()
GeomPoint
object (information on the parametric position on the child parametric geometry is
removed).copyToReal
in interface GeomElement<GeomPoint>
copyToReal
in class GeomPoint
public static void recycle(SubrangePoint instance)
SubrangePoint
instance immediately (on the stack when
executing in a StackContext
).instance
- The instance to be recycled.public int getPhyDimension()
getPhyDimension
in interface GeomElement<GeomPoint>
public double getValue(int i)
double
, stated in
this point's unit
.public double getValue(int i, Unit<Length> unit)
double
, stated in
the specified unit.public double normSqValue()
normValue
if the
squared value is all that is needed.normSqValue
in class GeomPoint
this.normSq().getValue()
.GeomPoint.normValue()
public Point plus(GeomPoint that)
plus
in class GeomPoint
that
- the point to be added. May not be null.this + that
.DimensionException
- if point dimensions are different.public Point plus(Parameter<Length> that)
public Point minus(GeomPoint that)
minus
in class GeomPoint
that
- the point to be subtracted from this point. May not be null.this - that
.DimensionException
- if point dimensions are different.public Point minus(Parameter<Length> that)
public Point opposite()
public Point times(double k)
public boolean isValid()
true
if this point contains valid and finite numerical
components. A value of false
will be returned if any of the coordinate
values are NaN or Inf.isValid
in interface GeomElement<GeomPoint>
isValid
in class GeomPoint
public SubrangePoint copy()
allocated
by the calling thread
(possibly on the stack).copy
in interface GeomElement<GeomPoint>
copy
in class GeomPoint
public Unit<Length> getUnit()
values
in this point are stated in.getUnit
in interface GeomElement<GeomPoint>
public GeomPoint to(Unit<Length> unit) throws ConversionException
to
in interface GeomElement<GeomPoint>
to
in interface PointGeometry<GeomPoint>
unit
- the length unit of the point to be returned. May not be null.ConversionException
- if the the input unit is not a length unit.public Vector3D<Length> toVector3D()
toVector3D
in class GeomPoint
DimensionException
- if this point has any number of dimensions other than 3.public Float64Vector toFloat64Vector()
unit
, as a Float64Vector.toFloat64Vector
in class GeomPoint
public GeomPoint toDimension(int newDim)
toDimension
in interface GeomElement<GeomPoint>
newDim
- The dimension of the point to return.public GeomPointTrans getTransformed(GTransform transform)
GeomTransform
and contains this element as a child.getTransformed
in interface Transformable<GeomPoint>
getTransformed
in class GeomPoint
transform
- The transformation to apply to this geometry. May not be null.DimensionException
- if this point is not 3D.public boolean equals(java.lang.Object obj)
equals
in class AbstractGeomElement<GeomPoint>
obj
- the object to compare with.true
if this point is identical to that point;
false
otherwise.public int hashCode()
hashCode
in class AbstractGeomElement<GeomPoint>