SbColor - Online Linux Manual PageSection : 3
Updated : Mon Jan 25 2021
Source : Version 4.0.0
Note : Coin

NAMESbColor − The SbColor class contains the red, green and blue components which make up a color value​.

SYNOPSIS
#include <Inventor/SbColor​.h> Inherits SbVec3f​.

Public Member FunctionsSbColor (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

Additional Inherited Members

Detailed DescriptionThe 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​. 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​. See also SbVec3f, SbColor4f

Constructor & Destructor Documentation

SbColor::SbColor (void)Default constructor​. The color value will be uninitialized​.

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​.

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) constReturn the color as a hue, saturation, value triplet​. See also setHSVValue()​.

void SbColor::getHSVValue (float hsv[3]) constReturn 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) constReturn 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()​.

AuthorGenerated automatically by Doxygen for Coin from the source code​.
0
Johanes Gumabo
Data Size   :   20,674 byte
man-SbColor.3coin4Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 238,023
Visitor ID   :     :  
Visitor IP   :   3.137.174.253   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.