public class SbColorRGBA extends SbVec4f
Values may be specified in the HSV (hue, saturation and value) color space, but are stored internally as RGBA values.
Starting with Open Inventor 9.0, packed color storage is consistent with documentation: previously, alpha value using packed color access method was considered as transparency. Nevertheless, for compatibility reason, user can go back to previous behavior by setting the OIV_COMPAT_COLOR_RGBA environment variable to 1.
See also:
Constructor and Description |
---|
SbColorRGBA()
Default constructor.
|
SbColorRGBA(float[] components) |
SbColorRGBA(float r,
float g,
float b,
float a)
Constructor that takes an RGBA value as 4 floats.
|
SbColorRGBA(SbColorRGBA copyFrom) |
SbColorRGBA(SbVec4f vec4f)
Constructor that takes an RGBA vector value.
|
Modifier and Type | Method and Description |
---|---|
float[] |
getHSVAValue()
Returns color value in the HSV (hue, saturation and value) plus Alpha color space.
|
int |
getPackedValue()
Returns an RGBA packed color value, derived from the color vector.
|
float[] |
getValue() |
SbColorRGBA |
setHSVAValue(float[] hsva)
Sets value of color vector from an HSV (Hue, Saturation, and Value) plus Alpha color value.
|
SbColorRGBA |
setHSVAValue(float h,
float s,
float v,
float a)
Sets value of color vector from an HSV (Hue, Saturation, and Value) plus Alpha color value.
|
SbColorRGBA |
setPackedValue(int orderedRGBA)
Sets value of color vector from an RGBA packed color value.
|
SbColorRGBA |
setValue(float[] components) |
SbColorRGBA |
setValue(float[] components,
int startIndex) |
void |
setValue(SbColorRGBA copyFrom) |
static SbColorRGBA[] |
toArray(long nativeArray,
long length) |
add, divide, dot, equals, equals, getCoord, getReal, getValueAt, getW, getX, getY, getZ, length, lengthSquared, minus, multiply, negate, normalize, over, plus, setCoord, setValue, setValue, setValue, setValueAt, setW, setX, setY, setZ, substract, times
public SbColorRGBA(SbColorRGBA copyFrom)
public SbColorRGBA(float[] components)
public SbColorRGBA()
public SbColorRGBA(SbVec4f vec4f)
public SbColorRGBA(float r, float g, float b, float a)
public SbColorRGBA setValue(float[] components, int startIndex)
public SbColorRGBA setValue(float[] components)
public void setValue(SbColorRGBA copyFrom)
public int getPackedValue()
public static SbColorRGBA[] toArray(long nativeArray, long length)
public SbColorRGBA setPackedValue(int orderedRGBA)
RGBA component values range from 0 to 0xFF (255).
See also OIV_COMPAT_COLOR_RGBA.
public float[] getHSVAValue()
public SbColorRGBA setHSVAValue(float h, float s, float v, float a)
Value is the same as brightness of the color.
public SbColorRGBA setHSVAValue(float[] hsva)
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com