1SbColor(3IV)()                                                  SbColor(3IV)()
2
3
4

NAME

6       SbColor — color vector class
7

INHERITS FROM

9       SbVec3f
10

SYNOPSIS

12       #include <Inventor/SbColor.h>
13
14          Methods from class SbColor:
15
16                         SbColor(const SbVec3f vec3f)
17                         SbColor(const float rgb[3])
18                         SbColor(float r, float g, float b)
19     SbColor &           setHSVValue(float h, float s, float v)
20     SbColor &           setHSVValue(const float hsv[3])
21     void                getHSVValue(float &h, float &s, float &v) const
22     void                getHSVValue(float hsv[3]) const
23     SbColor &           setPackedValue(uint32_t rgba, float& transparency)
24     uint32_t            getPackedValue(float transparency = 0.0) const
25
26          Methods from class SbVec3f:
27
28     SbVec3f             cross(const SbVec3f &v) const
29     float               dot(const SbVec3f &v) const
30     SbBool              equals(const SbVec3f v, float tolerance) const
31     SbVec3f             getClosestAxis() const
32     const float *       getValue() const
33     void                getValue(float &x, float &y, float &z) const
34     float               length() const
35     void                negate()
36     float               normalize()
37     SbVec3f &           setValue(const float v[3])
38     SbVec3f &           setValue(float x, float y, float z)
39     SbVec3f  &           setValue(const  SbVec3f  &barycentic,  const SbVec3f
40                              &v0, const SbVec3f &v1, const SbVec3f &v2)
41     float &             operator [](int i)
42     const float &       operator [](int i)
43     SbVec3f &           operator *=(float d)
44     SbVec3f &           operator /=(float d)
45     SbVec3f &           operator +=(const SbVec3f &u)
46     SbVec3f &           operator -=(const SbVec3f &u)
47     SbVec3f             operator -() const
48     SbVec3f             operator *(const SbVec3f &v, float d)
49     SbVec3f             operator *(float d, const SbVec3f &v)
50     SbVec3f             operator /(const SbVec3f &v, float d)
51     SbVec3f             operator +(const SbVec3f &v1, const SbVec3f &v2)
52     SbVec3f             operator -(const SbVec3f &v1, const SbVec3f &v2)
53     int                 operator ==(const SbVec3f &v1, const SbVec3f &v2)
54     int                 operator !=(const SbVec3f &v1, const SbVec3f &v2)
55
56

DESCRIPTION

58       This class is used to represent an RGB color.  Each  component  of  the
59       vector  is  a floating-point number between 0.0 and 1.0. There are rou‐
60       tines to convert back and forth between RGB and HSV.
61

METHODS

63                         SbColor(const SbVec3f vec3f)
64                         SbColor(const float rgb[3])
65                         SbColor(float r, float g, float b)
66          Constructors for color vector.
67
68     SbColor &           setHSVValue(float h, float s, float v)
69          Sets value of color vector from 3 HSV (Hue, Saturation,  and  Value)
70          components. Value is the same as brightness of the color.
71
72     SbColor &           setHSVValue(const float hsv[3])
73          Sets value of color vector from array of 3 HSV components
74
75     void                getHSVValue(float &h, float &s, float &v) const
76          Returns 3 individual HSV components
77
78     void                getHSVValue(float hsv[3]) const
79          Returns an array of 3 HSV components
80
81     SbColor &           setPackedValue(uint32_t rgba, float& transparency)
82          Sets  value  of  color  vector  from an RGBA packed color value. The
83          packed color format expressed in hexadecimal is 0xrrggbbaa, where
84
85                                   rr is the red value
86                                   gg is the green value
87                                   bb is the blue value
88                                   aa is the alpha value
89
90          RGBA component values range from  0  to  0xFF  (255).  The  returned
91          transparency  value  is  a floating point value between 0.0 (opaque)
92          and 1.0 (completely transparent). It is derived from the alpha  com‐
93          ponent of the RGBA color.
94
95     uint32_t            getPackedValue(float transparency = 0.0) const
96          Returns  an  RGBA  packed color value, derived from the color vector
97          and the passed transparency value. The alpha  component  is  set  to
98          (1.0  -  transparency) * 255, resulting in a hex value between 0 and
99          0xFF.  If transparency not specified, alpha is set to 0xFF (opaque).
100
101
102
103
104                                                                SbColor(3IV)()
Impressum