![]() |
OpenWalnut
1.5.0dev
|
This node is able to represent a grid in certain ways. More...
#include <WGEGridNode.h>
Inheritance diagram for WGEGridNode:
Collaboration diagram for WGEGridNode:Public Types | |
| typedef osg::ref_ptr< WGEGridNode > | SPtr |
| Convenience typedef for a osg::ref_ptr< WGEGridNode >. More... | |
| typedef osg::ref_ptr< const WGEGridNode > | ConstSPtr |
| Convenience typedef for a osg::ref_ptr< const WGEGridNode >. More... | |
Public Member Functions | |
| WGEGridNode (WGridRegular3D::ConstSPtr grid) | |
| Creates a node representing the specified grid. More... | |
| virtual | ~WGEGridNode () |
| Destructor. More... | |
| void | setGrid (WGridRegular3D::ConstSPtr grid) |
| Updates the node to use the new specified grid. More... | |
| WGridRegular3D::ConstSPtr | getGrid () const |
| Returns the currently set grid. More... | |
| bool | getEnableLabels () const |
| Returns whether labels on the corners are enabled or not. More... | |
| void | setEnableLabels (bool enable=true) |
| En- or disable labels on the boundary corners. More... | |
| bool | getEnableBBox () const |
| Returns whether bbox mode is enabled or not. More... | |
| void | setEnableBBox (bool enable=true) |
| En- or disable bbox mode. More... | |
| bool | getEnableGrid () const |
| Returns whether grid mode is enabled or not. More... | |
| void | setEnableGrid (bool enable=true) |
| En- or disable grid mode. More... | |
| const WColor & | getBBoxColor () const |
| The currently set color used for rendering the bbox. More... | |
| void | setBBoxColor (const WColor &color) |
| Sets the color of the rendered bbox. More... | |
| const WColor & | getGridColor () const |
| The currently set color used for rendering the grid. More... | |
| void | setGridColor (const WColor &color) |
| Sets the color of the rendered grid. More... | |
| void | setGridLineWidth (int linewidth=1) |
| Set the line width of the gird. More... | |
| void | setBoxLineWidth (int linewidth=4) |
| Set the line width of the bounding box. More... | |
| int | getGridLineWidth () const |
| Get the line width of the gird. More... | |
| int | getBoxLineWidth () const |
| get the line width of the bounding box. More... | |
Private Member Functions | |
| void | callback (osg::Node *node) |
| The actual callback handling changes in the grid. More... | |
Private Attributes | |
| WSharedObject< WGridRegular3D::ConstSPtr > | m_grid |
| The actual grid which should be represented by this node. More... | |
| osg::ref_ptr< osg::Geode > | m_boundaryGeode |
| The geometry for the boundary. More... | |
| osg::ref_ptr< osg::Geode > | m_innerGridGeode |
| The geometry for the whole grid. More... | |
| WGELabel::SPtr | m_borderLabels [8] |
| The labels at the corner. More... | |
| osg::ref_ptr< osg::Geode > | m_labelGeode |
| The geode keeping the labels. More... | |
| bool | m_gridUpdate |
| If true, the labels and geometry gets adapted properly. More... | |
| bool | m_gridGeometryUpdate |
| If true, the inner grid geometry gets recreated. More... | |
| bool | m_showLabels |
| If true, labels get used. More... | |
| bool | m_showBBox |
| True if the bbox should be rendered. More... | |
| bool | m_showGrid |
| True if the grid should be rendered. More... | |
| WColor | m_bbColor |
| The color of bbox/grid. More... | |
| WColor | m_gridColor |
| The color of the grid. More... | |
| int | m_gridLineWidth |
| Line width used for the grid. More... | |
| int | m_boxLineWidth |
| The line width of the box. More... | |
This node is able to represent a grid in certain ways.
It can show its boundary or the whole grid if desired.
Definition at line 40 of file WGEGridNode.h.
| typedef osg::ref_ptr< const WGEGridNode > WGEGridNode::ConstSPtr |
Convenience typedef for a osg::ref_ptr< const WGEGridNode >.
Definition at line 51 of file WGEGridNode.h.
| typedef osg::ref_ptr< WGEGridNode > WGEGridNode::SPtr |
Convenience typedef for a osg::ref_ptr< WGEGridNode >.
Definition at line 46 of file WGEGridNode.h.
|
explicit |
Creates a node representing the specified grid.
| grid | the grid to represent. |
Definition at line 34 of file WGEGridNode.cpp.
References callback(), wge::createUnitCubeAsLines(), WSharedObject< T >::getWriteTicket(), m_bbColor, m_borderLabels, m_boundaryGeode, m_boxLineWidth, m_grid, m_gridLineWidth, m_innerGridGeode, and m_labelGeode.
Here is the call graph for this function:
|
virtual |
Destructor.
Definition at line 125 of file WGEGridNode.cpp.
|
private |
The actual callback handling changes in the grid.
| node | the node. This will be the this pointer. |
Definition at line 234 of file WGEGridNode.cpp.
References WSharedObject< T >::getReadTicket(), m_bbColor, m_borderLabels, m_boundaryGeode, m_boxLineWidth, m_grid, m_gridColor, m_gridGeometryUpdate, m_gridLineWidth, m_gridUpdate, m_innerGridGeode, m_labelGeode, m_showBBox, m_showGrid, and m_showLabels.
Referenced by WGEGridNode().
Here is the call graph for this function:
Here is the caller graph for this function:| const WColor & WGEGridNode::getBBoxColor | ( | ) | const |
The currently set color used for rendering the bbox.
Definition at line 175 of file WGEGridNode.cpp.
References m_bbColor.
| int WGEGridNode::getBoxLineWidth | ( | ) | const |
get the line width of the bounding box.
Definition at line 214 of file WGEGridNode.cpp.
References m_boxLineWidth.
| bool WGEGridNode::getEnableBBox | ( | ) | const |
Returns whether bbox mode is enabled or not.
Definition at line 153 of file WGEGridNode.cpp.
References m_showBBox.
| bool WGEGridNode::getEnableGrid | ( | ) | const |
Returns whether grid mode is enabled or not.
Definition at line 164 of file WGEGridNode.cpp.
References m_showGrid.
| bool WGEGridNode::getEnableLabels | ( | ) | const |
Returns whether labels on the corners are enabled or not.
Definition at line 142 of file WGEGridNode.cpp.
References m_showLabels.
| WGridRegular3D::ConstSPtr WGEGridNode::getGrid | ( | ) | const |
Returns the currently set grid.
Definition at line 137 of file WGEGridNode.cpp.
References WSharedObject< T >::getReadTicket(), and m_grid.
Here is the call graph for this function:| const WColor & WGEGridNode::getGridColor | ( | ) | const |
The currently set color used for rendering the grid.
Definition at line 186 of file WGEGridNode.cpp.
References m_gridColor.
| int WGEGridNode::getGridLineWidth | ( | ) | const |
Get the line width of the gird.
Definition at line 209 of file WGEGridNode.cpp.
References m_gridLineWidth.
| void WGEGridNode::setBBoxColor | ( | const WColor & | color | ) |
Sets the color of the rendered bbox.
| color | the color |
Definition at line 180 of file WGEGridNode.cpp.
References m_bbColor, and m_gridUpdate.
| void WGEGridNode::setBoxLineWidth | ( | int | linewidth = 4 | ) |
Set the line width of the bounding box.
| linewidth | the linewidth. Default is 4. |
Definition at line 203 of file WGEGridNode.cpp.
References m_boxLineWidth, and m_gridUpdate.
| void WGEGridNode::setEnableBBox | ( | bool | enable = true | ) |
En- or disable bbox mode.
| enable | true to enbable |
Definition at line 158 of file WGEGridNode.cpp.
References m_gridUpdate, and m_showBBox.
| void WGEGridNode::setEnableGrid | ( | bool | enable = true | ) |
En- or disable grid mode.
| enable | true to enbable |
Definition at line 169 of file WGEGridNode.cpp.
References m_gridUpdate, and m_showGrid.
| void WGEGridNode::setEnableLabels | ( | bool | enable = true | ) |
En- or disable labels on the boundary corners.
| enable | true to enbable |
Definition at line 147 of file WGEGridNode.cpp.
References m_gridUpdate, and m_showLabels.
| void WGEGridNode::setGrid | ( | WGridRegular3D::ConstSPtr | grid | ) |
Updates the node to use the new specified grid.
| grid | the new grid to use |
Definition at line 130 of file WGEGridNode.cpp.
References WSharedObject< T >::getWriteTicket(), m_grid, m_gridGeometryUpdate, and m_gridUpdate.
Here is the call graph for this function:| void WGEGridNode::setGridColor | ( | const WColor & | color | ) |
Sets the color of the rendered grid.
| color | the color |
Definition at line 191 of file WGEGridNode.cpp.
References m_gridColor, and m_gridUpdate.
| void WGEGridNode::setGridLineWidth | ( | int | linewidth = 1 | ) |
Set the line width of the gird.
| linewidth | the linewidth. Default is 1. |
Definition at line 197 of file WGEGridNode.cpp.
References m_gridLineWidth, and m_gridUpdate.
|
private |
The color of bbox/grid.
Definition at line 239 of file WGEGridNode.h.
Referenced by callback(), getBBoxColor(), setBBoxColor(), and WGEGridNode().
|
private |
The labels at the corner.
Definition at line 197 of file WGEGridNode.h.
Referenced by callback(), and WGEGridNode().
|
private |
The geometry for the boundary.
Definition at line 187 of file WGEGridNode.h.
Referenced by callback(), and WGEGridNode().
|
private |
The line width of the box.
Definition at line 254 of file WGEGridNode.h.
Referenced by callback(), getBoxLineWidth(), setBoxLineWidth(), and WGEGridNode().
|
private |
The actual grid which should be represented by this node.
Definition at line 182 of file WGEGridNode.h.
Referenced by callback(), getGrid(), setGrid(), and WGEGridNode().
|
private |
The color of the grid.
Definition at line 244 of file WGEGridNode.h.
Referenced by callback(), getGridColor(), and setGridColor().
|
private |
If true, the inner grid geometry gets recreated.
Definition at line 219 of file WGEGridNode.h.
Referenced by callback(), and setGrid().
|
private |
Line width used for the grid.
Definition at line 249 of file WGEGridNode.h.
Referenced by callback(), getGridLineWidth(), setGridLineWidth(), and WGEGridNode().
|
private |
If true, the labels and geometry gets adapted properly.
Definition at line 214 of file WGEGridNode.h.
Referenced by callback(), setBBoxColor(), setBoxLineWidth(), setEnableBBox(), setEnableGrid(), setEnableLabels(), setGrid(), setGridColor(), and setGridLineWidth().
|
private |
The geometry for the whole grid.
Definition at line 192 of file WGEGridNode.h.
Referenced by callback(), and WGEGridNode().
|
private |
The geode keeping the labels.
Definition at line 202 of file WGEGridNode.h.
Referenced by callback(), and WGEGridNode().
|
private |
True if the bbox should be rendered.
Definition at line 229 of file WGEGridNode.h.
Referenced by callback(), getEnableBBox(), and setEnableBBox().
|
private |
True if the grid should be rendered.
Definition at line 234 of file WGEGridNode.h.
Referenced by callback(), getEnableGrid(), and setEnableGrid().
|
private |
If true, labels get used.
Definition at line 224 of file WGEGridNode.h.
Referenced by callback(), getEnableLabels(), and setEnableLabels().