Package org.web3d.x3d.sai
Interface MFColorRGBA
- All Known Implementing Classes:
MFColorRGBAObject
public interface MFColorRGBA extends MField
MFColorRGBA specifies zero or more SFColorRGBA 4-tuples. Each color value is an RGBA 4-tuple of floating point numbers in the range 0.0 to 1.0. Alpha (opacity) values = (1 - transparency). The default value of an uninitialized MFColor field is the empty list. Individual SFColorRGBA array values are optionally separated by commas.
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
-
Method Summary
Modifier and Type Method Description voidappend(float[] newValue)Places a new value at the end of the existing value array, increasing the field length accordingly.voidget1Value(int index, float[] valueDestination)Get an individual value from the existing field array.voidgetValue(float[] valueDestination)Write out the current value of this field into the external valueDestination array.voidgetValue(float[][] valueDestination)Write out the current value of this field into the external valueDestination array.voidinsertValue(int index, float[] newValue)Insert a new value prior to the index location in the existing value array, increasing the field length accordingly.voidset1Value(int index, float[] newValue)Replace a single value at the appropriate location in the existing value array.voidsetValue(int numColors, float[] newValue)Assign a new value to this field.voidsetValue(int numColors, float[][] newValue)Assign a new value to this field.Methods inherited from interface org.web3d.x3d.sai.X3DField
addX3DEventListener, getDefinition, isReadable, isWritable, removeX3DEventListener
-
Method Details
-
getValue
void getValue(float[][] valueDestination)Write out the current value of this field into the external valueDestination array.- Parameters:
valueDestination- The array to be filled in with current field values.- Throws:
java.lang.ArrayIndexOutOfBoundsException- The provided valueDestination array was too small.
-
getValue
void getValue(float[] valueDestination)Write out the current value of this field into the external valueDestination array.- Parameters:
valueDestination- The array to be filled in with current field values.- Throws:
java.lang.ArrayIndexOutOfBoundsException- The provided valueDestination array was too small.
-
get1Value
void get1Value(int index, float[] valueDestination)Get an individual value from the existing field array.
If the index is outside the bounds of the current array of data values, an ArrayIndexOutOfBoundsException is thrown.
- Parameters:
index- is position of selected value in current arrayvalueDestination- The array to be filled in with the selected current field value.- Throws:
java.lang.ArrayIndexOutOfBoundsException- The index was outside of the bounds of the current array.
-
setValue
void setValue(int numColors, float[] newValue)Assign a new value to this field.- Parameters:
numColors- The number of 3-tuple RGB colors in the newValue arraynewValue- the newValue to set
-
setValue
void setValue(int numColors, float[][] newValue)Assign a new value to this field.- Parameters:
numColors- The number of 3-tuple RGB colors in the newValue arraynewValue- the newValue to set
-
set1Value
void set1Value(int index, float[] newValue)Replace a single value at the appropriate location in the existing value array. Size of the current underlying value array does not change. Warning: newValue array length must correspond to tuple size for base type MFColorRGBA tuple size of 4.- Parameters:
index- is position of selected value in current arraynewValue- provides new value to apply
-
append
void append(float[] newValue)Places a new value at the end of the existing value array, increasing the field length accordingly. Warning: newValue array length must correspond to tuple size for base type MFColorRGBA tuple size of 4.- Parameters:
newValue- The newValue to append
-
insertValue
void insertValue(int index, float[] newValue)Insert a new value prior to the index location in the existing value array, increasing the field length accordingly. Warning: newValue array length must correspond to tuple size for base type MFColorRGBA tuple size of 4.- Parameters:
index- The position for the inserted value in the current arraynewValue- The newValue to insert
-