public class MFVec2d extends MField
Constructor and Description |
---|
MFVec2d()
Default constructor.
|
MFVec2d(double[] vec2s)
Construct an MFVec2d field.
|
MFVec2d(double[][] vec2s)
Construct an MFVec2d field.
|
MFVec2d(int size,
double[] vec2s)
Construct an MFVec2d field.
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(ConstSFVec2d vec)
Add a new element at the end of the list.
|
void |
addValue(double x,
double y)
Add a new element at the end of the list.
|
void |
addValue(SFVec2d vec)
Add a new element at the end of the list.
|
void |
clear()
Removes all fields from the MField.
|
void |
delete(int index)
Deletes a field from the MField.
|
void |
get1Value(int index,
double[] vec2s)
Retrieves a specific element in an MFVec2d and
returns it as a double array.
|
void |
get1Value(int index,
SFVec2d vec)
Retrieves a specific element in an MFVec2d and
returns it as an SFVec2d.
|
int |
getSize()
Number of elements contained in the MField.
|
void |
getValue(double[] vec2s)
Retrieves the value of an MFVec2d field.
|
void |
getValue(double[][] vec2s)
Retrieves the value of an MFVec2d field.
|
void |
insertValue(int index,
ConstSFVec2d vec)
Insert a new element at the specified position.
|
void |
insertValue(int index,
double x,
double y)
Insert a new element at the specified position.
|
void |
insertValue(int index,
SFVec2d vec)
Insert a new element at the specified position.
|
void |
set1Value(int index,
ConstSFVec2d vec)
Set a specified element in the field.
|
void |
set1Value(int index,
double x,
double y)
Set a specified element in the field.
|
void |
set1Value(int index,
SFVec2d vec)
Set a specified element in the field.
|
void |
setValue(ConstMFVec2d vecs)
Set the value of the field.
|
void |
setValue(double[] vec2s)
Set the value of the field.
|
void |
setValue(double[][] vec2s)
Set the value of the field.
|
void |
setValue(int size,
double[] vec2s)
Set the value of the field.
|
void |
setValue(MFVec2d vecs)
Set the value of the field.
|
public MFVec2d()
public MFVec2d(double[][] vec2s)
vec2s
- An array of sets of x,y valuespublic MFVec2d(double[] vec2s)
vec2s
- List of x,y pairspublic MFVec2d(int size, double[] vec2s)
size
- Number of SFVec2d elements passed in.vec2s
- List of x,y pairspublic int getSize()
MField
public void clear()
MField
public void delete(int index)
MField
public void getValue(double[][] vec2s)
vec2s
- 2D array of x,y pairs to be returned.public void getValue(double[] vec2s)
vec2s
- Array of x,y pairs to be returned.public void get1Value(int index, double[] vec2s)
index
- Position of desired elementvec2s
- Element at specified positionpublic void get1Value(int index, SFVec2d vec)
index
- Position of desired elementvec
- Element at specified positionpublic void setValue(double[][] vec2s)
vec2s
- New value for field.public void setValue(double[] vec2s)
vec2s
- New value for field.public void setValue(int size, double[] vec2s)
size
- Size of new value for field.vec2s
- New value for field.public void setValue(MFVec2d vecs)
vecs
- New value for field.public void setValue(ConstMFVec2d vecs)
vecs
- New value for field.public void set1Value(int index, double x, double y)
index
- Position of element to update.x
- X-component of the new value.y
- Y-component of the new value.public void set1Value(int index, ConstSFVec2d vec)
index
- Position of element to update.vec
- New value for element.public void set1Value(int index, SFVec2d vec)
index
- Position of element to update.vec
- New value for element.public void addValue(double x, double y)
x
- X-component of the vector to add.y
- Y-component of the vector to add.public void addValue(ConstSFVec2d vec)
vec
- Element to add.public void addValue(SFVec2d vec)
vec
- Element to add.public void insertValue(int index, double x, double y)
index
- Position to insert new element at.x
- X-component of value to insert.y
- Y-component of value to insert.public void insertValue(int index, ConstSFVec2d vec)
index
- Position to insert new element at.vec
- Value to insert.public void insertValue(int index, SFVec2d vec)
index
- Position to insert new element at.vec
- Value to insert.