|
AGX Dynamics 2.42.1.1
|
Callback when the model view matrix of the main camera has been updated. More...
#include <TransparencyUtils.h>
Inheritance diagram for agxOSG::ModelViewMatrixFinder:Public Types | |
| using | OnModelViewUpdated = std::function< void(const osg::Matrixf &)> |
Public Member Functions | |
| ModelViewMatrixFinder ()=default | |
| Default constructor for polling and manual handling of isUpdated. | |
| ModelViewMatrixFinder (OnModelViewUpdated onUpdated) | |
| Construct given callback fired when the model view matrix of the main camera has been changed. | |
| virtual | ~ModelViewMatrixFinder ()=default |
| virtual bool | cull (osg::NodeVisitor *visitor, osg::Drawable *drawable, osg::RenderInfo *renderInfo) const override |
Public Attributes | |
| bool | isUpdated = false |
| osg::Matrixf | modelViewMatrix {} |
| OnModelViewUpdated | onUpdated {} |
| osg::Matrixf | prevModelViewMatrix {} |
Callback when the model view matrix of the main camera has been updated.
Note that the callback is only fired when the model view matrix has been changed, i.e., not each frame, another callback has to be used for that.
For polling use: if ( mvmFinder->isUpdated ) { agxOSG::PrimitiveSetTriangleSorter::sort( *geometry, mvmFinder->modelViewMatrix ); mvmFinder->isUpdated = false; }
The isUpdated flag is set to false if onUpdated callback is valid and has been called, if onUpdated = {} then isUpdated has to be set to false externally when the updated model view matrix has been seen.
Definition at line 229 of file TransparencyUtils.h.
| using agxOSG::ModelViewMatrixFinder::OnModelViewUpdated = std::function<void( const osg::Matrixf& )> |
Definition at line 231 of file TransparencyUtils.h.
| agxOSG::ModelViewMatrixFinder::ModelViewMatrixFinder | ( | OnModelViewUpdated | onUpdated | ) |
Construct given callback fired when the model view matrix of the main camera has been changed.
| onUpdated | - callback fired when the main camera model view matrix has been updated |
|
default |
Default constructor for polling and manual handling of isUpdated.
|
virtualdefault |
|
overridevirtual |
|
mutable |
Definition at line 252 of file TransparencyUtils.h.
|
mutable |
Definition at line 254 of file TransparencyUtils.h.
| OnModelViewUpdated agxOSG::ModelViewMatrixFinder::onUpdated {} |
Definition at line 251 of file TransparencyUtils.h.
|
mutable |
Definition at line 253 of file TransparencyUtils.h.