28 #include <osg/Drawable>
29 #include <osg/Geometry>
30 #include <osg/MatrixTransform>
31 #include <osg/Projection>
33 #include "geodes/WGEGridNode.h"
34 #include "WGEZoomTrackballNodeVisitor.h"
49 double left, right, bottom, top, zNear, zFar;
50 if( node.getProjectionMatrixAsOrtho( left, right, bottom, top, zNear, zFar ) && zNear == -1 && zFar == 1 )
60 double left, right, bottom, top, zNear, zFar;
61 if( node.getMatrix().getOrtho( left, right, bottom, top, zNear, zFar ) && zNear == -1 && zFar == 1 )
70 osg::BoundingBox bb = node.getBoundingBox();
80 m_bb.expandBy( bb.corner( 0 ) * matrix );
81 m_bb.expandBy( bb.corner( 1 ) * matrix );
82 m_bb.expandBy( bb.corner( 2 ) * matrix );
83 m_bb.expandBy( bb.corner( 3 ) * matrix );
84 m_bb.expandBy( bb.corner( 4 ) * matrix );
85 m_bb.expandBy( bb.corner( 5 ) * matrix );
86 m_bb.expandBy( bb.corner( 6 ) * matrix );
87 m_bb.expandBy( bb.corner( 7 ) * matrix );
99 node.computeLocalToWorldMatrix( matrix,
this );
std::vector< osg::Matrix > m_matrixStack
The stack for the matrices.
virtual void reset()
Resets this visitor.
osg::BoundingBox & getBoundingBox()
Gets the bounding box.
void apply(osg::Camera &node)
Handles camera nodes.
osg::BoundingBox m_bb
The bounding box that is generated.
WGEZoomTrackballNodeVisitor(TraversalMode traversalMode=TRAVERSE_ACTIVE_CHILDREN)
Creates a new node visitor.