public class LinearComboCurve extends AbstractCurve<LinearComboCurve> implements LinearCombination<LinearComboCurve,Curve>
Curve
objects. A linear
combination curve is formed by a weighted linear addition of a list of one or more
curves. For example: B = W1*Crv_1 + ... + Wn*Crv_n
where W1 through Wn are
scalar weights. The linear addition is done independently of physical dimension (each
dimension is added separately) and the weighted addition is done in parameter space:
B = W1*Crv_1(s) + ... + Wn*Crv_n(s)
.
Any number of curves may be added to a LinearComboCurve, but they all must have the same physical dimensions.
Modified by: Joseph A. Huwaldt
GTOL
RESOURCES
Modifier and Type | Method and Description |
---|---|
boolean |
add(Curve... array)
Appends all of the elements in the specified list of arguments to this
LinearComboCurve with a default weight of 1.0 assigned to each.
|
boolean |
add(Curve curve)
Appends the specified
Curve to the end of this LinearComboCurve with a
default weight of 1.0. |
boolean |
add(Curve curve,
java.lang.Double weight)
Appends the specified
Curve to the end of this list of curves. |
boolean |
add(int index,
Curve... array)
Inserts all of the
Curve objects in the specified list of arguments into
this LinearComboCurve at the specified position with a default weight of 1.0
assigned to each. |
void |
add(int index,
Curve value)
Inserts the specified
Curve at the specified position in this list with a
default weight of 1.0. |
void |
add(int index,
Curve curve,
java.lang.Double weight)
Inserts the specified
Curve at the specified position in this list. |
boolean |
addAll(java.util.Collection<? extends Curve> curves)
Adds all of the curves in the specified collection to this LinearComboCurve with a
default weight of 1.0 for each.
|
boolean |
addAll(java.util.Collection<? extends Curve> curves,
java.util.Collection<java.lang.Double> weights)
Appends all of the curves in the specified collection to this LinearComboCurve.
|
boolean |
addAll(Curve[] arr)
Appends all of the curves in the specified array to this LinearComboCurve with a
default weight of 1.0 assigned to each.
|
boolean |
addAll(int index,
java.util.Collection<? extends Curve> curves)
Inserts all of the curves in the specified collection of curves into this
LinearComboCurve with default weights of 1.0 for each.
|
boolean |
addAll(int index,
java.util.Collection<? extends Curve> curves,
java.util.Collection<java.lang.Double> weights)
Inserts all of the curves in the specified collection and their associated weights
into this LinearComboCurve at the specified position.
|
boolean |
addAll(int index,
Curve[] arr)
Inserts all of the
Curve objects in the specified array into this
LinearComboCurve at the specified position with a default weight of 1.0 assigned to
each. |
void |
clear()
Removes all of the curves from this linear combination.
|
boolean |
contains(java.lang.Object o)
Returns true if this LinearComboCurve contains the specified
Curve . |
boolean |
containsAll(java.util.Collection<?> c)
Returns true if this collection contains all of the
Curve objects in the specified
collection. |
boolean |
containsGeometry()
Returns
true if this list actually contains any curves and
false if this list is empty. |
LinearComboCurve |
copy()
Returns a copy of this
LinearComboCurve instance
allocated by the calling thread
(possibly on the stack). |
LinearComboCurve |
copyToReal()
Return a copy of this object with any transformations or subranges removed
(applied).
|
boolean |
equals(java.lang.Object obj)
Compares the specified object with this list of
Curve objects for
equality. |
Curve |
get(int index)
Returns the Curve at the specified position in this LinearComboCurve.
|
Curve |
get(java.lang.String name)
Returns the
Curve with the specified name from this list. |
GeomList<Curve> |
getAll()
Returns an new
GeomList with all the curves in this list. |
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).
|
Curve |
getFirst()
Returns the first curve from this LinearComboCurve.
|
java.lang.Double |
getFirstWeight()
Returns the first linear combination weight from this LinearComboCurve.
|
int |
getIndexFromName(java.lang.String name)
Return the index to the 1st Curve in this list with the specified name.
|
Curve |
getLast()
Returns the last curve from this LinearComboCurve list of curves.
|
java.lang.Double |
getLastWeight()
Returns the last linear combination weight from this LinearComboCurve.
|
int |
getPhyDimension()
Returns the number of physical dimensions of the geometry element.
|
LinearComboCurve |
getRange(int first,
int last)
Returns the range of Curves in this LinearComboCurve from the specified start and ending
indexes as a new LinearComboCurve.
|
Point |
getRealPoint(double s)
Calculate a point on the curve for the given parametric distance along the curve.
|
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 . |
LinearComboCurve |
getTransformed(GTransform transform)
Returns a transformed version of this element.
|
Unit<Length> |
getUnit()
Returns the unit in which the curves in this linear combination curve are stated.
|
java.lang.Double |
getWeight(int index)
Returns the linear combination weight at the specified position in this
LinearComboCurve.
|
java.util.List<java.lang.Double> |
getWeightRange(int first,
int last)
Returns the range of linear combination weights in this LinearComboCurve from the
specified start and ending indexes as a List of double values.
|
int |
hashCode()
Returns the hash code for this
LinearComboCurve . |
int |
indexOf(java.lang.Object element)
Returns the index in this list of the first occurrence of the specified
Curve , or -1 if the list does not contain this curve. |
boolean |
isEmpty()
Returns
true if this collection contains no elements. |
boolean |
isValid()
Return
true if this LinearComboCurve contains valid and finite numerical
components. |
java.util.Iterator<Curve> |
iterator()
Returns an iterator over the curves in this LinearComboCurve.
|
int |
lastIndexOf(java.lang.Object element)
Returns the index in this list of the last occurrence of the specified
Curve , or -1 if the list does not contain this curve. |
java.util.ListIterator<Curve> |
listIterator()
Returns a list iterator over the curves in this LinearComboCurve.
|
java.util.ListIterator<Curve> |
listIterator(int index)
Returns a Curve list iterator from the specified position.
|
static LinearComboCurve |
newInstance()
Returns a new, empty, preallocated or recycled
LinearComboCurve
instance (on the stack when executing in a StackContext ), that can
store a list of Curve objects and associated weighting factors. |
static LinearComboCurve |
newInstance(java.lang.String name)
Returns a new, empty, preallocated or recycled
LinearComboCurve
instance (on the stack when executing in a StackContext ), that can
store a list of Curve objects and associated weighting factors. |
static void |
recycle(LinearComboCurve instance)
Recycles a case instance immediately (on the stack when executing in a
StackContext).
|
Curve |
remove(int index)
Removes the curve (and its associated weight) at the specified position in this
LinearComboCurve.
|
boolean |
remove(java.lang.Object o)
Removes a single instance of the specified
Curve (and its associated
weight) from this collection, if it is present. |
Curve |
remove(java.lang.String name)
Removes the curve with the specified name from this list.
|
boolean |
removeAll(java.util.Collection<?> c)
Removes from this list all the
Curve objects that are contained in the
specified collection. |
void |
reset()
Resets the internal state of this object to its default values.
|
boolean |
retainAll(java.util.Collection<?> c)
Retains only the curves in this list that are contained in the specified
collection.
|
LinearComboCurve |
reverse()
Return a new curve that is identical to this one, but with the
parameterization reversed.
|
Curve |
set(int index,
Curve curve)
Replaces the <@link Curve> at the specified position in this list of curves with
the specified Curve.
|
Curve |
set(int index,
Curve curve,
java.lang.Double weight)
Replaces the <@link Curve> and weight at the specified position in this
LinearComboCurve with the specified curve and weight.
|
java.lang.Double |
setWeight(int index,
java.lang.Double weight)
Replaces the weight at the specified position in this LinearComboCurve with the
specified weight.
|
int |
size()
Returns the number of
Curve objects that make up this linear combination
curve. |
GeomList<LinearComboCurve> |
splitAt(double s)
Split this curve at the specified parametric position returning a list containing
two curves (a lower curve with smaller parametric positions than "s" and an upper
curve with larger parametric positions).
|
LinearComboCurve |
subList(int fromIndex,
int toIndex)
Returns a view of the portion of this LinearComboCurve between fromIndex,
inclusive, and toIndex, exclusive.
|
LinearComboCurve |
to(Unit<Length> unit)
Returns the equivalent to this LinearComboCurve but stated in the specified unit.
|
Curve[] |
toArray()
Returns an array containing all of the curves in this collection.
|
<T> T[] |
toArray(T[] a)
Returns an array containing all of the curves in this collection.
|
LinearComboCurve |
toDimension(int newDim)
Return the equivalent of this LinearComboCurve converted to the specified number of physical
dimensions.
|
NurbsCurve |
toNurbs(Parameter<Length> tol)
Return a NURBS curve representation of this curve to within the specified
tolerance.
|
javolution.text.Text |
toText()
Returns the text representation of this geometry element.
|
java.util.List<Curve> |
unmodifiableList()
Returns an unmodifiable list view of the curves in this list.
|
java.util.List<java.lang.Double> |
unmodifiableWeightList()
Returns an unmodifiable list view of the weights in this list.
|
static LinearComboCurve |
valueOf(java.util.Collection<? extends Curve> curves,
java.util.Collection<java.lang.Double> weights)
Return a LinearComboCurve made up of the
Curve and weight objects in the
specified collections. |
static LinearComboCurve |
valueOf(Curve... curves)
Return a LinearComboCurve made up of the
Curve objects in the specified
array each with a default weight of 1.0. |
extractGrid, getArcLength, getArcLength, 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, gridToTolerance, intersect, intersect, intersect, intersect, intersect, isCircular, isDegenerate, isLine, isPlanar, splitAt
addChangeListener, clone, compareTo, getAllUserData, getID, getName, getUserData, putAllUserData, putUserData, removeChangeListener, removeUserData, setName, toString
addChangeListener, getAllUserData, getID, getLimitPoint, getName, getParDimension, getUserData, putAllUserData, putUserData, removeChangeListener, removeUserData, setName
public static LinearComboCurve newInstance()
LinearComboCurve
instance (on the stack when executing in a StackContext
), that can
store a list of Curve
objects and associated weighting factors. The list is
initially empty and therefore the linear combination is initially undefined.public static LinearComboCurve newInstance(java.lang.String name)
LinearComboCurve
instance (on the stack when executing in a StackContext
), that can
store a list of Curve
objects and associated weighting factors. The list is
initially empty and therefore the linear combination is initially undefined.name
- The name to be assigned to this LinearComboCurve (may be null).public static LinearComboCurve valueOf(java.util.Collection<? extends Curve> curves, java.util.Collection<java.lang.Double> weights)
Curve
and weight objects in the
specified collections.curves
- A collection of curves that define the LinearComboCurve. May not be
null.weights
- A collection of weights (one for each curve). May not be null and
must have the same size as "curves".public static LinearComboCurve valueOf(Curve... curves)
Curve
objects in the specified
array each with a default weight of 1.0.curves
- An array of curves that define the LinearComboCurve. May not be null.public java.util.List<Curve> unmodifiableList()
unmodifiableList
in interface GeometryList<LinearComboCurve,Curve>
public java.util.List<java.lang.Double> unmodifiableWeightList()
unmodifiableWeightList
in interface LinearCombination<LinearComboCurve,Curve>
public boolean isEmpty()
true
if this collection contains no elements.public boolean containsGeometry()
true
if this list actually contains any curves and
false
if this list is empty.containsGeometry
in interface GeometryList<LinearComboCurve,Curve>
public int size()
Curve
objects that make up this linear combination
curve. If the surface contains more than Integer.MAX_VALUE elements, returns
Integer.MAX_VALUE.size
in interface GeomElement<LinearComboCurve>
size
in interface java.util.Collection<Curve>
size
in interface java.util.List<Curve>
public Curve get(int index)
get
in interface java.util.List<Curve>
index
- index of curve to return (0 returns the 1st element, -1 returns the
last, -2 returns the 2nd from last, etc).java.lang.IndexOutOfBoundsException
- if the given index is out of range:
index > size()
public java.lang.Double getWeight(int index)
getWeight
in interface LinearCombination<LinearComboCurve,Curve>
index
- index of weight to return (0 returns the 1st element, -1 returns the
last, -2 returns the 2nd from last, etc).java.lang.IndexOutOfBoundsException
- if the given index is out of range:
index > size()
public Curve getFirst()
getFirst
in interface GeometryList<LinearComboCurve,Curve>
public java.lang.Double getFirstWeight()
getFirstWeight
in interface LinearCombination<LinearComboCurve,Curve>
public Curve getLast()
getLast
in interface GeometryList<LinearComboCurve,Curve>
public java.lang.Double getLastWeight()
getLastWeight
in interface LinearCombination<LinearComboCurve,Curve>
public LinearComboCurve getRange(int first, int last)
getRange
in interface GeometryList<LinearComboCurve,Curve>
first
- index of the first element to return (0 returns the 1st element, -1
returns the last, etc).last
- index of the last element to return (0 returns the 1st element, -1
returns the last, etc).java.lang.IndexOutOfBoundsException
- if the given index is out of range:
index ≥ size()
public java.util.List<java.lang.Double> getWeightRange(int first, int last)
getWeightRange
in interface LinearCombination<LinearComboCurve,Curve>
first
- index of the first element to return (0 returns the 1st element, -1
returns the last, etc).last
- index of the last element to return (0 returns the 1st element, -1
returns the last, etc).java.lang.IndexOutOfBoundsException
- if the given index is out of range:
index ≥ size()
public Curve get(java.lang.String name)
Curve
with the specified name from this list.get
in interface GeometryList<LinearComboCurve,Curve>
name
- The name of the curve we are looking for in the list.null
is returned.public LinearComboCurve subList(int fromIndex, int toIndex)
list.subList(from, to).clear();
Similar idioms may be constructed for
indexOf
and lastIndexOf
, and all of the algorithms in the
Collections
class can be applied to a subList.
The semantics of the list returned by this method become undefined if the backing
list (i.e., this list) is structurally modified in any way other than via
the returned list (structural modifications are those that change the size of this
list, or otherwise perturb it in such a fashion that iterations in progress may
yield incorrect results).subList
in interface java.util.List<Curve>
fromIndex
- low endpoint (inclusive) of the subList.toIndex
- high endpoint (exclusive) of the subList.java.lang.IndexOutOfBoundsException
- if the given index is out of range:
index > size()
public GeomList<Curve> getAll()
GeomList
with all the curves in this list.getAll
in interface GeometryList<LinearComboCurve,Curve>
public LinearComboCurve reverse()
reverse
in interface Curve<LinearComboCurve>
reverse
in interface GeometryList<LinearComboCurve,Curve>
public int indexOf(java.lang.Object element)
Curve
, or -1 if the list does not contain this curve.indexOf
in interface java.util.List<Curve>
element
- The Curve to search for.public int lastIndexOf(java.lang.Object element)
Curve
, or -1 if the list does not contain this curve. More formally,
returns the highest index i such that (o==null ? get(i)==null : o.equals(get(i))),
or -1 if there is no such index.lastIndexOf
in interface java.util.List<Curve>
element
- The Curve to search for.public boolean contains(java.lang.Object o)
Curve
. More formally,
returns true if and only if this LinearComboCurve's curves contains at least one element e such
that (o==null ? e==null : o.equals(e)).public boolean containsAll(java.util.Collection<?> c)
Curve
objects in the specified
collection.containsAll
in interface java.util.Collection<Curve>
containsAll
in interface java.util.List<Curve>
c
- collection of curves to be checked for containment in this collection.true
if this collection contains all of the curves in the
specified collection.public int getIndexFromName(java.lang.String name)
getIndexFromName
in interface GeometryList<LinearComboCurve,Curve>
name
- The name of the Curve to find in this listpublic void add(int index, Curve value)
Curve
at the specified position in this list with a
default weight of 1.0. Shifts the element currently at that position (if any) and
any subsequent elements to the right (adds one to their indices). Null values are
ignored. The input value must have the same physical dimensions as the other items
in this list, or an exception is thrown.
Note: If this method is used concurrent access must be synchronized (the table is not thread-safe).
add
in interface java.util.List<Curve>
index
- the index at which the specified element is to be inserted. (0 returns
the 1st element, -1 returns the last, -2 returns the 2nd from last,
etc).value
- the Curve to be inserted with a default weight of 1.0.java.lang.IndexOutOfBoundsException
- if index > size()
DimensionException
- if the input value dimensions are different from this
list's dimensions.public void add(int index, Curve curve, java.lang.Double weight)
Curve
at the specified position in this list. Shifts
the element currently at that position (if any) and any subsequent elements to the
right (adds one to their indices). Null values are ignored. The input curve must
have the same physical dimensions as the other items in this list, or an exception
is thrown.
Note: If this method is used concurrent access must be synchronized (the table is not thread-safe).
add
in interface LinearCombination<LinearComboCurve,Curve>
index
- The index at which the specified element is to be inserted. (0
returns the 1st element, -1 returns the last, -2 returns the 2nd from
last, etc).curve
- The Curve to be inserted. May not be null.weight
- The linear combination weight of the curve to be inserted. May not be
null.java.lang.IndexOutOfBoundsException
- if index > size()
DimensionException
- if the input curve dimensions are different from this
list's dimensions.public boolean add(Curve curve)
Curve
to the end of this LinearComboCurve with a
default weight of 1.0. Null values are ignored. The input curve must have the same
physical dimensions as the other items in this list, or an exception is thrown.
Note: If this method is used concurrent access must be synchronized (the table is not thread-safe).
add
in interface java.util.Collection<Curve>
add
in interface java.util.List<Curve>
curve
- The curve to be appended to this list with a default weight of 1.0.
May not be null.DimensionException
- if the input element's dimensions are different from
this list's dimensions.DimensionException
- if the input curve dimensions are different from this
list's dimensions.public boolean add(Curve curve, java.lang.Double weight)
Curve
to the end of this list of curves. Null values
are ignored. The input curve must have the same physical dimensions as the other
items in this list, or an exception is thrown.
Note: If this method is used concurrent access must be synchronized (the table is not thread-safe).
add
in interface LinearCombination<LinearComboCurve,Curve>
curve
- The curve to be appended to this list. May not be null.weight
- The linear combination weight of the curve to be appended. May not be
null.DimensionException
- if the input element's dimensions are different from
this list's dimensions.DimensionException
- if the input curve dimensions are different from this
list's dimensions.public boolean add(Curve... array)
add
in interface GeometryList<LinearComboCurve,Curve>
array
- the curves to be inserted into this collection with a default weight
of 1.0 assigned to each. May not be null.true
if this collection changed as a result of the call.DimensionException
- if the input curve dimensions are different from this
list's dimensions.public boolean add(int index, Curve... array)
Curve
objects in the specified list of arguments into
this LinearComboCurve at the specified position with a default weight of 1.0
assigned to each. Shifts the element currently at that position (if any) and any
subsequent elements to the right (increases their indices). The new elements will
appear in this list in the order that they are appeared in the array. The input
curve must have the same physical dimensions as the other items in this list, or an
exception is thrown.add
in interface GeometryList<LinearComboCurve,Curve>
index
- index at which to insert first element from the specified array.array
- the curves to be inserted into this collection with a default weight
of 1.0 for each. May not be null.true
if this collection changed as a result of the call.DimensionException
- if the input curve dimensions are different from this
list's dimensions.public boolean addAll(java.util.Collection<? extends Curve> curves)
addAll
in interface java.util.Collection<Curve>
addAll
in interface java.util.List<Curve>
curves
- curves to be inserted into this list with a default of 1.0 for each.
May not be null.true
if this LinearComboCurve changed as a result of the callDimensionException
- if the input curve dimensions are different from this
list's dimensions.public boolean addAll(int index, java.util.Collection<? extends Curve> curves)
addAll
in interface java.util.List<Curve>
index
- index at which to insert first curve from the specified collection.curves
- curves to be inserted into this list with default weights of 1.0 for
each. May not be null.true
if this LinearComboCurve changed as a result of the callDimensionException
- if the input curve dimensions are different from this
list's dimensions.public boolean addAll(java.util.Collection<? extends Curve> curves, java.util.Collection<java.lang.Double> weights)
addAll
in interface LinearCombination<LinearComboCurve,Curve>
curves
- the curves to be appended onto this list of curves. May not be null.weights
- the linear combination weights associated with all of the curves
being appended. May not be null and must be the same size as
"curves".true
if this LinearComboCurve changed as a result of the callDimensionException
- if the input curve dimensions are different from this
list's dimensions.public boolean addAll(int index, java.util.Collection<? extends Curve> curves, java.util.Collection<java.lang.Double> weights)
addAll
in interface LinearCombination<LinearComboCurve,Curve>
index
- index at which to insert first curve from the specified collection.curves
- the curves to be inserted into this linear combination. May not be null.weights
- the linear combination weights associated with each curve being
inserted. May not be null and must be the same size as "curves".true
if this LinearComboCurve changed as a result of the callDimensionException
- if the input curve dimensions are different from this
list's dimensions.public boolean addAll(Curve[] arr)
addAll
in interface GeometryList<LinearComboCurve,Curve>
arr
- curves to be appended onto this collection with a default weight of 1.0
for each. May not be null.true
if this collection changed as a result of the call.DimensionException
- if the input curve dimensions are different from this
list's dimensions.public boolean addAll(int index, Curve[] arr)
Curve
objects in the specified array into this
LinearComboCurve at the specified position with a default weight of 1.0 assigned to
each. Shifts the element currently at that position (if any) and any subsequent
elements to the right (increases their indices). The new elements will appear in
this list in the order that they are returned by the specified collection's
iterator. The input curves must have the same physical dimensions as the other
items in this list, or an exception is thrown.addAll
in interface GeometryList<LinearComboCurve,Curve>
index
- index at which to insert first element from the specified array.arr
- the curves to be inserted into this collection with a default weight
of 1.0 for each. May not be null.true
if this collection changed as a result of the call.DimensionException
- if the input curve dimensions are different from this
list's dimensions.public Curve set(int index, Curve curve)
set
in interface java.util.List<Curve>
index
- The index of the curve to replace (0 returns the 1st curve, -1 returns
the last, -2 returns the 2nd from last, etc).curve
- The curve to be stored at the specified position. The weight at that
position is left unchanged. May not be null.java.lang.IndexOutOfBoundsException
- - if index > size()
DimensionException
- if the input curve dimensions are different from this
list's dimensions.public java.lang.Double setWeight(int index, java.lang.Double weight)
setWeight
in interface LinearCombination<LinearComboCurve,Curve>
index
- The index of the weight to replace (0 returns the 1st element, -1
returns the last, -2 returns the 2nd from last, etc).weight
- The weight to be stored at the specified position. The curve at that
position is left unchanged. May not be null.java.lang.IndexOutOfBoundsException
- - if index > size()
public Curve set(int index, Curve curve, java.lang.Double weight)
set
in interface LinearCombination<LinearComboCurve,Curve>
index
- The index of the curve and weight to replace (0 returns the 1st
element, -1 returns the last, -2 returns the 2nd from last, etc).curve
- The curve to be stored at the specified position. May not be null.weight
- The weight to be stored at the specified position. May not be null.java.lang.IndexOutOfBoundsException
- - if index > size()
DimensionException
- if the input curve dimensions are different from this
list's dimensions.public boolean removeAll(java.util.Collection<?> c)
Curve
objects that are contained in the
specified collection.public boolean retainAll(java.util.Collection<?> c)
Curve
objects that are not contained in the specified collection.public boolean remove(java.lang.Object o)
Curve
(and its associated
weight) from this collection, if it is present. More formally, removes an element e
such that (o==null ? e==null : o.equals(e)), if this collection contains one or
more such elements. Returns true if this collection contained the specified curve
(or equivalently, if this collection changed as a result of the call).public Curve remove(int index)
remove
in interface java.util.List<Curve>
index
- the index of the curve and weight to remove. (0 returns the 1st
element, -1 returns the last, -2 returns the 2nd from last, etc).public Curve remove(java.lang.String name)
remove
in interface GeometryList<LinearComboCurve,Curve>
name
- the name of the element to remove.public void clear()
public java.util.Iterator<Curve> iterator()
public java.util.ListIterator<Curve> listIterator()
listIterator
in interface java.util.List<Curve>
public java.util.ListIterator<Curve> listIterator(int index)
listIterator
in interface java.util.List<Curve>
index
- the index of first Curve to be returned from the list iterator (by a
call to the next method).public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<Curve>
toArray
in interface java.util.List<Curve>
T
- The type of elements in this LinearComboCurve (Curve type).a
- the array into which the elements of the collection are to be stored, if
it is big enough; otherwise, a new array of the same type is allocated
for this purpose.public int getPhyDimension()
getPhyDimension
in interface GeomElement<LinearComboCurve>
public Point getRealPoint(double s)
getRealPoint
in interface Curve<LinearComboCurve>
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<LinearComboCurve>
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 GeomList<LinearComboCurve> splitAt(double s)
splitAt
in interface Curve<LinearComboCurve>
s
- The parametric position where this curve should be split (must not be 0 or
1!).public boolean isValid()
true
if this LinearComboCurve contains valid and finite numerical
components. A value of false
will be returned if any of the coordinate
values or weights are NaN or Inf.isValid
in interface GeomElement<LinearComboCurve>
public LinearComboCurve getTransformed(GTransform transform)
GeomTransform
and contains transformed versions of the contents
of this list as children.getTransformed
in interface Transformable<LinearComboCurve>
transform
- The transformation to apply to this geometry. May not be null.DimensionException
- if this surface is not 3D.public Point getBoundsMin()
getBoundsMin
in interface GeomElement<LinearComboCurve>
java.lang.IndexOutOfBoundsException
- if this list contains no geometry.public Point getBoundsMax()
getBoundsMax
in interface GeomElement<LinearComboCurve>
java.lang.IndexOutOfBoundsException
- if this list contains no elements.public Unit<Length> getUnit()
getUnit
in interface GeomElement<LinearComboCurve>
public LinearComboCurve to(Unit<Length> unit) throws ConversionException
to
in interface Curve<LinearComboCurve>
to
in interface GeomElement<LinearComboCurve>
to
in interface GeometryList<LinearComboCurve,Curve>
to
in interface ParametricGeometry<LinearComboCurve>
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 LinearComboCurve toDimension(int newDim)
toDimension
in interface Curve<LinearComboCurve>
toDimension
in interface GeomElement<LinearComboCurve>
toDimension
in interface GeometryList<LinearComboCurve,Curve>
toDimension
in interface ParametricGeometry<LinearComboCurve>
newDim
- The dimension of the curve to return.public NurbsCurve toNurbs(Parameter<Length> tol)
toNurbs
in interface Curve<LinearComboCurve>
tol
- The greatest possible difference between this curve and the NURBS
representation returned. May not be null.public javolution.text.Text toText()
toText
in interface GeomElement<LinearComboCurve>
toText
in class AbstractGeomElement<LinearComboCurve>
public boolean equals(java.lang.Object obj)
Curve
objects for
equality. Returns true if and only if both collections are of the same type and
both collections contain equal elements in the same order.equals
in interface java.util.Collection<Curve>
equals
in interface java.util.List<Curve>
equals
in class AbstractGeomElement<LinearComboCurve>
obj
- the object to compare with.true
if this list is identical to that list;
false
otherwise.public int hashCode()
LinearComboCurve
.hashCode
in interface java.util.Collection<Curve>
hashCode
in interface java.util.List<Curve>
hashCode
in class AbstractGeomElement<LinearComboCurve>
public LinearComboCurve copy()
LinearComboCurve
instance
allocated
by the calling thread
(possibly on the stack).copy
in interface Curve<LinearComboCurve>
copy
in interface GeomElement<LinearComboCurve>
copy
in interface ParametricGeometry<LinearComboCurve>
public LinearComboCurve copyToReal()
copyToReal
in interface Curve<LinearComboCurve>
copyToReal
in interface GeomElement<LinearComboCurve>
public void reset()
super.reset();
to ensure that the state
is reset properly.reset
in interface javolution.lang.Reusable
reset
in class AbstractGeomElement<LinearComboCurve>
public static void recycle(LinearComboCurve instance)
instance
- The instance to be recycled.