Open Inventor Reference
SoPackedColor Class Reference

Node that defines base colors using packed representation. More...

#include <Inventor/nodes/SoPackedColor.h>

Inheritance diagram for SoPackedColor:
SoNode SoFieldContainer SoBase

List of all members.

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 ()

Detailed Description

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.

File Format/Default
PackedColor {
  orderedRGBA 0xccccccff
}
Action Behavior
SoGLRenderAction, SoCallbackAction
Sets the current base (diffuse) color(s) in the state.
See Also
SoBaseColor, SoMaterial

Definition at line 108 of file SoPackedColor.h.


Constructor & Destructor Documentation

SoPackedColor::SoPackedColor ( )
virtual SoPackedColor::~SoPackedColor ( ) [protected, virtual]

Member Function Documentation

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.


Member Data Documentation


The documentation for this class was generated from the following file: