OpenSceneGraph 2.8.4
|
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...
Classes | |
struct | OverlayData |
Public Types | |
enum | OverlayTechnique { OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY, VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY, VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY } |
Public Member Functions | |
OverlayNode (OverlayTechnique technique=OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY) | |
OverlayNode (const OverlayNode &es, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
META_Node (osgSim, OverlayNode) | |
virtual void | traverse (osg::NodeVisitor &nv) |
Traverse downwards : calls children's accept method with NodeVisitor. | |
void | setOverlayTechnique (OverlayTechnique technique) |
OverlayTechnique | getOverlayTechnique () const |
void | setRenderTargetImplementation (osg::Camera::RenderTargetImplementation impl) |
Set the implementation to be used when creating the overlay texture. | |
void | setOverlaySubgraph (osg::Node *node) |
Set the overlay subgraph which will be rendered to texture. | |
osg::Node * | getOverlaySubgraph () |
Get the overlay subgraph which will be rendered to texture. | |
const osg::Node * | getOverlaySubgraph () 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 | setContinuousUpdate (bool update) |
Set whether the OverlayNode should update the overlay texture on every frame. | |
bool | getContinuousUpdate () const |
Get whether the OverlayNode should update the overlay texture on every frame. | |
void | setOverlayBaseHeight (double baseHeight) |
Set the base height that the overlay subgraph will be projected down to. | |
double | getOverlayBaseHeight () const |
Get the base height that the overlay subgraph will be projected down to. | |
void | setOverlayClearColor (const osg::Vec4 &color) |
Set the clear color to use when rendering the overlay subgraph. | |
const osg::Vec4 & | getOverlayClearColor () 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 () const |
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. | |
virtual void | setThreadSafeRefUnref (bool threadSafe) |
Set whether to use a mutex to ensure ref() and unref() are thread safe. | |
virtual void | resizeGLObjectBuffers (unsigned int) |
Resize any per context GLObject buffers to specified size. | |
virtual void | releaseGLObjects (osg::State *=0) const |
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context. | |
Protected Types | |
typedef osg::buffered_value< int > | TextureObjectValidList |
typedef std::map < osgUtil::CullVisitor *, osg::ref_ptr< OverlayData > > | OverlayDataMap |
Protected Member Functions | |
virtual | ~OverlayNode () |
void | init () |
void | init_OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY () |
void | init_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY () |
void | init_VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY () |
void | traverse_OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY (osg::NodeVisitor &nv) |
void | traverse_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY (osg::NodeVisitor &nv) |
void | traverse_VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY (osg::NodeVisitor &nv) |
void | updateMainSubgraphStateSet () |
OverlayNode::OverlayData * | getOverlayData (osgUtil::CullVisitor *cv) |
Protected Attributes | |
TextureObjectValidList | _textureObjectValidList |
OverlayTechnique | _overlayTechnique |
osg::ref_ptr< osg::Node > | _overlaySubgraph |
osg::ref_ptr< osg::StateSet > | _overlayStateSet |
osg::ref_ptr< osg::StateSet > | _mainStateSet |
GLenum | _texEnvMode |
unsigned int | _textureUnit |
unsigned int | _textureSizeHint |
osg::Vec4 | _overlayClearColor |
bool | _continuousUpdate |
double | _overlayBaseHeight |
bool | _updateCamera |
osg::Camera::RenderTargetImplementation | _renderTargetImpl |
OpenThreads::Mutex | _overlayDataMapMutex |
OverlayDataMap | _overlayDataMap |
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.
typedef std::map<osgUtil::CullVisitor*, osg::ref_ptr<OverlayData> > osgSim::OverlayNode::OverlayDataMap [protected] |
typedef osg::buffered_value< int > osgSim::OverlayNode::TextureObjectValidList [protected] |
osgSim::OverlayNode::OverlayNode | ( | OverlayTechnique | technique = OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY | ) |
osgSim::OverlayNode::OverlayNode | ( | const OverlayNode & | es, |
const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY |
||
) |
virtual osgSim::OverlayNode::~OverlayNode | ( | ) | [inline, protected, virtual] |
void osgSim::OverlayNode::dirtyOverlayTexture | ( | ) |
Inform the OverlayNode that the overlay texture needs to be updated.
bool osgSim::OverlayNode::getContinuousUpdate | ( | ) | const [inline] |
Get whether the OverlayNode should update the overlay texture on every frame.
double osgSim::OverlayNode::getOverlayBaseHeight | ( | ) | const [inline] |
Get the base height that the overlay subgraph will be projected down to.
const osg::Vec4& osgSim::OverlayNode::getOverlayClearColor | ( | ) | const [inline] |
Get the clear color to use when rendering the overlay subgraph.
OverlayNode::OverlayData* osgSim::OverlayNode::getOverlayData | ( | osgUtil::CullVisitor * | cv | ) | [protected] |
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.
OverlayTechnique osgSim::OverlayNode::getOverlayTechnique | ( | ) | const [inline] |
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 | ( | ) | const [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] |
void osgSim::OverlayNode::init_OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY | ( | ) | [protected] |
void osgSim::OverlayNode::init_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY | ( | ) | [protected] |
void osgSim::OverlayNode::init_VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY | ( | ) | [protected] |
osgSim::OverlayNode::META_Node | ( | osgSim | , |
OverlayNode | |||
) |
virtual void osgSim::OverlayNode::releaseGLObjects | ( | osg::State * | = 0 | ) | const [virtual] |
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context.
Otherwise, releases OpenGL objexts for all graphics contexts.
Reimplemented from osg::Group.
virtual void osgSim::OverlayNode::resizeGLObjectBuffers | ( | unsigned | int | ) | [virtual] |
Resize any per context GLObject buffers to specified size.
Reimplemented from osg::Group.
void osgSim::OverlayNode::setContinuousUpdate | ( | bool | update | ) | [inline] |
Set whether the OverlayNode should update the overlay texture on every frame.
void osgSim::OverlayNode::setOverlayBaseHeight | ( | double | baseHeight | ) | [inline] |
Set the base height that the overlay subgraph will be projected down to.
Normally you'll set this to just below ground level, if you set it too high then the overlay texture can end up being clipped in certain viewing directions, while if its too low then there will be a limit to how close you can get to the terrain before pixaltion becomes an issue.
void osgSim::OverlayNode::setOverlayClearColor | ( | const osg::Vec4 & | color | ) | [inline] |
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::setOverlayTechnique | ( | OverlayTechnique | technique | ) |
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::setRenderTargetImplementation | ( | osg::Camera::RenderTargetImplementation | impl | ) |
Set the implementation to be used when creating the overlay texture.
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::setThreadSafeRefUnref | ( | bool | threadSafe | ) | [virtual] |
Set whether to use a mutex to ensure ref() and unref() are thread safe.
Reimplemented from osg::Group.
virtual void osgSim::OverlayNode::traverse | ( | osg::NodeVisitor & | ) | [virtual] |
Traverse downwards : calls children's accept method with NodeVisitor.
Reimplemented from osg::Group.
void osgSim::OverlayNode::traverse_OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY | ( | osg::NodeVisitor & | nv | ) | [protected] |
void osgSim::OverlayNode::traverse_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY | ( | osg::NodeVisitor & | nv | ) | [protected] |
void osgSim::OverlayNode::traverse_VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY | ( | osg::NodeVisitor & | nv | ) | [protected] |
void osgSim::OverlayNode::updateMainSubgraphStateSet | ( | ) | [protected] |
bool osgSim::OverlayNode::_continuousUpdate [protected] |
osg::ref_ptr<osg::StateSet> osgSim::OverlayNode::_mainStateSet [protected] |
double osgSim::OverlayNode::_overlayBaseHeight [protected] |
osg::Vec4 osgSim::OverlayNode::_overlayClearColor [protected] |
OverlayDataMap osgSim::OverlayNode::_overlayDataMap [protected] |
OpenThreads::Mutex osgSim::OverlayNode::_overlayDataMapMutex [protected] |
osg::ref_ptr<osg::Node> osgSim::OverlayNode::_overlaySubgraph [protected] |
GLenum osgSim::OverlayNode::_texEnvMode [protected] |
TextureObjectValidList osgSim::OverlayNode::_textureObjectValidList [mutable, protected] |
unsigned int osgSim::OverlayNode::_textureSizeHint [protected] |
unsigned int osgSim::OverlayNode::_textureUnit [protected] |
bool osgSim::OverlayNode::_updateCamera [protected] |
![]() | Generated at Sun Jan 8 2012 13:16:52 for the OpenSceneGraph by doxygen 1.7.4. |