|
Public Types |
| typedef std::vector< Object * > | ParentList |
| | A vector of osg::Object pointers which is used to store the parent(s) of this Stateset, the parents could be osg::Node or osg::Drawable.
|
typedef std::map< StateAttribute::GLMode,
StateAttribute::GLModeValue > | ModeList |
| | a container to map GLModes to their respective GLModeValues.
|
typedef std::pair< ref_ptr<
StateAttribute >, StateAttribute::OverrideValue > | RefAttributePair |
| | Simple pairing between an attribute and its override flag.
|
typedef std::map< StateAttribute::TypeMemberPair,
RefAttributePair > | AttributeList |
| | a container to map <StateAttribyte::Types,Member> to their respective RefAttributePair.
|
| typedef std::vector< ModeList > | TextureModeList |
| typedef std::vector< AttributeList > | TextureAttributeList |
typedef std::pair< ref_ptr<
Uniform >, StateAttribute::OverrideValue > | RefUniformPair |
| | Simple pairing between a Uniform and its override flag.
|
typedef std::map< std::string,
RefUniformPair > | UniformList |
| | a container to map Uniform name to its respective RefUniformPair.
|
| enum | RenderingHint { DEFAULT_BIN = 0,
OPAQUE_BIN = 1,
TRANSPARENT_BIN = 2
} |
| enum | RenderBinMode { INHERIT_RENDERBIN_DETAILS,
USE_RENDERBIN_DETAILS,
OVERRIDE_RENDERBIN_DETAILS,
ENCLOSE_RENDERBIN_DETAILS
} |
Public Member Functions |
| | StateSet () |
| | StateSet (const StateSet &, const CopyOp ©op=CopyOp::SHALLOW_COPY) |
| virtual Object * | cloneType () const |
| | Clone the type of an object, with Object* return type.
|
| virtual Object * | clone (const CopyOp ©op) const |
| | Clone an object, with Object* return type.
|
| virtual bool | isSameKindAs (const Object *obj) const |
| virtual const char * | libraryName () const |
| | return the name of the object's library.
|
| virtual const char * | className () const |
| | return the name of the object's class type.
|
| int | compare (const StateSet &rhs, bool compareAttributeContents=false) const |
| | return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
|
| bool | operator< (const StateSet &rhs) const |
| bool | operator== (const StateSet &rhs) const |
| bool | operator!= (const StateSet &rhs) const |
| const ParentList & | getParents () const |
| | Get the parent list of this StateSet.
|
| ParentList | getParents () |
| | Get the a copy of parent list of node.
|
| Object * | getParent (unsigned int i) |
| const Object * | getParent (unsigned int i) const |
| | Get a single const parent of this StateSet.
|
| unsigned int | getNumParents () const |
| | Get the number of parents of this StateSet.
|
| void | setGlobalDefaults () |
| | Set all the modes to on or off so that it defines a complete state, typically used for a default global state.
|
| void | clear () |
| | Clear the StateSet of all modes and attributes.
|
| void | merge (const StateSet &rhs) |
| | Merge this StateSet with the StateSet passed as parameter.
|
| void | setMode (StateAttribute::GLMode mode, StateAttribute::GLModeValue value) |
| | Set this StateSet to contain the specified GLMode with a given value.
|
| void | removeMode (StateAttribute::GLMode mode) |
| | Remove mode from this StateSet.
|
| StateAttribute::GLModeValue | getMode (StateAttribute::GLMode mode) const |
| | Get the value for a given GLMode.
|
| void | setModeList (ModeList &ml) |
| | Set the list of all GLModes contained in this StateSet.
|
| ModeList & | getModeList () |
| | Return the list of all GLModes contained in this StateSet.
|
| const ModeList & | getModeList () const |
| | Return the const list of all GLModes contained in this const StateSet.
|
| void | setAttribute (StateAttribute *attribute, StateAttribute::OverrideValue value=StateAttribute::OFF) |
| | Set this StateSet to contain specified attribute and override flag.
|
| void | setAttributeAndModes (StateAttribute *attribute, StateAttribute::GLModeValue value=StateAttribute::ON) |
| | Set this StateSet to contain specified attribute and set the associated GLMode's to specified value.
|
| void | removeAttribute (StateAttribute::Type type, unsigned int member=0) |
| | remove attribute of specified type from StateSet.
|
| void | removeAttribute (StateAttribute *attribute) |
| | remove attribute from StateSet.
|
| StateAttribute * | getAttribute (StateAttribute::Type type, unsigned int member=0) |
| | Get specified StateAttribute for specified type.
|
| const StateAttribute * | getAttribute (StateAttribute::Type type, unsigned int member=0) const |
| | Get specified const StateAttribute for specified type.
|
| const RefAttributePair * | getAttributePair (StateAttribute::Type type, unsigned int member=0) const |
| | Get specified RefAttributePair for specified type.
|
| void | setAttributeList (AttributeList &al) |
| | set the list of all StateAttributes contained in this StateSet.
|
| AttributeList & | getAttributeList () |
| | return the list of all StateAttributes contained in this StateSet.
|
| const AttributeList & | getAttributeList () const |
| | return the const list of all StateAttributes contained in this const StateSet.
|
| void | setTextureMode (unsigned int unit, StateAttribute::GLMode mode, StateAttribute::GLModeValue value) |
| | Set this StateSet to contain specified GLMode with a given value.
|
| void | removeTextureMode (unsigned int unit, StateAttribute::GLMode mode) |
| | Remove texture mode from StateSet.
|
| StateAttribute::GLModeValue | getTextureMode (unsigned int unit, StateAttribute::GLMode mode) const |
| | Get specified GLModeValue for specified GLMode.
|
| void | setTextureModeList (TextureModeList &tml) |
| | set the list of all Texture related GLModes contained in this StateSet.
|
| TextureModeList & | getTextureModeList () |
| | return the list of all Texture related GLModes contained in this StateSet.
|
| const TextureModeList & | getTextureModeList () const |
| | return the const list of all Texture related GLModes contained in this const StateSet.
|
| void | setTextureAttribute (unsigned int unit, StateAttribute *attribute, StateAttribute::OverrideValue value=StateAttribute::OFF) |
| | Set this StateSet to contain specified attribute and override flag.
|
| void | setTextureAttributeAndModes (unsigned int unit, StateAttribute *attribute, StateAttribute::GLModeValue value=StateAttribute::ON) |
| | Set this StateSet to contain specified attribute and set the associated GLMode's to specified value.
|
| void | removeTextureAttribute (unsigned int unit, StateAttribute::Type type) |
| | remove texture attribute of specified type from StateSet.
|
| void | removeTextureAttribute (unsigned int unit, StateAttribute *attribute) |
| | remove texture attribute from StateSet.
|
| StateAttribute * | getTextureAttribute (unsigned int unit, StateAttribute::Type type) |
| | Get specified Texture related StateAttribute for specified type.
|
| const StateAttribute * | getTextureAttribute (unsigned int unit, StateAttribute::Type type) const |
| | Get specified Texture related const StateAttribute for specified type.
|
| const RefAttributePair * | getTextureAttributePair (unsigned int unit, StateAttribute::Type type) const |
| | Get specified Texture related RefAttributePair for specified type.
|
| void | setTextureAttributeList (TextureAttributeList &tal) |
| | Set the list of all Texture related StateAttributes contained in this StateSet.
|
| TextureAttributeList & | getTextureAttributeList () |
| | Return the list of all Texture related StateAttributes contained in this StateSet.
|
| const TextureAttributeList & | getTextureAttributeList () const |
| | Return the const list of all Texture related StateAttributes contained in this const StateSet.
|
| void | setAssociatedModes (const StateAttribute *attribute, StateAttribute::GLModeValue value) |
| void | setAssociatedTextureModes (unsigned int unit, const StateAttribute *attribute, StateAttribute::GLModeValue value) |
| void | addUniform (Uniform *uniform, StateAttribute::OverrideValue value=StateAttribute::ON) |
| | Set this StateSet to contain specified uniform and override flag.
|
| void | removeUniform (const std::string &name) |
| | remove uniform of specified name from StateSet.
|
| void | removeUniform (Uniform *uniform) |
| | remove Uniform from StateSet.
|
| Uniform * | getUniform (const std::string &name) |
| | Get Uniform for specified name.
|
| Uniform * | getOrCreateUniform (const std::string &name, Uniform::Type type) |
| | Get Uniform for specified name, if one is not available create it, add it to this StateSet and return a pointer to it.
|
| const Uniform * | getUniform (const std::string &name) const |
| | Get const Uniform for specified name.
|
| const RefUniformPair * | getUniformPair (const std::string &name) const |
| | Get specified RefUniformPair for specified Uniform name.
|
| void | setUniformList (UniformList &al) |
| | set the list of all Uniforms contained in this StateSet.
|
| UniformList & | getUniformList () |
| | return the list of all Uniforms contained in this StateSet.
|
| const UniformList & | getUniformList () const |
| | return the const list of all Uniforms contained in this const StateSet.
|
| void | setRenderingHint (int hint) |
| | Set the RenderingHint of this StateSet.
|
| int | getRenderingHint () const |
| | Get the RenderingHint of this StateSet.
|
| void | setRenderBinDetails (int binNum, const std::string &binName, RenderBinMode mode=USE_RENDERBIN_DETAILS) |
| | Set the render bin details.
|
| void | setRenderBinToInherit () |
| | Set the render bin details to inherit.
|
| bool | useRenderBinDetails () const |
| | Get whether the render bin details are set and should be used.
|
| void | setRenderBinMode (RenderBinMode mode) |
| | Set the render bin mode.
|
| RenderBinMode | getRenderBinMode () const |
| | Get the render bin mode.
|
| void | setBinNumber (int num) |
| | Set the render bin number.
|
| int | getBinNumber () const |
| | Get the render bin number.
|
| void | setBinName (const std::string &name) |
| | Set the render bin name.
|
| const std::string & | getBinName () const |
| | Get the render bin name.
|
| void | setUpdateCallback (Callback *ac) |
| | Set the Update Callback which allows users to attach customize the updating of an object during the update traversal.
|
| Callback * | getUpdateCallback () |
| | Get the non const Update Callback.
|
| const Callback * | getUpdateCallback () const |
| | Get the const Update Callback.
|
| bool | requiresUpdateTraversal () const |
| | Return whether this StateSet has update callbacks associated with it, and therefore must be traversed.
|
| unsigned int | getNumChildrenRequiringUpdateTraversal () const |
| | Get the number of Objects of this StateSet which require Update traversal, since they have an Update Callback attached to them or their children.
|
| void | runUpdateCallbacks (osg::NodeVisitor *nv) |
| | Run the update callbacks attached directly to this StateSet or to its children.
|
| void | setEventCallback (Callback *ac) |
| | Set the Event Callback which allows users to attach customize the updating of an object during the event traversal.
|
| Callback * | getEventCallback () |
| | Get the non const Event Callback.
|
| const Callback * | getEventCallback () const |
| | Get the const Event Callback.
|
| bool | requiresEventTraversal () const |
| | Return whether this StateSet has event callbacks associated with it, and therefore must be traversed.
|
| unsigned int | getNumChildrenRequiringEventTraversal () const |
| | Get the number of Objects of this StateSet which require Event traversal, since they have an Eevnt Callback attached to them or their children.
|
| void | runEventCallbacks (osg::NodeVisitor *nv) |
| | Run the event callbacks attached directly to this StateSet or to its children.
|
| void | compileGLObjects (State &state) const |
| | call compile on all StateAttributes contained within this StateSet.
|
| virtual void | releaseGLObjects (State *state=0) const |
| | call release on all StateAttributes contained within this StateSet.
|
Protected Member Functions |
| virtual | ~StateSet () |
| StateSet & | operator= (const StateSet &) |
| void | addParent (osg::Object *object) |
| void | removeParent (osg::Object *object) |
| ModeList & | getOrCreateTextureModeList (unsigned int unit) |
| AttributeList & | getOrCreateTextureAttributeList (unsigned int unit) |
| int | compareModes (const ModeList &lhs, const ModeList &rhs) |
| int | compareAttributePtrs (const AttributeList &lhs, const AttributeList &rhs) |
| int | compareAttributeContents (const AttributeList &lhs, const AttributeList &rhs) |
| void | setMode (ModeList &modeList, StateAttribute::GLMode mode, StateAttribute::GLModeValue value) |
| void | setModeToInherit (ModeList &modeList, StateAttribute::GLMode mode) |
| StateAttribute::GLModeValue | getMode (const ModeList &modeList, StateAttribute::GLMode mode) const |
| void | setAttribute (AttributeList &attributeList, StateAttribute *attribute, const StateAttribute::OverrideValue value=StateAttribute::OFF) |
| StateAttribute * | getAttribute (AttributeList &attributeList, const StateAttribute::Type type, unsigned int member) |
| const StateAttribute * | getAttribute (const AttributeList &attributeList, const StateAttribute::Type type, unsigned int member) const |
| const RefAttributePair * | getAttributePair (const AttributeList &attributeList, const StateAttribute::Type type, unsigned int member) const |
| void | setNumChildrenRequiringUpdateTraversal (unsigned int num) |
| void | setNumChildrenRequiringEventTraversal (unsigned int num) |
Protected Attributes |
| ParentList | _parents |
| ModeList | _modeList |
| AttributeList | _attributeList |
| TextureModeList | _textureModeList |
| TextureAttributeList | _textureAttributeList |
| UniformList | _uniformList |
| int | _renderingHint |
| RenderBinMode | _binMode |
| int | _binNum |
| std::string | _binName |
| ref_ptr< Callback > | _updateCallback |
| unsigned int | _numChildrenRequiringUpdateTraversal |
| ref_ptr< Callback > | _eventCallback |
| unsigned int | _numChildrenRequiringEventTraversal |