Open Inventor Reference
|
Node that defines base colors using packed representation. More...
#include <Inventor/nodes/SoPackedColor.h>
Public Member Functions | |
SoPackedColor () | |
Creates a packed color node with default settings. | |
virtual void | doAction (SoAction *action) |
This method performs the "typical" operation of a node for any action. | |
virtual void | GLRender (SoGLRenderAction *action) |
These virtual functions implement all of the actions for nodes, Most of the default implementations do nothing. | |
virtual void | callback (SoCallbackAction *action) |
SbBool | isTransparent () |
Static Public Member Functions | |
static void | initClass () |
Initializes base node class. | |
Public Attributes | |
Fields | |
SoMFUInt32 | orderedRGBA |
Defines the packed colors. | |
Protected Member Functions | |
virtual | ~SoPackedColor () |
SoPackedColor is similar to SoBaseColor in that it sets the diffuse color component of the current material. However, it also changes the transparency component. The color and transparency information is packed into unsigned 32-bit integers: 0xrrggbbaa
, where aa
represents the alpha (0x00
= fully transparent, 0xff
= opaque), and rr
, gg
, and bb
represent the red, blue, and green components of the color, respectively. Note that the order (r,g,b,a) of these components is reversed from the ordering in releases of Inventor prior to 2.1.
If the transparency type is SoGLRenderAction::SCREEN_DOOR, only the first transparency value will be used. With other transparency types, multiple transparencies will be used.
SoPackedColor uses less memory than SoBaseColor or SoMaterial to store multiple color and transparency values. It can be used in cases where space is critical.
PackedColor { orderedRGBA 0xccccccff }
Definition at line 108 of file SoPackedColor.h.
SoPackedColor::SoPackedColor | ( | ) |
virtual SoPackedColor::~SoPackedColor | ( | ) | [protected, virtual] |
virtual void SoPackedColor::callback | ( | SoCallbackAction * | action | ) | [virtual] |
Reimplemented from SoNode.
virtual void SoPackedColor::doAction | ( | SoAction * | action | ) | [virtual] |
The default implementation does nothing.
Reimplemented from SoNode.
virtual void SoPackedColor::GLRender | ( | SoGLRenderAction * | action | ) | [virtual] |
Reimplemented from SoNode.
static void SoPackedColor::initClass | ( | ) | [static] |
Reimplemented from SoNode.
SbBool SoPackedColor::isTransparent | ( | ) | [inline] |
Definition at line 128 of file SoPackedColor.h.
Definition at line 117 of file SoPackedColor.h.