GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SBCOLOR (3)

NAME

SbColor — color vector class

CONTENTS

Inherits From
Synopsis
Description
Methods
File Format/defaults

INHERITS FROM

SbVec3f

SYNOPSIS

#include <Inventor/SbColor.h>

Methods from class SbColor:

       
                    
                     SbColor(const SbVec3f vec3f)    
   
                    
                     SbColor(const float rgb[3])    
   
                    
                     SbColor(float r, float g, float b)    
SbColor &    
                    
SbColor &            setHSVValue(float h, float s, float v)    
SbColor &    
                    
SbColor &            setHSVValue(const float hsv[3])    
void    
                    
void                 getHSVValue(float &h, float &s, float &v) const    
void    
                    
void                 getHSVValue(float hsv[3]) const    
SbColor &    
                    
SbColor &            setPackedValue(uint32_t rgba, float& transparency)    
uint32_t    
                    
uint32_t             getPackedValue(float transparency = 0.0) const

Methods from class SbVec3f:

    SbVec3f    
                    
SbVec3f              cross(const SbVec3f &v) const    
float    
                    
float                dot(const SbVec3f &v) const    
SbBool    
                    
SbBool               equals(const SbVec3f v, float tolerance) const    
SbVec3f    
                    
SbVec3f              getClosestAxis() const    
const float *    
                    
const float *        getValue() const    
void    
                    
void                 getValue(float &x, float &y, float &z) const    
float    
                    
float                length() const    
void    
                    
void                 negate()    
float    
                    
float                normalize()    
SbVec3f &    
                    
SbVec3f &            setValue(const float v[3])    
SbVec3f &    
                    
SbVec3f &            setValue(float x, float y, float z)    
SbVec3f &    
                    
SbVec3f &            setValue(const SbVec3f &barycentic, const SbVec3f &v0, const SbVec3f &v1, const SbVec3f &v2)    
float &    
                    
float &              operator [](int i)    
const float &    
                    
const float &        operator [](int i)    
SbVec3f &    
                    
SbVec3f &            operator *=(float d)    
SbVec3f &    
                    
SbVec3f &            operator /=(float d)    
SbVec3f &    
                    
SbVec3f &            operator +=(const SbVec3f &u)    
SbVec3f &    
                    
SbVec3f &            operator -=(const SbVec3f &u)    
SbVec3f    
                    
SbVec3f              operator -() const    
SbVec3f    
                    
SbVec3f              operator *(const SbVec3f &v, float d)    
SbVec3f    
                    
SbVec3f              operator *(float d, const SbVec3f &v)    
SbVec3f    
                    
SbVec3f              operator /(const SbVec3f &v, float d)    
SbVec3f    
                    
SbVec3f              operator +(const SbVec3f &v1, const SbVec3f &v2)    
SbVec3f    
                    
SbVec3f              operator -(const SbVec3f &v1, const SbVec3f &v2)    
int    
                    
int                  operator ==(const SbVec3f &v1, const SbVec3f &v2)    
int    
                    
int                  operator !=(const SbVec3f &v1, const SbVec3f &v2)

DESCRIPTION

This class is used to represent an RGB color. Each component of the vector is a floating-point number between 0.0 and 1.0. There are routines to convert back and forth between RGB and HSV.

METHODS

       
                    
                     SbColor(const SbVec3f vec3f)    
   
                    
                     SbColor(const float rgb[3])    
   
                    
                     SbColor(float r, float g, float b)
Constructors for color vector.

    SbColor &    
                    
SbColor &            setHSVValue(float h, float s, float v)
Sets value of color vector from 3 HSV (Hue, Saturation, and Value) components. Value is the same as brightness of the color.

    SbColor &    
                    
SbColor &            setHSVValue(const float hsv[3])
Sets value of color vector from array of 3 HSV components

    void    
                    
void                 getHSVValue(float &h, float &s, float &v) const
Returns 3 individual HSV components

    void    
                    
void                 getHSVValue(float hsv[3]) const
Returns an array of 3 HSV components

    SbColor &    
                    
SbColor &            setPackedValue(uint32_t rgba, float& transparency)
Sets value of color vector from an RGBA packed color value. The packed color format expressed in hexadecimal is 0xrrggbbaa, where



                    rr is the red value                     gg is the green value                     bb is the blue value                     aa is the alpha value

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.

    uint32_t    
                    
uint32_t             getPackedValue(float transparency = 0.0) const
Returns an RGBA packed color value, derived from the color vector and the passed transparency value. The alpha component is set to (1.0 - transparency) * 255, resulting in a hex value between 0 and 0xFF. If transparency not specified, alpha is set to 0xFF (opaque).

FILE FORMAT/DEFAULTS

Search for    or go to Top of page |  Section 3 |  Main Index


SBCOLOR(3IV) (-->)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.