A class to create a Coin3D node representation of an coordinate system. More...
#include <AxisOrigin.h>
Public Member Functions | |
AxisOrigin () | |
float | getAxisLength () const |
Get axis base line length. More... | |
bool | getDetailPath (const char *subname, SoFullPath *pPath, SoDetail *&det) const |
Return the coin path of a named element. More... | |
bool | getElementPicked (const SoPickedPoint *pp, std::string &subname) const |
Return the name of picked element. More... | |
const std::map< std::string, std::string > & | getLabels () const |
Obtain the axis component names. More... | |
float | getLineWidth () const |
Get axis line width. More... | |
SoGroup * | getNode () |
Obtain the constructed Coin3D representation. More... | |
std::pair< float, float > | getPlane () const |
Get the origin plane size and distance from the axis. More... | |
float | getPointSize () const |
Get origin point size. More... | |
float | getScale () const |
Get the auto scale factor. More... | |
void | setAxisLength (float size) |
Set the axis line length. More... | |
void | setLabels (const std::map< std::string, std::string > &labels) |
Set customized names for axis components. More... | |
void | setLineWidth (float size) |
Set axis line width. More... | |
void | setPlane (float size, float dist) |
Set the origin plane size and distance from the axis. More... | |
void | setPointSize (float size) |
Set origin point size. More... | |
void | setScale (float scale) |
Set the auto scale factor, 0 to disable it. More... | |
Public Member Functions inherited from Base::BaseClass | |
BaseClass () | |
Construction. More... | |
BaseClass (const BaseClass &)=default | |
virtual PyObject * | getPyObject () |
This method returns the Python wrapper for a C++ object. More... | |
virtual Type | getTypeId () const |
bool | isDerivedFrom (const Type type) const |
BaseClass & | operator= (const BaseClass &)=default |
virtual void | setPyObject (PyObject *) |
virtual | ~BaseClass () |
Destruction. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Base::BaseClass | |
static void * | create () |
static Type | getClassTypeId () |
static void | init () |
Static Protected Member Functions inherited from Base::BaseClass | |
static void | initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr) |
A class to create a Coin3D node representation of an coordinate system.
AxisOrigin::AxisOrigin | ( | ) |
float Gui::AxisOrigin::getAxisLength | ( | ) | const |
Get axis base line length.
bool AxisOrigin::getDetailPath | ( | const char * | subname, |
SoFullPath * | pPath, | ||
SoDetail *& | det | ||
) | const |
Return the coin path of a named element.
bool AxisOrigin::getElementPicked | ( | const SoPickedPoint * | pp, |
std::string & | subname | ||
) | const |
Return the name of picked element.
const std::map< std::string, std::string > & Gui::AxisOrigin::getLabels | ( | ) | const |
Obtain the axis component names.
float Gui::AxisOrigin::getLineWidth | ( | ) | const |
Get axis line width.
SoGroup * AxisOrigin::getNode | ( | ) |
Obtain the constructed Coin3D representation.
References Gui::SoAutoZoomTranslation::scaleFactor.
std::pair< float, float > Gui::AxisOrigin::getPlane | ( | ) | const |
Get the origin plane size and distance from the axis.
References DraftVecUtils::dist().
float Gui::AxisOrigin::getPointSize | ( | ) | const |
Get origin point size.
float Gui::AxisOrigin::getScale | ( | ) | const |
Get the auto scale factor.
References draftfunctions.scale::scale().
void AxisOrigin::setAxisLength | ( | float | size | ) |
Set the axis line length.
void AxisOrigin::setLabels | ( | const std::map< std::string, std::string > & | labels | ) |
Set customized names for axis components.
labels | the input names. Available keys are, O: origin, X: x axis, Y: y axis, Z: z axis, XY: XY plane, XZ: XY plane, YZ: YZ plane |
There are default labels for all components. You can also use this function to choose which components are hidden, by not include the key in the input labels.
void AxisOrigin::setLineWidth | ( | float | size | ) |
Set axis line width.
void AxisOrigin::setPlane | ( | float | size, |
float | dist | ||
) |
Set the origin plane size and distance from the axis.
void AxisOrigin::setPointSize | ( | float | size | ) |
Set origin point size.
void AxisOrigin::setScale | ( | float | scale | ) |
Set the auto scale factor, 0 to disable it.