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...
 
virtual PyObjectgetPyObject (void)
 This method returns the Python wrapper for a C++ object. More...
 
virtual Type getTypeId (void) const
 
bool isDerivedFrom (const Type type) const
 
virtual void setPyObject (PyObject *)
 
virtual ~BaseClass ()
 Destruction. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Base::BaseClass
static void * create (void)
 
static Type getClassTypeId (void)
 
static void init (void)
 
- 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.

Referenced by Gui::AxisOriginPy::getNode(), and draftguitools.gui_trackers.ghostTracker::update().

◆ getPlane()

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

Get the origin plane size and distance from the axis.

References DraftVecUtils::dist().

Referenced by Gui::AxisOriginPy::getPlane().

◆ 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.

Referenced by Gui::AxisOriginPy::setAxisLength().

◆ 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.

Referenced by Gui::AxisOriginPy::setLabels().

◆ setLineWidth()

void AxisOrigin::setLineWidth ( float  size)

Set axis line width.

Referenced by Gui::AxisOriginPy::setLineWidth().

◆ setPlane()

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

Set the origin plane size and distance from the axis.

Referenced by Gui::AxisOriginPy::setPlane().

◆ setPointSize()

void AxisOrigin::setPointSize ( float  size)

Set origin point size.

Referenced by Gui::AxisOriginPy::setPointSize().

◆ setScale()

void AxisOrigin::setScale ( float  scale)

Set the auto scale factor, 0 to disable it.

Referenced by Gui::AxisOriginPy::setScale().


The documentation for this class was generated from the following files:
  • Sources/FreeCAD/src/Gui/AxisOrigin.h
  • Sources/FreeCAD/src/Gui/AxisOrigin.cpp