OpenWalnut
1.5.0dev
|
class to implement rulers orthogonally More...
#include <WRulerOrtho.h>
Public Member Functions | |
WRulerOrtho (std::shared_ptr< WCoordConverter >coordConverter, osg::Vec3 origin, scaleMode mode, bool showNumbers=true) | |
standard constructor More... | |
~WRulerOrtho () | |
destructor More... | |
Public Member Functions inherited from WRuler | |
WRuler () | |
standard constructor More... | |
~WRuler () | |
destructor More... | |
Private Member Functions | |
void | create () |
creates the osg node for the ruler representation More... | |
void | addLabel (osg::Vec3 position, std::string text) |
helper function to add a label to the ruler More... | |
osg::ref_ptr< osg::Geometry > | createXY () |
Helper function to create the ruler along the x axis. More... | |
osg::ref_ptr< osg::Geometry > | createXZ () |
Helper function to create the ruler along the x axis. More... | |
osg::ref_ptr< osg::Geometry > | createYX () |
Helper function to create the ruler along the y axis. More... | |
osg::ref_ptr< osg::Geometry > | createYZ () |
Helper function to create the ruler along the y axis. More... | |
osg::ref_ptr< osg::Geometry > | createZX () |
Helper function to create the ruler along the z axis. More... | |
osg::ref_ptr< osg::Geometry > | createZY () |
Helper function to create the ruler along the z axis. More... | |
std::string | numberToString (int number) |
converts a number into a string according to the currently selected coordinate system More... | |
Private Attributes | |
std::shared_ptr< WCoordConverter > | m_coordConverter |
stores pointer to a coordinate converter More... | |
osg::Vec3 | m_origin |
Origin of the ruler, it will be drawn in the positive direction. More... | |
scaleMode | m_scaleMode |
orientation of ruler More... | |
bool | m_showNumbers |
flag to indicate wether to show number labels More... | |
WVector3d | m_lb |
= m_coordConverter->getBoundingBox().first; More... | |
WVector3d | m_ub |
= m_coordConverter->getBoundingBox().second; More... | |
class to implement rulers orthogonally
Definition at line 51 of file WRulerOrtho.h.
WRulerOrtho::WRulerOrtho | ( | std::shared_ptr< WCoordConverter > | coordConverter, |
osg::Vec3 | origin, | ||
scaleMode | mode, | ||
bool | showNumbers = true |
||
) |
standard constructor
coordConverter | |
origin | |
mode | |
showNumbers |
Definition at line 38 of file WRulerOrtho.cpp.
References create(), m_coordConverter, m_lb, and m_ub.
WRulerOrtho::~WRulerOrtho | ( | ) |
destructor
Definition at line 51 of file WRulerOrtho.cpp.
|
private |
helper function to add a label to the ruler
position | position of thelabel |
text | text |
Definition at line 100 of file WRulerOrtho.cpp.
References WPathHelper::getAllFonts().
Referenced by createXY(), createXZ(), createYX(), createYZ(), createZX(), and createZY().
|
private |
creates the osg node for the ruler representation
Definition at line 55 of file WRulerOrtho.cpp.
References createXY(), createXZ(), createYX(), createYZ(), createZX(), createZY(), and m_scaleMode.
Referenced by WRulerOrtho().
|
private |
Helper function to create the ruler along the x axis.
Definition at line 126 of file WRulerOrtho.cpp.
References addLabel(), m_coordConverter, m_lb, m_origin, m_showNumbers, m_ub, numberToString(), and string_utils::toString().
Referenced by create().
|
private |
Helper function to create the ruler along the x axis.
Definition at line 200 of file WRulerOrtho.cpp.
References addLabel(), m_coordConverter, m_lb, m_origin, m_showNumbers, m_ub, numberToString(), and string_utils::toString().
Referenced by create().
|
private |
Helper function to create the ruler along the y axis.
Definition at line 273 of file WRulerOrtho.cpp.
References addLabel(), m_coordConverter, m_lb, m_origin, m_showNumbers, m_ub, numberToString(), and string_utils::toString().
Referenced by create().
|
private |
Helper function to create the ruler along the y axis.
Definition at line 348 of file WRulerOrtho.cpp.
References addLabel(), m_coordConverter, m_lb, m_origin, m_showNumbers, m_ub, numberToString(), and string_utils::toString().
Referenced by create().
|
private |
Helper function to create the ruler along the z axis.
Definition at line 423 of file WRulerOrtho.cpp.
References addLabel(), m_coordConverter, m_lb, m_origin, m_showNumbers, m_ub, numberToString(), and string_utils::toString().
Referenced by create().
|
private |
Helper function to create the ruler along the z axis.
Definition at line 498 of file WRulerOrtho.cpp.
References addLabel(), m_coordConverter, m_lb, m_origin, m_showNumbers, m_ub, numberToString(), and string_utils::toString().
Referenced by create().
|
private |
converts a number into a string according to the currently selected coordinate system
number |
Definition at line 573 of file WRulerOrtho.cpp.
References m_coordConverter, m_scaleMode, and string_utils::toString().
Referenced by createXY(), createXZ(), createYX(), createYZ(), createZX(), and createZY().
|
private |
stores pointer to a coordinate converter
Definition at line 71 of file WRulerOrtho.h.
Referenced by createXY(), createXZ(), createYX(), createYZ(), createZX(), createZY(), numberToString(), and WRulerOrtho().
|
private |
= m_coordConverter->getBoundingBox().first;
Definition at line 85 of file WRulerOrtho.h.
Referenced by createXY(), createXZ(), createYX(), createYZ(), createZX(), createZY(), and WRulerOrtho().
|
private |
Origin of the ruler, it will be drawn in the positive direction.
Definition at line 76 of file WRulerOrtho.h.
Referenced by createXY(), createXZ(), createYX(), createYZ(), createZX(), and createZY().
|
private |
orientation of ruler
Definition at line 81 of file WRulerOrtho.h.
Referenced by create(), and numberToString().
|
private |
flag to indicate wether to show number labels
Definition at line 83 of file WRulerOrtho.h.
Referenced by createXY(), createXZ(), createYX(), createYZ(), createZX(), and createZY().
|
private |
= m_coordConverter->getBoundingBox().second;
Definition at line 86 of file WRulerOrtho.h.
Referenced by createXY(), createXZ(), createYX(), createYZ(), createZX(), createZY(), and WRulerOrtho().