public class MFColor extends MField
| Constructor and Description |
|---|
MFColor()
Default constructor.
|
MFColor(float[] colors)
Construct an MFColor field.
|
MFColor(float[][] colors)
Construct a new MFColor object using the given 2D array containing
RGB values.
|
MFColor(int size,
float[] colors)
Construct an MFColor field.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addValue(ConstSFColor color)
Append a new element to the end of an MFColor field.
|
void |
addValue(float red,
float green,
float blue)
Append a new element to the end of an MFColor field.
|
void |
addValue(SFColor color)
Append a new element to the end of an MFColor field.
|
void |
clear()
Removes all fields from the MField.
|
void |
delete(int index)
Deletes a field from the MField.
|
void |
get1Value(int index,
float[] colors)
Retrieves a specific SFColor element in an MFColor and
returns it as a float array.
|
void |
get1Value(int index,
SFColor color)
Retrieves a specific SFColor element in an MFColor and
returns it as an SFColor object.
|
int |
getSize()
Number of elements contained in the MField.
|
void |
getValue(float[] colors)
Retrieves the value of an MFColor field.
|
void |
getValue(float[][] colors)
Retrieves the value of an MFColor field.
|
void |
insertValue(int index,
ConstSFColor color)
Insert a new element at the specified position.
|
void |
insertValue(int index,
float red,
float green,
float blue)
Insert a new element at the specified position.
|
void |
insertValue(int index,
SFColor color)
Insert a new element at the specified position.
|
void |
set1Value(int index,
ConstSFColor color)
Set an element in an MFColor field.
|
void |
set1Value(int index,
float red,
float green,
float blue)
Set an element in an MFColor field.
|
void |
set1Value(int index,
SFColor color)
Set an element in an MFColor field.
|
void |
setValue(ConstMFColor colors)
Set the value of an MFColor field.
|
void |
setValue(float[] colors)
Set the value of an MFColor field.
|
void |
setValue(float[][] colors)
Set the value of an MFColor field.
|
void |
setValue(int size,
float[] colors)
Set the value of an MFColor field.
|
void |
setValue(MFColor colors)
Set the value of an MFColor field.
|
public MFColor()
public MFColor(float[][] colors)
colors - An array of sets of three float values (RGB)public MFColor(float[] colors)
colors - An array of RGB valuepublic MFColor(int size,
float[] colors)
size - Number of SFColor elements passed in.colors - List of RGB 3-tuplespublic int getSize()
MFieldpublic void clear()
MFieldpublic void delete(int index)
MFieldpublic void getValue(float[][] colors)
colors - 2D array of sets of RGB values to be returned.public void getValue(float[] colors)
colors - Array of sets of RGB values to be returned.public void get1Value(int index,
float[] colors)
index - Position of desired SFColorcolors - RGB value of specified SFColor.public void get1Value(int index,
SFColor color)
index - Position of desired SFColorcolor - SFColor that will be set to desired value.public void setValue(float[][] colors)
colors - Array of array of RGB values.public void setValue(float[] colors)
colors - Array of RGB values.public void setValue(int size,
float[] colors)
size - Number of elements to put in MFColor field.colors - Array of RGB values.public void setValue(MFColor colors)
colors - Existing MFColor object to copy values from.public void setValue(ConstMFColor colors)
colors - Existing ConstMFColor object to copy values from.public void set1Value(int index,
ConstSFColor color)
index - Position of element to set.color - Value to set element to.public void set1Value(int index,
SFColor color)
index - Position of element to set.color - Value to set element to.public void set1Value(int index,
float red,
float green,
float blue)
index - Position of element to set.red - R-component of new color.green - G-component of new color.blue - B-component of new color.public void addValue(ConstSFColor color)
color - Value to append.public void addValue(SFColor color)
color - Value to append.public void addValue(float red,
float green,
float blue)
red - R-component of new element.green - G-component of new element.blue - B-component of new element.public void insertValue(int index,
ConstSFColor color)
index - Position to insert new element at.color - Value to insert.public void insertValue(int index,
SFColor color)
index - Position to insert new element at.color - Value to insert.public void insertValue(int index,
float red,
float green,
float blue)
index - Position to insert new element at.red - R-component of new element.green - G-component of new element.blue - B-component of new element.