public class SoMFColorRGBA extends SoMField
SbColorRGBA. RGBA stands for red, green, blue and alpha. Values should be in the range 0 to 1. Alpha is the inverse of "transparency", in other words 0 is fully transparent and 1 is fully opaque.
Values can also be specified or queried in the HSV (hue, saturation and value) color space, but values are stored internally as RGBA values.
SoMFColorRGBAs are written to file as one or more RGBA quadruples of floating point numbers in standard scientific notation. When more than one value is present, all of the values are enclosed in square brackets and separated by commas. For example:
represents the three colors half transparent red, fully opeque green, and one quarter transparent blue.[ 1.0 0.0 0.0 0.5, 0 1 0 1, 0 0 1 .25 ]
Data copying: SoMF fields are a kind of "smart container", automatically expanding as necessary to hold the data provided by the application. This is very convenient, but for large blocks of data it may be desireable to avoid making a copy of the application data. The setValuesBuffer() methods allow Open Inventor to directly use an array of values supplied by the application. The application data is not copied. Please see SoMFVec3f for more information and example code.
See also:
SoField.FieldTypesInventor.ConstructorCommandVERBOSE_LEVEL, ZeroHandle| Constructor and Description |
|---|
SoMFColorRGBA()
Deprecated.
As of Open Inventor 9.3 Use constructor with SoFieldContainer instead.
|
SoMFColorRGBA(SoFieldContainer fieldContainer,
java.lang.String fieldName,
SoField.FieldTypes fieldType)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
disableDeleteValues()
Temporary disable value deleting.
|
boolean |
equals(java.lang.Object obj) |
int |
find(SbColorRGBA targetValue)
Calls find(targetValue, false).
|
int |
find(SbColorRGBA targetValue,
boolean addIfNotFound)
Finds the given
targetValue in the array and returns the index of that value.
|
void |
finishEditing()
Indicates that batch edits have finished.
|
SbColorRGBA |
get1Value(int i)
Deprecated.
|
java.nio.FloatBuffer |
getDirectValues(int start)
Returns a pointer into the array of values in the field, starting at index start.
|
SbColorRGBA |
getValueAt(int i) |
SbColorRGBA[] |
getValues(int start)
Returns a pointer into the array of values in the field, starting at index start.
|
long |
getValueSize()
Get size of the value.
|
void |
set1HSVAValue(int index,
float[] hsva)
Sets one of N HSV plus Alpha colors from an array of 4 floats.
|
void |
set1HSVAValue(int index,
float h,
float s,
float v,
float a)
Sets one of N HSV plus Alpha colors from 4 floats.
|
void |
set1Value(int index,
float[] rgba)
Sets one of N RGBA colors from an array of 4 floats.
|
void |
set1Value(int index,
float r,
float g,
float b,
float a)
Sets one of N RGBA colors from 4 floats.
|
void |
set1Value(int index,
SbColorRGBA newValue)
Sets the
index'th value in the array to
newValue.
|
void |
set1Value(int index,
SbVec4f vec)
Sets one of N RGBA colors from
SbVec4f. |
void |
setHSVAValue(float[] hsva)
Sets the field to contain one and only one value, the given color (expressed as an array of HSV plus Alpha floating point values in the range 0.0 to 1.0), and deletes the second and subsequent values.
|
void |
setHSVAValue(float h,
float s,
float v,
float a)
Sets the field to contain one and only one value, the given color (expressed as HSV plus Alpha floating point values in the range 0.0 to 1.0), and deletes the second and subsequent values.
|
void |
setValue(float[] rgba)
Sets the field to contain one and only one value, the given color (expressed as an array of RGBA floating point values in the range 0.0 to 1.0), and deletes the second and subsequent values.
|
void |
setValue(float r,
float g,
float b,
float a)
Sets the field to contain one and only one value, the given color (expressed as RGBA floating point values in the range 0.0 to 1.0), and deletes the second and subsequent values.
|
void |
setValue(SbColorRGBA newValue)
Sets the first value in the array to
newValue, and deletes.
|
void |
setValue(SbVec4f vec)
Sets the field to contain one and only one value, the given color (expressed as RGBA floating point values in the range 0.0 to 1.0), and deletes the second and subsequent values.
|
void |
setValues(int start,
float[] rgba)
Sets RGBA values from the specified array of floats.
|
void |
setValues(int start,
int num,
float[] rgba)
Deprecated.
As of Open Inventor 9.3.1, use
setValues(int, float[])
instead. |
void |
setValues(int start,
SbColorRGBA[] newValues)
Sets
num values starting at index
start to the values.
|
void |
setValuesBuffer(java.nio.ByteBuffer userData)
Sets the field to contain the values stored in
userData.
|
java.nio.FloatBuffer |
startEditing()
Returns a pointer to the internally maintained array that can be modified.
|
deleteValues, deleteValues, get1, getNum, insertSpace, set1, setNumappendConnection, appendConnection, appendConnection, connectFrom, connectFrom, connectFrom, disconnect, disconnect, disconnect, disconnect, enableConnection, get, getConnectedEngine, getConnectedField, getConnectedVRMLInterp, getContainer, getNumConnections, isConnected, isConnectedFromEngine, isConnectedFromField, isConnectedFromVRMLInterp, isConnectionEnabled, isDefault, isIgnored, set, setIgnored, touchdispose, getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads@Deprecated public SoMFColorRGBA()
public SoMFColorRGBA(SoFieldContainer fieldContainer, java.lang.String fieldName, SoField.FieldTypes fieldType)
public void setValues(int start,
int num,
float[] rgba)
setValues(int, float[])
instead.@Deprecated public SbColorRGBA get1Value(int i)
public int find(SbColorRGBA targetValue)
public int find(SbColorRGBA targetValue, boolean addIfNotFound)
public void set1Value(int index,
SbColorRGBA newValue)
public void setValues(int start,
float[] rgba)
public void setValues(int start,
SbColorRGBA[] newValues)
public void finishEditing()
startEditing().public java.nio.FloatBuffer startEditing()
startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc.). Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to false and informs engines and sensors that the field changed, even if none of the values actually were changed.public SbColorRGBA[] getValues(int start)
startEditing()/finishEditing() methods for a way of modifying values in place.public java.nio.FloatBuffer getDirectValues(int start)
startEditing()/finishEditing() methods for a way of modifying values in place.public SbColorRGBA getValueAt(int i)
public void setValue(SbColorRGBA newValue)
public void setHSVAValue(float[] hsva)
public void setValuesBuffer(java.nio.ByteBuffer userData)
public void set1Value(int index,
SbVec4f vec)
SbVec4f.
The array will be expanded and filled with zeros as necessary.public void setHSVAValue(float h,
float s,
float v,
float a)
public void setValue(SbVec4f vec)
public void setValue(float r,
float g,
float b,
float a)
public void setValue(float[] rgba)
public void set1HSVAValue(int index,
float h,
float s,
float v,
float a)
public void set1HSVAValue(int index,
float[] hsva)
public void disableDeleteValues()
public long getValueSize()
getValueSize in class SoMFieldpublic void set1Value(int index,
float r,
float g,
float b,
float a)
public void set1Value(int index,
float[] rgba)
Generated on February 24, 2026, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com