SoPackedColor¶
-
InventorModule
¶ genre InventorNodesAutomatic
author Silicon Graphics Inc
package MeVisLab/Standard
definition inventor.def
Purpose¶
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.
Note that you should input the packed colors as a sequence of uint32_t (32-bit) integers separated by space.