SbColor4f - Online Linux Manual PageSection : 3
Updated : Mon Jan 25 2021
Source : Version 3.1.3
Note : Coin
NAMESbColor4f − The SbColor4f class contains the red, green, blue and alpha components which make up a color value.
SYNOPSIS
#include <Inventor/SbColor4f.h> Inherits SbVec4f.
Public Member FunctionsSbColor4f (void)
SbColor4f (const SbColor &rgb, const float alpha)
SbColor4f (const SbVec4f &v)
SbColor4f (const float *const rgba)
SbColor4f (const float r, const float g, const float b, const float a=1.0f)
void setValue (const float r, const float g, const float b, const float a=1.0f)
void setValue (const float col[4])
const float * getValue () const
void getValue (float &r, float &g, float &b, float &a)
SbColor4f & setRGB (const SbColor &col)
void getRGB (SbColor &color)
SbColor4f & setHSVValue (float h, float s, float v, float a=1.0f)
SbColor4f & setHSVValue (const float hsv[3], float alpha=1.0f)
void getHSVValue (float &h, float &s, float &v) const
void getHSVValue (float hsv[3]) const
SbColor4f & setPackedValue (const uint32_t rgba)
uint32_t getPackedValue () const
float operator[] (const int idx) const
float & operator[] (const int idx)
SbColor4f & operator*= (const float d)
SbColor4f & operator/= (const float d)
SbColor4f & operator+= (const SbColor4f &c)
SbColor4f & operator−= (const SbColor4f &c)
Additional Inherited Members
Detailed DescriptionThe SbColor4f class contains the red, green, blue and alpha components which make up a color value. This class is used internally within other classes in Coin. It contains a 4 component vector as a position in the RGB cube with an additional transparency value. The red, green and blue values should be between 0.0 and 1.0, where 0.0 is interpreted as minimum intensity, and 1.0 is maximum intensity. The transparency value is also between 0.0 and 1.0. SbColor4f contains methods for convenient handling of setting and getting color values as 32 bit packed values or as HSV values. Note: this class is not part of Open Inventor, but is an extension to the API. Don't use it if you want your code to be compatible with Open Inventor. See also SbColor
Constructor & Destructor Documentation
SbColor4f::SbColor4f (void)Default constructor. The color value will be uninitialized until explicitly set.
SbColor4f::SbColor4f (const SbColor & rgb, const float alpha)Construct and initialize an SbColor4f with the red, green and blue components from the SbColor rgb, and the alpha value from the supplied alpha argument.
SbColor4f::SbColor4f (const SbVec4f & v)Construct and initialize an SbColor4f with the red, green, blue and alpha values given by the v vector.
SbColor4f::SbColor4f (const float *const rgba)Construct and initialize an SbColor4f with the red, green, blue and alpha taken from given rgba array
SbColor4f::SbColor4f (const float r, const float g, const float b, const float a = 1.0f)Construct and initialize an SbColor4f with the given red, green, blue and alpha values.
Member Function Documentation
void SbColor4f::setValue (const float r, const float g, const float b, const float a = 1.0f)Set a new color.
void SbColor4f::setValue (const float col[4])Set a new color. The elements of the array will be read in turned as red, green, blue and transparency.
const float * SbColor4f::getValue (void) constReturn pointer to array of 4 float values representing the red, green, blue and transparency values of the color.
void SbColor4f::getValue (float & r, float & g, float & b, float & a)Return components of the stored color.
SbColor4f & SbColor4f::setRGB (const SbColor & col)Sets the RGB components of the color. The alpha component is left unchanged.
void SbColor4f::getRGB (SbColor & color)Returns the RGB components of this color.
SbColor4f & SbColor4f::setHSVValue (float hue, float saturation, float value, float alpha = 1.0f)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().
SbColor4f & SbColor4f::setHSVValue (const float hsv[3], float a = 1.0f)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 SbColor4f::getHSVValue (float & h, float & s, float & v) constReturn the color as a hue, saturation, value triplet. Alpha component is ignored. See also setHSVValue().
void SbColor4f::getHSVValue (float hsv[3]) constReturn the color as a hue, saturation, value triplet. Alpha component is ignored. See also setHSVValue().
SbColor4f & SbColor4f::setPackedValue (const uint32_t rgba)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. See also getPackedValue().
uint32_t SbColor4f::getPackedValue () constReturn color as a 32 bit packed integer in the form 0xRRGGBBAA. See also setPackedValue().
float SbColor4f::operator[] (const int idx) constReturns the color component represented by the given index idx. 0 is red, 1 is green, 2 is blue and 3 is the transparency value.
float & SbColor4f::operator[] (const int idx)Returns the color component represented by the given index idx. 0 is red, 1 is green, 2 is blue and 3 is the transparency value.
SbColor4f & SbColor4f::operator*= (const float d)Multiplies the RGB components by d. The alpha component is left unchanged.
SbColor4f & SbColor4f::operator/= (const float d)Divides the RGB components by d. The alpha component is left unchanged.
SbColor4f & SbColor4f::operator+= (const SbColor4f & c)Adds the RGB components. Alpha is ignored.
SbColor4f & SbColor4f::operator−= (const SbColor4f & c)Subtracts the RGB components. Alpha is ignored.
AuthorGenerated automatically by Doxygen for Coin from the source code. 0
Johanes Gumabo
Data Size : 32,814 byte
man-SbColor4f.3coin3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 3 / 237,857
Visitor ID : :
Visitor IP : 18.227.183.161 :
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.