Package vrml.field
Class MFFloat
java.lang.Object
vrml.Field
vrml.MField
vrml.field.MFFloat
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final int
How much should we increment the array by when there is an add or insert request.protected float[]
The rot valuesFields inherited from class vrml.MField
numElements
Fields inherited from class vrml.Field
valueChanged
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addValue
(float f) Add this value to the end of the list.void
Add this value to the end of the list.void
Add this value to the end of the list.void
clear()
Clear the field of all elementsclone()
Make a clone of this object.void
delete
(int index) Remove the element at the given position and shift any other items down.float
get1Value
(int index) Get the value of the field at the given indexvoid
getValue
(float[] values) Copy the values from this field into the user arrayvoid
insertValue
(int index, float f) Insert a value at the given index into the arrayvoid
insertValue
(int index, ConstSFFloat f) Insert a value at the given index into the arrayvoid
insertValue
(int index, SFFloat f) Insert a value at the given index into the arrayvoid
set1Value
(int index, float f) Replace one value in the array with this value.void
set1Value
(int index, ConstSFFloat f) Replace one value in the array with this value.void
Replace one value in the array with this value.void
setValue
(float[] values) Replace the value of this array with the given valuesvoid
setValue
(int size, float[] values) Replace the value of this array with a subsection of the given values.void
setValue
(ConstMFFloat value) Set the value of this field based on the value of the given field.void
Set the value of this field based on the value of the given field.toString()
Create a string representation of the field values.
-
Field Details
-
ARRAY_INC
protected static final int ARRAY_INCHow much should we increment the array by when there is an add or insert request. This value is array items, not elements.- See Also:
-
data
protected float[] dataThe rot values
-
-
Constructor Details
-
MFFloat
public MFFloat()Create a new empty array with no content. -
MFFloat
public MFFloat(float[] values) Create a new float array based on all the values.- Parameters:
values
- The values to copy
-
MFFloat
public MFFloat(int size, float[] values) Create a new float array based on a selection of values- Parameters:
size
- The number of elements to copyvalues
- The values to copy
-
-
Method Details
-
getValue
public void getValue(float[] values) Copy the values from this field into the user array- Parameters:
values
- The target array to copy into
-
get1Value
public float get1Value(int index) Get the value of the field at the given index- Parameters:
index
- The position to get the value from- Returns:
- The value at that index
-
setValue
public void setValue(float[] values) Replace the value of this array with the given values- Parameters:
values
- The new values to use
-
setValue
public void setValue(int size, float[] values) Replace the value of this array with a subsection of the given values.- Parameters:
size
- The number of elements to copyvalues
- The new values to use
-
setValue
Set the value of this field based on the value of the given field.- Parameters:
value
- The field to copy data from
-
setValue
Set the value of this field based on the value of the given field.- Parameters:
value
- The field to copy data from
-
set1Value
public void set1Value(int index, float f) Replace one value in the array with this value.- Parameters:
index
- The index to replacef
- The new value to use
-
set1Value
Replace one value in the array with this value.- Parameters:
index
- The index to replacef
- The new value to use
-
set1Value
Replace one value in the array with this value.- Parameters:
index
- The index to replacef
- The new value to use
-
addValue
public void addValue(float f) Add this value to the end of the list.- Parameters:
f
- The new value to add
-
addValue
Add this value to the end of the list.- Parameters:
f
- The new value to add
-
addValue
Add this value to the end of the list.- Parameters:
f
- The new value to add
-
insertValue
public void insertValue(int index, float f) Insert a value at the given index into the array- Parameters:
index
- The index to replacef
- The new value to insert
-
insertValue
Insert a value at the given index into the array- Parameters:
index
- The index to replacef
- The new value to insert
-
insertValue
Insert a value at the given index into the array- Parameters:
index
- The index to replacef
- The new value to insert
-
clear
-
delete
-
toString
-
clone
-