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 |
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 () |
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 |
Classes | |
struct | OverlayData |
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] |
osgSim::OverlayNode::META_Node | ( | osgSim | , | |
OverlayNode | ||||
) |
virtual void osgSim::OverlayNode::traverse | ( | osg::NodeVisitor & | ) | [virtual] |
Traverse downwards : calls children's accept method with NodeVisitor.
Reimplemented from osg::Group.
void osgSim::OverlayNode::setOverlayTechnique | ( | OverlayTechnique | technique | ) |
OverlayTechnique osgSim::OverlayNode::getOverlayTechnique | ( | ) | const [inline] |
void osgSim::OverlayNode::setRenderTargetImplementation | ( | osg::Camera::RenderTargetImplementation | impl | ) |
Set the implementation to be used when creating the overlay texture.
void osgSim::OverlayNode::setOverlaySubgraph | ( | osg::Node * | node | ) |
Set the overlay subgraph which will be rendered to texture.
osg::Node* osgSim::OverlayNode::getOverlaySubgraph | ( | ) | [inline] |
Get the overlay subgraph which will be rendered to texture.
const osg::Node* osgSim::OverlayNode::getOverlaySubgraph | ( | ) | const [inline] |
Get the const overlay subgraph which will be render to texture.
void osgSim::OverlayNode::dirtyOverlayTexture | ( | ) |
Inform the OverlayNode that the overlay texture needs to be updated.
void osgSim::OverlayNode::setContinuousUpdate | ( | bool | update | ) | [inline] |
Set whether the OverlayNode should update the overlay texture on every frame.
bool osgSim::OverlayNode::getContinuousUpdate | ( | ) | const [inline] |
Get 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.
double osgSim::OverlayNode::getOverlayBaseHeight | ( | ) | const [inline] |
Get the base height that the overlay subgraph will be projected down to.
void osgSim::OverlayNode::setOverlayClearColor | ( | const osg::Vec4 & | color | ) | [inline] |
Set the clear color to use when rendering the overlay subgraph.
const osg::Vec4& osgSim::OverlayNode::getOverlayClearColor | ( | ) | const [inline] |
Get the clear color to use when rendering the overlay subgraph.
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.
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::setOverlayTextureUnit | ( | unsigned int | unit | ) |
Set the texture unit that the texture should be assigned to.
unsigned int osgSim::OverlayNode::getOverlayTextureUnit | ( | ) | const [inline] |
Get the texture unit that the texture should be assigned to.
void osgSim::OverlayNode::setOverlayTextureSizeHint | ( | unsigned int | size | ) |
Set the texture size hint.
The size hint is used to request a texture of specified size.
unsigned int osgSim::OverlayNode::getOverlayTextureSizeHint | ( | ) | const [inline] |
Get the texture size hint.
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::resizeGLObjectBuffers | ( | unsigned | int | ) | [virtual] |
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.
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] |
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] |
TextureObjectValidList osgSim::OverlayNode::_textureObjectValidList [mutable, protected] |
osg::ref_ptr<osg::Node> osgSim::OverlayNode::_overlaySubgraph [protected] |
osg::ref_ptr<osg::StateSet> osgSim::OverlayNode::_mainStateSet [protected] |
GLenum osgSim::OverlayNode::_texEnvMode [protected] |
unsigned int osgSim::OverlayNode::_textureUnit [protected] |
unsigned int osgSim::OverlayNode::_textureSizeHint [protected] |
osg::Vec4 osgSim::OverlayNode::_overlayClearColor [protected] |
bool osgSim::OverlayNode::_continuousUpdate [protected] |
double osgSim::OverlayNode::_overlayBaseHeight [protected] |
bool osgSim::OverlayNode::_updateCamera [protected] |