Gui::AxisOrigin Class Reference

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...
 
SoGroupgetNode ()
 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 PyObjectgetPyObject ()
 This method returns the Python wrapper for a C++ object. More...
 
virtual Type getTypeId () const
 
bool isDerivedFrom (const Type type) const
 
BaseClassoperator= (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)
 

Detailed Description

A class to create a Coin3D node representation of an coordinate system.

Constructor & Destructor Documentation

◆ AxisOrigin()

AxisOrigin::AxisOrigin ( )

Member Function Documentation

◆ getAxisLength()

float Gui::AxisOrigin::getAxisLength ( ) const

Get axis base line length.

◆ getDetailPath()

bool AxisOrigin::getDetailPath ( const char *  subname,
SoFullPath *  pPath,
SoDetail *&  det 
) const

Return the coin path of a named element.

See also
ViewProvider::getDetailPath()

◆ getElementPicked()

bool AxisOrigin::getElementPicked ( const SoPickedPoint *  pp,
std::string &  subname 
) const

Return the name of picked element.

See also
ViewProvider::getElementPicked()

◆ getLabels()

const std::map< std::string, std::string > & Gui::AxisOrigin::getLabels ( ) const

Obtain the axis component names.

◆ getLineWidth()

float Gui::AxisOrigin::getLineWidth ( ) const

Get axis line width.

◆ getNode()

SoGroup * AxisOrigin::getNode ( )

Obtain the constructed Coin3D representation.

References Gui::SoAutoZoomTranslation::scaleFactor.

◆ getPlane()

std::pair< float, float > Gui::AxisOrigin::getPlane ( ) const

Get the origin plane size and distance from the axis.

References DraftVecUtils::dist().

◆ getPointSize()

float Gui::AxisOrigin::getPointSize ( ) const

Get origin point size.

◆ getScale()

float Gui::AxisOrigin::getScale ( ) const

Get the auto scale factor.

References draftfunctions.scale::scale().

◆ setAxisLength()

void AxisOrigin::setAxisLength ( float  size)

Set the axis line length.

◆ setLabels()

void AxisOrigin::setLabels ( const std::map< std::string, std::string > &  labels)

Set customized names for axis components.

Parameters
labelsthe 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.

◆ setLineWidth()

void AxisOrigin::setLineWidth ( float  size)

Set axis line width.

◆ setPlane()

void AxisOrigin::setPlane ( float  size,
float  dist 
)

Set the origin plane size and distance from the axis.

◆ setPointSize()

void AxisOrigin::setPointSize ( float  size)

Set origin point size.

◆ setScale()

void AxisOrigin::setScale ( float  scale)

Set the auto scale factor, 0 to disable it.


The documentation for this class was generated from the following files: