• NAME
      SbColor -- color vector class
  • INHERITS FROM
      SbVec3f
  • SYNOPSIS
      (Cr#include <Inventor/SbColor.h>

      <1>Methods from class SbColor:

      (Pt c} (Pt c} (CbSbColor(Cr(const SbVec3f vec3f)
      (Pt c} (Pt c} (CbSbColor(Cr(const float rgb[3])
      (Pt c} (Pt c} (CbSbColor(Cr(float r, float g, float b)
      (Pt c} (Pt c} (CbsetHSVValue(Cr(float h, float s, float v)
      (Pt c} (Pt c} (CbsetHSVValue(Cr(const float hsv[3])
      (Pt c} (Pt c} (CbgetHSVValue(Cr(float &h, float &s, float &v) const
      (Pt c} (Pt c} (CbgetHSVValue(Cr(float hsv[3]) const
      (Pt c} (Pt c} (CbsetPackedValue(Cr(uint32_t rgba, float& transparency)
      (Pt c} (Pt c} (CbgetPackedValue(Cr(float transparency = 0.0) const

      <1>Methods from class SbVec3f:

      (Pt c} (Pt c} (Cbcross(Cr(const SbVec3f &v) const
      (Pt c} (Pt c} (Cbdot(Cr(const SbVec3f &v) const
      (Pt c} (Pt c} (Cbequals(Cr(const SbVec3f v, float tolerance) const
      (Pt c} (Pt c} (CbgetClosestAxis(Cr() const
      (Pt c} (Pt c} (CbgetValue(Cr() const
      (Pt c} (Pt c} (CbgetValue(Cr(float &x, float &y, float &z) const
      (Pt c} (Pt c} (Cblength(Cr() const
      (Pt c} (Pt c} (Cbnegate(Cr()
      (Pt c} (Pt c} (Cbnormalize(Cr()
      (Pt c} (Pt c} (CbsetValue(Cr(const float v[3])
      (Pt c} (Pt c} (CbsetValue(Cr(float x, float y, float z)
      (Pt c} (Pt c} (CbsetValue(Cr(const SbVec3f &barycentic, const SbVec3f &v0, const SbVec3f &v1, const SbVec3f &v2)
      (Pt c} (Pt c} (Cboperator [](Cr(int i)
      (Pt c} (Pt c} (Cboperator [](Cr(int i)
      (Pt c} (Pt c} (Cboperator *=(Cr(float d)
      (Pt c} (Pt c} (Cboperator /=(Cr(float d)
      (Pt c} (Pt c} (Cboperator +=(Cr(const SbVec3f &u)
      (Pt c} (Pt c} (Cboperator -=(Cr(const SbVec3f &u)
      (Pt c} (Pt c} (Cboperator -(Cr() const
      (Pt c} (Pt c} (Cboperator *(Cr(const SbVec3f &v, float d)
      (Pt c} (Pt c} (Cboperator *(Cr(float d, const SbVec3f &v)
      (Pt c} (Pt c} (Cboperator /(Cr(const SbVec3f &v, float d)
      (Pt c} (Pt c} (Cboperator +(Cr(const SbVec3f &v1, const SbVec3f &v2)
      (Pt c} (Pt c} (Cboperator -(Cr(const SbVec3f &v1, const SbVec3f &v2)
      (Pt c} (Pt c} (Cboperator ==(Cr(const SbVec3f &v1, const SbVec3f &v2)
      (Pt c} (Pt c} (Cboperator !=(Cr(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
      (Pt c} (Pt c} (CbSbColor(Cr(const SbVec3f vec3f)
      (Pt c} (Pt c} (CbSbColor(Cr(const float rgb[3])
      (Pt c} (Pt c} (CbSbColor(Cr(float r, float g, float b)
      <1>Constructors for color vector.

      (Pt c} (Pt c} (CbsetHSVValue(Cr(float h, float s, float v)
      <1>Sets value of color vector from 3 HSV (Hue, Saturation, and Value) components. Value is the same as brightness of the color.

      (Pt c} (Pt c} (CbsetHSVValue(Cr(const float hsv[3])
      <1>Sets value of color vector from array of 3 HSV components

      (Pt c} (Pt c} (CbgetHSVValue(Cr(float &h, float &s, float &v) const
      <1>Returns 3 individual HSV components

      (Pt c} (Pt c} (CbgetHSVValue(Cr(float hsv[3]) const
      <1>Returns an array of 3 HSV components

      (Pt c} (Pt c} (CbsetPackedValue(Cr(uint32_t rgba, float& transparency)
      <1>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.


      (Pt
      c}
      (Pt c}
      (CbgetPackedValue(Cr(float transparency = 0.0) const


      <1>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).


Current Users: 45 © 1999-2006 Linux.com.hk PenguinSoft
All trademarks and copyrights on this page are owned by their respective companies. Linux is a trademark of Linus Torvalds.