Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

osgSim::OverlayNode Class Reference

OverlayNode is for creating texture overlays on scenes, with the overlay texture being generated by pre rendering an Overlay Subgraph to a texture, then projecting this resulting texture on the scene. More...

Inheritance diagram for osgSim::OverlayNode:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 OverlayNode ()
 OverlayNode (const OverlayNode &es, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Node (osgSim, OverlayNode)
virtual void traverse (osg::NodeVisitor &nv)
 Traverse downwards : calls children's accept method with NodeVisitor.

void setOverlaySubgraph (osg::Node *node)
 Set the overlay subgraph which will be rendered to texture.

osg::NodegetOverlaySubgraph ()
 Get the overlay subgraph which will be rendered to texture.

const osg::NodegetOverlaySubgraph () const
 Get the const overlay subgraph which will be render to texture.

void dirtyOverlayTexture ()
 Inform the OverlayNode that the overlay texture needs to be updated.

void setContinousUpdate (bool update)
 Set whether the OverlayNode should update the overlay texture on every frame.

bool getContinousUpdate () const
 Get whether the OverlayNode should update the overlay texture on every frame.

void setOverlayClearColor (const osg::Vec4 &color)
 Set the clear color to use when rendering the overlay subgraph.

const osg::Vec4getOverlayClearColor () const
 Get the clear color to use when rendering the overlay subgraph.

void setTexEnvMode (GLenum mode)
 Set the TexEnv mode used to combine the overlay texture with the base color/texture of the OverlayNode's decorate subgraph.

GLenum getTexEnvMode ()
 Get the TexEnv mode used to combine the overlay texture with the base color/texture of the OverlayNode's decorate subgraph.

void setOverlayTextureUnit (unsigned int unit)
 Set the texture unit that the texture should be assigned to.

unsigned int getOverlayTextureUnit () const
 Get the texture unit that the texture should be assigned to.

void setOverlayTextureSizeHint (unsigned int size)
 Set the texture size hint.

unsigned int getOverlayTextureSizeHint () const
 Get the texture size hint.

osg::CameraNodegetCamera ()
 Get the camera used to implement the render to texture of the overlay subgraph.

const osg::CameraNodegetCamera () const
 Get the const camera used to implement the render to texture of the overlay subgraph.


Protected Types

typedef osg::buffered_value<
int > 
TextureObjectValidList

Protected Member Functions

virtual ~OverlayNode ()
void init ()
void updateMainSubgraphStateSet ()

Protected Attributes

TextureObjectValidList _textureObjectValidList
osg::ref_ptr< osg::CameraNode_camera
osg::ref_ptr< osg::Node_overlaySubgraph
osg::ref_ptr< osg::TexGenNode_texgenNode
osg::ref_ptr< osg::StateSet_mainSubgraphStateSet
GLenum _texEnvMode
unsigned int _textureUnit
unsigned int _textureSizeHint
osg::ref_ptr< osg::Texture2D_texture
bool _continousUpdate
osg::Polytope _textureFrustum

Detailed Description

OverlayNode is for creating texture overlays on scenes, with the overlay texture being generated by pre rendering an Overlay Subgraph to a texture, then projecting this resulting texture on the scene.


Member Typedef Documentation

typedef osg::buffered_value< int > osgSim::OverlayNode::TextureObjectValidList [protected]
 


Constructor & Destructor Documentation

osgSim::OverlayNode::OverlayNode  ) 
 

osgSim::OverlayNode::OverlayNode const OverlayNode es,
const osg::CopyOp copyop = osg::CopyOp::SHALLOW_COPY
 

virtual osgSim::OverlayNode::~OverlayNode  )  [inline, protected, virtual]
 


Member Function Documentation

void osgSim::OverlayNode::dirtyOverlayTexture  ) 
 

Inform the OverlayNode that the overlay texture needs to be updated.

const osg::CameraNode* osgSim::OverlayNode::getCamera  )  const [inline]
 

Get the const camera used to implement the render to texture of the overlay subgraph.

osg::CameraNode* osgSim::OverlayNode::getCamera  )  [inline]
 

Get the camera used to implement the render to texture of the overlay subgraph.

bool osgSim::OverlayNode::getContinousUpdate  )  const [inline]
 

Get whether the OverlayNode should update the overlay texture on every frame.

const osg::Vec4& osgSim::OverlayNode::getOverlayClearColor  )  const
 

Get the clear color to use when rendering the overlay subgraph.

const osg::Node* osgSim::OverlayNode::getOverlaySubgraph  )  const [inline]
 

Get the const overlay subgraph which will be render to texture.

osg::Node* osgSim::OverlayNode::getOverlaySubgraph  )  [inline]
 

Get the overlay subgraph which will be rendered to texture.

unsigned int osgSim::OverlayNode::getOverlayTextureSizeHint  )  const [inline]
 

Get the texture size hint.

unsigned int osgSim::OverlayNode::getOverlayTextureUnit  )  const [inline]
 

Get the texture unit that the texture should be assigned to.

GLenum osgSim::OverlayNode::getTexEnvMode  )  [inline]
 

Get the TexEnv mode used to combine the overlay texture with the base color/texture of the OverlayNode's decorate subgraph.

void osgSim::OverlayNode::init  )  [protected]
 

osgSim::OverlayNode::META_Node osgSim  ,
OverlayNode 
 

void osgSim::OverlayNode::setContinousUpdate bool  update  )  [inline]
 

Set whether the OverlayNode should update the overlay texture on every frame.

void osgSim::OverlayNode::setOverlayClearColor const osg::Vec4 color  ) 
 

Set the clear color to use when rendering the overlay subgraph.

void osgSim::OverlayNode::setOverlaySubgraph osg::Node node  ) 
 

Set the overlay subgraph which will be rendered to texture.

void osgSim::OverlayNode::setOverlayTextureSizeHint unsigned int  size  ) 
 

Set the texture size hint.

The size hint is used to request a texture of specified size.

void osgSim::OverlayNode::setOverlayTextureUnit unsigned int  unit  ) 
 

Set the texture unit that the texture should be assigned to.

void osgSim::OverlayNode::setTexEnvMode GLenum  mode  ) 
 

Set the TexEnv mode used to combine the overlay texture with the base color/texture of the OverlayNode's decorate subgraph.

virtual void osgSim::OverlayNode::traverse osg::NodeVisitor nv  )  [virtual]
 

Traverse downwards : calls children's accept method with NodeVisitor.

Reimplemented from osg::Group.

void osgSim::OverlayNode::updateMainSubgraphStateSet  )  [protected]
 


Member Data Documentation

osg::ref_ptr<osg::CameraNode> osgSim::OverlayNode::_camera [protected]
 

bool osgSim::OverlayNode::_continousUpdate [protected]
 

osg::ref_ptr<osg::StateSet> osgSim::OverlayNode::_mainSubgraphStateSet [protected]
 

osg::ref_ptr<osg::Node> osgSim::OverlayNode::_overlaySubgraph [protected]
 

GLenum osgSim::OverlayNode::_texEnvMode [protected]
 

osg::ref_ptr<osg::TexGenNode> osgSim::OverlayNode::_texgenNode [protected]
 

osg::ref_ptr<osg::Texture2D> osgSim::OverlayNode::_texture [protected]
 

osg::Polytope osgSim::OverlayNode::_textureFrustum [protected]
 

TextureObjectValidList osgSim::OverlayNode::_textureObjectValidList [mutable, protected]
 

unsigned int osgSim::OverlayNode::_textureSizeHint [protected]
 

unsigned int osgSim::OverlayNode::_textureUnit [protected]
 


The documentation for this class was generated from the following file:
Generated at Thu Nov 24 16:25:24 2005 for the OpenSceneGraph by doxygen 1.3.6.