SbColor(3)
π SbColor(3) β the manual page, but make it cute π
okay bestie, welcome to the SbColor(3) page from the Library Functions Manual π«Ά this is the whole thing, every last flag and function, just... with β¨personalityβ¨. buckle up. π
πΈ NAME πΈ
SbColor β the class that holds the red, green and blue components that make up a color value. that's it. that's the whole job. iconic. π
β¨ SYNOPSIS β¨
#include <Inventor/SbColor.h>
Inherits SbVec3f. yes she's a nepo baby, and she slays. π
π«Ά Public Member Functions
SbColor (void)
SbColor (const SbVec3f &v)
SbColor (const float *const rgb)
SbColor (const float r, const float g, const float b)
SbColor & setHSVValue (float h, float s, float v)
SbColor & setHSVValue (const float hsv[3])
void getHSVValue (float &h, float &s, float &v) const
void getHSVValue (float hsv[3]) const
SbColor & setPackedValue (const uint32_t rgba, float &transparency)
uint32_t getPackedValue (const float transparency=0.0f) const
𧬠Public Member Functions inherited from SbVec3f
SbVec3f (void)
SbVec3f (const float v[3])
SbVec3f (float x, float y, float z)
SbVec3f (const SbVec3d &v)
SbVec3f (const SbVec3b &v)
SbVec3f (const SbVec3s &v)
SbVec3f (const SbVec3i32 &v)
SbVec3f (const SbPlane &p0, const SbPlane &p1, const SbPlane &p2)
SbVec3f & setValue (const float v[3])
SbVec3f & setValue (float x, float y, float z)
SbVec3f & setValue (const SbVec3f &barycentric, const SbVec3f &v0, const
SbVec3f &v1, const SbVec3f &v2)
SbVec3f & setValue (const SbVec3d &v)
SbVec3f & setValue (const SbVec3b &v)
SbVec3f & setValue (const SbVec3s &v)
SbVec3f & setValue (const SbVec3i32 &v)
const float * getValue (void) const
void getValue (float &x, float &y, float &z) const
float & operator[] (int i)
const float & operator[] (int i) const
SbBool equals (const SbVec3f &v, float tolerance) const
SbVec3f cross (const SbVec3f &v) const
float dot (const SbVec3f &v) const
SbVec3f getClosestAxis (void) const
float length (void) const
float sqrLength (void) const
float normalize (void)
void negate (void)
SbVec3f & operator*= (float d)
SbVec3f & operator/= (float d)
SbVec3f & operator+= (const SbVec3f &v)
SbVec3f & operator-= (const SbVec3f &v)
SbVec3f operator- (void) const
void print (FILE *fp) const
π Additional Inherited Members
π Protected Attributes inherited from SbVec3f
float vec [3]
π Related Symbols inherited from SbVec3f
SbVec3f operator* (const SbVec3f &v, float d)
SbVec3f operator* (float d, const SbVec3f &v)
SbVec3f operator/ (const SbVec3f &v, float d)
SbVec3f operator+ (const SbVec3f &v1, const SbVec3f &v2)
SbVec3f operator- (const SbVec3f &v1, const SbVec3f &v2)
int operator== (const SbVec3f &v1, const SbVec3f &v2)
int operator!= (const SbVec3f &v1, const SbVec3f &v2)
π Detailed Description π
The SbColor class contains the red, green and blue components which make up a color value.
This class is used within other classes in Coin. It inherits the SbVec3f class, interpreting the 3 component vector as a vector in the RGB cube where the red, green and blue components corresponds to x, y and z respectively. so like, it's a 3D vector but the axes are colors. main character energy fr fr. π
SbColor also adds a few extra methods for convenient handling of setting and getting color values as 32 bit packed values or as HSV values. she does a little extra. as she should. π
See also
SbVec3f, SbColor4f
π οΈ Constructor & Destructor Documentation π οΈ
SbColor::SbColor (void )
Default constructor. The color value will be uninitialized. π
bestie. she is EMPTY. not black, not white β just vibes and uninitialized memory. set her before you use her, i'm begging. π
SbColor::SbColor (const SbVec3f & v)
Construct and initialize an SbColor with the red, green and blue values given by the v vector.
SbColor::SbColor (const float *const rgb)
Construct and initialize an SbColor with the red, green and blue taken from given rgb array.
SbColor::SbColor (const float r, const float g, const float b)
Construct and initialize an SbColor with the given red, green and blue values. three floats, one dream. π
β¨ Member Function Documentation β¨
SbColor & SbColor::setHSVValue (float hue, float saturation, float value)
Set the color as a hue, saturation, value triplet. The hue component should be normalized to within [0, 1] before you call this method, where 0 is equal to 0Β° and 1 is equal to 360Β°.
See also
getHSVValue().
SbColor & SbColor::setHSVValue (const float hsv[3])
Set the color as a hue, saturation, value triplet. The hue component should be normalized to within [0, 1] before you call this method, where 0 is equal to 0Β° and 1 is equal to 360Β°.
See also
getHSVValue().
void SbColor::getHSVValue (float & h, float & s, float & v) const
Return the color as a hue, saturation, value triplet. π¨
See also
setHSVValue().
void SbColor::getHSVValue (float hsv[3]) const
Return the color as a hue, saturation, value triplet. π¨
See also
setHSVValue().
SbColor & SbColor::setPackedValue (const uint32_t rgba, float & transparency)
Set the color value as a 32 bit combined red/green/blue/alpha value. Each component is 8 bit wide (i.e. from 0x00 to 0xff), and the red value should be stored leftmost, like this: 0xRRGGBBAA. π¦
The transparency value is not stored internally in SbColor, just converted to a transparency value in [0, 1] and returned in the transparency field. A value of 1.0 means completely transparent and a value of 0.0 is completely opaque.
See also
getPackedValue().
uint32_t SbColor::getPackedValue (const float transparency = 0.0f) const
Return color as a 32 bit packed integer in the form 0xRRGGBBAA. The transparency part of the return value is taken from the supplied transparency argument. π₯
See also
setPackedValue().
π Author π
Generated automatically by Doxygen for Coin from the source code. (not a human, just a very thorough robot. respect. π«‘)
okay that's the whole page bestie, no notes, every option accounted for π this little gem comes to you from Coin, Version 3.1.3, dated alongside the SbColor(3) page itself β so go forth, set those HSV values, pack those RGBA bytes, and remember: normalize your hue before you call setHSVValue(). i'm so serious. β¨π
π¦
π¦ where this page comes from
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms