public class ControlPointNet extends java.lang.Object implements java.lang.Iterable<java.util.List<ControlPoint>>, java.lang.Cloneable, javolution.xml.XMLSerializable, javolution.lang.ValueType
Modified by: Joseph A. Huwaldt
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Returns a copy of this ControlPointNet instance
allocated by the calling thread
(possibly on the stack). |
ControlPointNet |
copy()
Returns a copy of this ControlPointNet instance
allocated by the calling thread
(possibly on the stack). |
boolean |
equals(java.lang.Object obj)
Compares this ControlPointNet against the specified object for strict equality
(same sized lists of the equal ControlPoints).
|
ControlPoint |
get(int s,
int t)
Returns the ControlPoint at the specified s,t position in this matrix.
|
Point |
getBoundsMax()
Return the coordinate point representing the maximum bounding box corner (e.g.: max
X, max Y, max Z) of this matrix of ControlPoint objects.
|
Point |
getBoundsMin()
Return the coordinate point representing the minimum bounding box corner (e.g.: min
X, min Y, min Z) of this matrix of ControlPoint objects.
|
java.util.List<ControlPoint> |
getColumn(int tIndex)
Returns a list of ControlPoint objects that represent a single column in this
network of control points.
|
int |
getNumberOfColumns()
Return the control point matrix size in the t-direction (across the columns of
control points).
|
int |
getNumberOfRows()
Return the control point matrix size in the s-direction (down a column of control
points).
|
java.util.List<ControlPoint> |
getRow(int sIndex)
Returns a list of ControlPoint objects that represent a single row in this network
of control points.
|
Unit<Length> |
getUnit()
Returns the unit in which the control points in this network are stated.
|
int |
hashCode()
Returns the hash code for this parameter.
|
boolean |
isValid()
Return
true if this ControlPointNet contains valid and finite
numerical components. |
java.util.Iterator<java.util.List<ControlPoint>> |
iterator()
Returns an iterator over the lists of ControlPoint objects in this network.
|
ControlPointNet |
reverseColumns()
Return a new control point network that is identical to this one but with the
columns in reverse order.
|
ControlPointNet |
reverseRows()
Return a new control point network that is identical to this one but with the rows
in reverse order.
|
int |
size()
Returns the total number of control points in this matrix of control points.
|
ControlPointNet |
to(Unit<Length> unit)
Returns the equivalent to this control point network but stated in the specified
unit.
|
ControlPointNet |
toDimension(int newDim)
Return the equivalent of this control point network converted to the specified
number of physical dimensions.
|
java.lang.String |
toString()
Returns the String representation of this control point matrix that consists of the
control points listed out.
|
javolution.text.Text |
toText()
Returns the text representation of this control point matrix that consists of the
the control points listed out.
|
ControlPointNet |
transpose()
Return a new control point network that is the transpose of this network (the rows
& columns are swapped).
|
static ControlPointNet |
valueOf(ControlPoint[][] cps)
Returns a
ControlPointNet instance made up of the control points in the
specified java matrix. |
static ControlPointNet |
valueOf(ControlPointNet cpNet)
Returns a
ControlPointNet instance made up of the control points contained
in the specified network. |
static ControlPointNet |
valueOf(java.util.List<? extends java.util.List<ControlPoint>> cps)
Returns a
ControlPointNet instance made up of the control points in the
specified list of lists. |
public static ControlPointNet valueOf(ControlPoint[][] cps)
ControlPointNet
instance made up of the control points in the
specified java matrix.cps
- Matrix of control points: cps[t][s]. s-parameter runs down a column of
points and the t-parameter runs across the columns of points. May not be
null.public static ControlPointNet valueOf(java.util.List<? extends java.util.List<ControlPoint>> cps)
ControlPointNet
instance made up of the control points in the
specified list of lists.cps
- List of lists (matrix) of control points: cps.get(t).get(s). s-parameter
runs down a column of points and the t-parameter runs across the columns
of points. May not be null.public static ControlPointNet valueOf(ControlPointNet cpNet)
ControlPointNet
instance made up of the control points contained
in the specified network.cpNet
- An existing control point net. The control points from this network
are used to make this one. May not be null.public int size()
public int getNumberOfRows()
public int getNumberOfColumns()
public ControlPoint get(int s, int t)
s
- the index in the s-direction (down a column of points).t
- the index in the t-direction (across the columns of points).java.lang.IndexOutOfBoundsException
- (s < 0) || (s ≥
getNumberOfRows()) || t < 0 || (t ≥ getNumberOfColumns()) )
public java.util.List<ControlPoint> getRow(int sIndex)
sIndex
- The index for the row of control points to return.java.lang.IndexOutOfBoundsException
- sIndex < 0 || (sIndex ≥
getNumberOfRows()) )
public java.util.List<ControlPoint> getColumn(int tIndex)
tIndex
- The index for the column of control points to return.java.lang.IndexOutOfBoundsException
- tIndex < 0 || (tIndex ≥
getNumberOfColumns()) )
public Point getBoundsMin()
public Point getBoundsMax()
public ControlPointNet transpose()
public ControlPointNet reverseRows()
public ControlPointNet reverseColumns()
public Unit<Length> getUnit()
public ControlPointNet to(Unit<Length> unit) throws ConversionException
unit
- The length unit of the control point to be returned. May not be null.ConversionException
- if the the input unit is not a length unit.public ControlPointNet toDimension(int newDim)
newDim
- The dimension of the surface to return.public java.util.Iterator<java.util.List<ControlPoint>> iterator()
iterator
in interface java.lang.Iterable<java.util.List<ControlPoint>>
public boolean isValid()
true
if this ControlPointNet contains valid and finite
numerical components. A value of false
will be returned if any of the
control point values are NaN or Inf.public ControlPointNet copy()
allocated
by the calling thread
(possibly on the stack).copy
in interface javolution.lang.ValueType
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
allocated
by the calling thread
(possibly on the stack).clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- Never thrown.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to compare with.true
if this point is identical to that point;
false
otherwise.public int hashCode()
hashCode
in class java.lang.Object
public javolution.text.Text toText()
public java.lang.String toString()
toString
in class java.lang.Object