|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvrml.Field
vrml.MField
vrml.field.MFVec2d
public class MFVec2d
Represents a VRML MFVec2d field in Java.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
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 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 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(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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |