OpenWalnut
1.3.1
|
This callback is useful to update viewport information on several nodes supporting it. More...
#include <WGEViewportCallback.h>
Public Member Functions | |
WGEViewportCallback (osg::ref_ptr< Source > reference) | |
Creates new instance of viewport callback. | |
virtual | ~WGEViewportCallback () |
Destructor. | |
virtual void | operator() (osg::Node *node, osg::NodeVisitor *nv) |
This operator gets called by OSG every update cycle. |
Private Attributes | |
osg::ref_ptr< Source > | m_reference |
The reference camera to use. |
This callback is useful to update viewport information on several nodes supporting it.
The specified type must support an setViewport method. This is especially useful to keep offscreen render cameras in sync with the scene cam or to update HUD viewport information. Note that the order of execution of callbacks for a node can cause problems as the new viewport might get set after it is needed.
T | the type supporting setViewport |
Source | the type from who the viewport should be acquired by using osg::Viewport* getViewport() |
Definition at line 42 of file WGEViewportCallback.h.
|
explicit |
Creates new instance of viewport callback.
reference | set the viewport to the one of the reference camera. |
Definition at line 74 of file WGEViewportCallback.h.
|
virtual |
Destructor.
Definition at line 82 of file WGEViewportCallback.h.
|
virtual |
This operator gets called by OSG every update cycle.
It applies the viewport.
node | the osg node |
nv | the node visitor |
Definition at line 88 of file WGEViewportCallback.h.
|
private |
The reference camera to use.
Definition at line 70 of file WGEViewportCallback.h.