SPIN Framework
Public Member Functions | Protected Attributes

spin::ReferencedStateSet Class Reference

ReferencedStateSet is the base class for StateSets attached to nodes. More...

#include <ReferencedStateSet.h>

Inheritance diagram for spin::ReferencedStateSet:
spin::Fog spin::Shader spin::ImageTexture spin::SharedVideoTexture spin::SyphonTexture spin::VideoTexture

List of all members.

Public Member Functions

 ReferencedStateSet (SceneManager *sceneManager, const char *initID)
virtual void updateCallback ()
std::string getID () const
t_symbolgetIDSymbol ()
std::string getClassType () const
void removeFromScene ()
void replace (osg::StateSet *ss)
virtual void debug ()
virtual std::vector< lo_message > getState () const
virtual void stateDump ()
virtual void stateDump (lo_address txAddr)
virtual void setTextureBlend (int mode)
int getTextureBlend () const
virtual void setTextureRepeat (int s, int t)
virtual void setLighting (int i)
virtual int getLighting () const
virtual void setTransparent (int i)
virtual int getTransparent () const
virtual void setRenderBin (int i)
virtual int getRenderBin () const

Protected Attributes

t_symbolid_
std::string classType_
SceneManagersceneManager_
osg::TexEnv::Mode textureBlend_
bool textureRepeatS_
bool textureRepeatT_
bool lightingEnabled_
bool transparent_
int renderBin_

Detailed Description

ReferencedStateSet is the base class for StateSets attached to nodes.


Member Function Documentation

void spin::ReferencedStateSet::debug ( ) [virtual]

Print debug information to console.

Reimplemented in spin::ImageTexture, spin::Shader, spin::SharedVideoTexture, spin::SyphonTexture, and spin::VideoTexture.

std::string spin::ReferencedStateSet::getID ( ) const [inline]

Return the string id for this stateset

virtual int spin::ReferencedStateSet::getLighting ( ) const [inline, virtual]

Returns a boolean indicating whether lighting affects the texture.

virtual int spin::ReferencedStateSet::getRenderBin ( ) const [inline, virtual]

Returns an integer indicating the render bin for this texture. Higher numbers get processed later (i.e. it appears on top). Default = 11

std::vector< lo_message > spin::ReferencedStateSet::getState ( ) const [virtual]

Just like a ReferencedNode, each subclass of ReferencedStateSet must override the getState() method to pass it's current state.

Reimplemented in spin::Fog, spin::ImageTexture, spin::Shader, spin::SharedVideoTexture, spin::SyphonTexture, and spin::VideoTexture.

virtual int spin::ReferencedStateSet::getTransparent ( ) const [inline, virtual]

Returns a boolean indicating whether stateset is rendered in transparent bin

void spin::ReferencedStateSet::removeFromScene ( )

Abstract method getPath needs to be implemented Remove this stateset from all parents... essentially destroying the state, since no reference to it will exist anymore, and OSG will kill it.

void spin::ReferencedStateSet::replace ( osg::StateSet *  ss)

Replaces a StateSet in the scene graph with this one. ie, goes through all parents of the provided stateset and replaces the object's state with this.

void spin::ReferencedStateSet::setLighting ( int  i) [virtual]

Set whether the texture is influenced by lighting

void spin::ReferencedStateSet::setRenderBin ( int  i) [virtual]

Set the render bin for this texture. The higher the number, the later it gets processed (ie, it appears on top). Default renderBin = 11

void spin::ReferencedStateSet::setTextureBlend ( int  mode) [virtual]

Set the blend mode for the texture (with material color). 0=GL_MODULATE, 1=GL_DECAL, 2=GL_BLEND, 3=GL_REPLACE. Default is 0 (GL_MODULATE)

void spin::ReferencedStateSet::setTextureRepeat ( int  s,
int  t 
) [virtual]

Set whether the texture repeats after wrapping or not (in both the x and Y directions

void spin::ReferencedStateSet::setTransparent ( int  i) [virtual]

Set whether the stateset is rendered in the transparent bin or not (ie, this is a different rendering pass with different optimizations)

void spin::ReferencedStateSet::stateDump ( lo_address  txAddr) [virtual]

StateDump() is a request to broadcast the node state via SceneMangager.

void spin::ReferencedStateSet::stateDump ( ) [virtual]

StateDump() is a request to broadcast the node state via SceneManager.

void spin::ReferencedStateSet::updateCallback ( ) [virtual]

This callback occurs every frame to update the state with any parameter changes.

Reimplemented in spin::Shader.


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