|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvrml.Field
vrml.MField
vrml.field.MFVec2f
public class MFVec2f
Represents a VRML MFVec2f field in Java.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class vrml.Field |
---|
clone, dispose, finalize, getPeer, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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 pairsMethod Detail |
---|
public int getSize()
MField
getSize
in class MField
public void clear()
MField
clear
in class MField
public void delete(int index)
MField
delete
in class MField
index
- Index of field to delete.public 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |