29 #include <osg/MatrixTransform>
31 #include "../../dataHandler/WGridRegular3D.h"
32 #include "../../common/WSharedObject.h"
33 #include "../../common/WProperties_Fwd.h"
35 #include "../widgets/labeling/WGELabel.h"
46 typedef osg::ref_ptr< WGEGridNode >
SPtr;
51 typedef osg::ref_ptr< const WGEGridNode >
ConstSPtr;
This node is able to represent a grid in certain ways.
osg::ref_ptr< osg::Geode > m_boundaryGeode
The geometry for the boundary.
WGELabel::SPtr m_borderLabels[8]
The labels at the corner.
osg::ref_ptr< const WGEGridNode > ConstSPtr
Convenience typedef for a osg::ref_ptr< const WGEGridNode >.
bool m_gridUpdate
If true, the labels and geometry gets adapted properly.
osg::ref_ptr< osg::Geode > m_labelGeode
The geode keeping the labels.
virtual ~WGEGridNode()
Destructor.
void setGridLineWidth(int linewidth=1)
Set the line width of the gird.
void setEnableLabels(bool enable=true)
En- or disable labels on the boundary corners.
void setGridColor(const WColor &color)
Sets the color of the rendered grid.
bool m_showLabels
If true, labels get used.
int getGridLineWidth() const
Get the line width of the gird.
void callback(osg::Node *node)
The actual callback handling changes in the grid.
WColor m_bbColor
The color of bbox/grid.
WGridRegular3D::ConstSPtr getGrid() const
Returns the currently set grid.
bool m_showGrid
True if the grid should be rendered.
bool m_gridGeometryUpdate
If true, the inner grid geometry gets recreated.
WSharedObject< WGridRegular3D::ConstSPtr > m_grid
The actual grid which should be represented by this node.
bool m_showBBox
True if the bbox should be rendered.
void setEnableGrid(bool enable=true)
En- or disable grid mode.
osg::ref_ptr< osg::Geode > m_innerGridGeode
The geometry for the whole grid.
bool getEnableBBox() const
Returns whether bbox mode is enabled or not.
int m_boxLineWidth
The line width of the box.
osg::ref_ptr< WGEGridNode > SPtr
Convenience typedef for a osg::ref_ptr< WGEGridNode >.
void setBoxLineWidth(int linewidth=4)
Set the line width of the bounding box.
bool getEnableGrid() const
Returns whether grid mode is enabled or not.
void setBBoxColor(const WColor &color)
Sets the color of the rendered bbox.
WColor m_gridColor
The color of the grid.
void setGrid(WGridRegular3D::ConstSPtr grid)
Updates the node to use the new specified grid.
int getBoxLineWidth() const
get the line width of the bounding box.
WGEGridNode(WGridRegular3D::ConstSPtr grid)
Creates a node representing the specified grid.
void setEnableBBox(bool enable=true)
En- or disable bbox mode.
bool getEnableLabels() const
Returns whether labels on the corners are enabled or not.
const WColor & getBBoxColor() const
The currently set color used for rendering the bbox.
const WColor & getGridColor() const
The currently set color used for rendering the grid.
int m_gridLineWidth
Line width used for the grid.
osg::ref_ptr< WGELabel > SPtr
Convenience typedef for a osg::ref_ptr< WGELabel >.
std::shared_ptr< const WGridRegular3DTemplate > ConstSPtr
Convenience typedef for a std::shared_ptr< const WGridRegular3DTemplate >.