public class SbColor extends SbVec3f
See also:
Constructor and Description |
---|
SbColor()
Default constructor.
|
SbColor(java.awt.Color c) |
SbColor(float[] components) |
SbColor(float r,
float g,
float b)
Constructor that takes 3 floats.
|
SbColor(SbColor copyFrom) |
SbColor(SbVec3f vec3f)
Constructor that takes a vector value.
|
Modifier and Type | Method and Description |
---|---|
float[] |
getHSVValue()
Returns 3 individual HSV components.
|
void |
getHSVValue(float[] hsv)
Deprecated.
|
int |
getPackedValue()
Calls getPackedValue((float)0.0).
|
int |
getPackedValue(float transparency)
Returns an RGBA packed color value, derived from the color vector and the passed transparency value.
|
int |
getPackedValueEndiannessOrder()
Calls getPackedValueEndiannessOrder((float)0.0).
|
int |
getPackedValueEndiannessOrder(float transparency)
Returns an RGBA packed color value, derived from the color vector and the passed transparency value.
|
int |
getPackedValueInternal()
Deprecated.
|
int |
getPackedValueInternal(float transparency)
Deprecated.
As of Open Inventor 9500 See documentation for more details
|
float[] |
getValue() |
SbColor |
setHSVValue(float[] hsv)
Sets value of color vector from array of 3 HSV components.
|
SbColor |
setHSVValue(float h,
float s,
float v)
Sets value of color vector from 3 HSV (Hue, Saturation, and Value) components.
|
SbColor |
setPackedValue(int orderedRGBA,
float transparency)
Sets value of color vector from an RGBA packed color value.
|
SbColor |
setPackedValue(long rgba,
float[] transparency)
RGBA Packed integer color routines.
|
SbColor |
setValue(float[] components) |
SbColor |
setValue(float[] components,
int startIndex) |
void |
setValue(SbColor copyFrom) |
static SbColor[] |
toArray(long nativeArray,
long length) |
java.awt.Color |
toAWTColor() |
add, cross, divide, dot, equals, equals, getClosestAxis, getCoord, getValueAt, getX, getY, getZ, length, lengthSquared, minus, multiply, multiply, negate, normalize, over, plus, setCoord, setValue, setValue, setValue, setValue, setValueAt, setX, setY, setZ, substract, times, times
public SbColor(java.awt.Color c)
public SbColor(float[] components)
public SbColor(SbColor copyFrom)
public SbColor(SbVec3f vec3f)
public SbColor(float r, float g, float b)
public SbColor()
public SbColor setPackedValue(long rgba, float[] transparency)
rgba
- The color format expressed in hexadecinal is 0xrrggbbaa, where
aa is the alpha value, bb is the blue value, gg is the
green value and rr is the red value.transparency
- is an array which first component will contain the transparency
value, after return. You just need to pass a one element float array.public java.awt.Color toAWTColor()
@Deprecated public void getHSVValue(float[] hsv)
public void setValue(SbColor copyFrom)
public int getPackedValueEndiannessOrder()
@Deprecated public int getPackedValueInternal()
public int getPackedValue()
public SbColor setValue(float[] components, int startIndex)
public SbColor setHSVValue(float h, float s, float v)
public static SbColor[] toArray(long nativeArray, long length)
public SbColor setHSVValue(float[] hsv)
public SbColor setPackedValue(int orderedRGBA, float transparency)
RGBA component values range from 0 to 0xFF (255). The returned transparency value is a floating point value between 0.0 (opaque) and 1.0 (completely transparent). It is derived from the alpha component of the RGBA color.
public int getPackedValueEndiannessOrder(float transparency)
This method takes "endianness" in account and will return a value according to the processor architecture. For example, on "little-endian" processors like Intel, the color value returned is actually 0xaabbggrr. See the note in SoVolumeData
about constructing RGBA voxel values programmatically.
public int getPackedValue(float transparency)
@Deprecated public int getPackedValueInternal(float transparency)
public float[] getHSVValue()
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com