Package com.openinventor.inventor.nodes
Class SoPackedColor
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.misc.SoBase
-
- com.openinventor.inventor.fields.SoFieldContainer
-
- com.openinventor.inventor.nodes.SoNode
-
- com.openinventor.inventor.nodes.SoPackedColor
-
- All Implemented Interfaces:
SafeDisposable
public class SoPackedColor extends SoNode
Node that defines base colors using packed representation.SoPackedColor
is similar toSoBaseColor
in that it sets the base 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.SoPackedColor
uses less memory thanSoBaseColor
orSoMaterial
to store multiple color and transparency values. It can be used in cases where space is critical. However, for geometry nodes that have a *vertexProperty* field, the best practice is to use anSoVertexProperty
node (which also has an orderedRGBA field) to specify diffuse color and transparency.As described here, the
orderedRGBA
field of this class can be overridden by other property nodes.File format/default:
PackedColor {
orderedRGBA 0xccccccff Action behavior:
SoGLRenderAction
,SoCallbackAction
Sets the current base (diffuse) color(s) in the state.- See Also:
SoBaseColor
,SoVertexProperty
,SoMaterial
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoMFUInt32
orderedRGBA
Defines the packed base colors.-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoPackedColor()
Creates a packed color node with default settings.
-
Method Summary
-
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Field Detail
-
orderedRGBA
public final SoMFUInt32 orderedRGBA
Defines the packed base colors.
-
-