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