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 an array of 3 HSV components.
|
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 Use getPackedValueendiannessOrder(float transparency = 0.0) const instead.
|
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.
|
void |
setRGBValue(byte r,
byte g,
byte b)
Set RGB values as unsigned char.
|
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, getValueAt, getX, getY, getZ, length, lengthSquared, minus, multiply, multiply, negate, normalize, over, plus, setValue, setValue, setValue, setValue, setValueAt, setX, setY, setZ, substract, times, times
public SbColor(java.awt.Color c)
public SbColor(SbColor copyFrom)
public SbColor(float[] components)
public SbColor(SbVec3f vec3f)
public SbColor()
public SbColor(float r, float g, float b)
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()
public int getPackedValue()
@Deprecated public int getPackedValueInternal()
public int getPackedValueEndiannessOrder()
public SbColor setValue(float[] components, int startIndex)
public void setValue(SbColor copyFrom)
public float[] getHSVValue()
public static SbColor[] toArray(long nativeArray, long length)
public int getPackedValue(float transparency)
public void setRGBValue(byte r, byte g, byte b)
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 SbColor setHSVValue(float[] hsv)
@Deprecated public int getPackedValueInternal(float transparency)
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 SbColor setHSVValue(float h, float s, float v)
Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com