MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::ViewportGlobalBasis Class Reference

Class to unify Global Basis control. More...

#include <MRViewportGlobalBasis.h>

Public Member Functions

MRVIEWER_API ViewportGlobalBasis ()
 Constructs default global basis object.
 
MRVIEWER_API float getAxesLength (ViewportId id={}) const
 Returns length of axis (all are the same)
 
MRVIEWER_API float getAxesWidth (ViewportId id={}) const
 Returns width of axis (all are the same)
 
MRVIEWER_API void setAxesProps (float length, float width, ViewportId id={})
 Sets length and width for all axes.
 
MRVIEWER_API void setColors (const Color &xColor, const Color &yColor, const Color &zColor, const Color &labelColors)
 Sets colors for each axis of this object.
 
MRVIEWER_API const std::vector< std::shared_ptr< VisualObject > > & axesChildren () const
 Simple accessor to visual children (useful for pickers or box calculations)
 
MRVIEWER_API bool getRedrawFlag (ViewportMask vpMask) const
 returns true if any of its children requires redraw
 
MRVIEWER_API void resetRedrawFlag () const
 reset redraw flag for all children
 
MRVIEWER_API void draw (const Viewport &vp) const
 Draw this object into given viewport.
 
MRVIEWER_API void setVisible (bool on, ViewportMask vpMask=ViewportMask::all())
 Set visibility for all child objects.
 
MRVIEWER_API void setVisibilityMask (ViewportMask vpMask)
 
bool isVisible (ViewportMask vpMask=ViewportMask::any()) const
 returns true if object is present and visible
 
ViewportMask getVisibilityMask () const
 
MRVIEWER_API void setGridVisible (bool on, ViewportMask vpMask=ViewportMask::all())
 Set visibility for grid objects.
 
MRVIEWER_API void setGridVisibilityMask (ViewportMask vpMask)
 
bool isGridVisible (ViewportMask vpMask=ViewportMask::any()) const
 returns true if grid is present and visible
 
ViewportMask getGridVisibilityMask () const
 
void resetConnections ()
 clears connections of this structure (by default it changes colors on theme change and change font size on rescale)
 

Detailed Description

Class to unify Global Basis control.

Constructor & Destructor Documentation

◆ ViewportGlobalBasis()

MRVIEWER_API MR::ViewportGlobalBasis::ViewportGlobalBasis ( )

Constructs default global basis object.

Member Function Documentation

◆ axesChildren()

MRVIEWER_API const std::vector< std::shared_ptr< VisualObject > > & MR::ViewportGlobalBasis::axesChildren ( ) const

Simple accessor to visual children (useful for pickers or box calculations)

◆ draw()

MRVIEWER_API void MR::ViewportGlobalBasis::draw ( const Viewport & vp) const

Draw this object into given viewport.

◆ getAxesLength()

MRVIEWER_API float MR::ViewportGlobalBasis::getAxesLength ( ViewportId id = {}) const

Returns length of axis (all are the same)

◆ getAxesWidth()

MRVIEWER_API float MR::ViewportGlobalBasis::getAxesWidth ( ViewportId id = {}) const

Returns width of axis (all are the same)

◆ getGridVisibilityMask()

ViewportMask MR::ViewportGlobalBasis::getGridVisibilityMask ( ) const
inline

◆ getRedrawFlag()

MRVIEWER_API bool MR::ViewportGlobalBasis::getRedrawFlag ( ViewportMask vpMask) const

returns true if any of its children requires redraw

◆ getVisibilityMask()

ViewportMask MR::ViewportGlobalBasis::getVisibilityMask ( ) const
inline

◆ isGridVisible()

bool MR::ViewportGlobalBasis::isGridVisible ( ViewportMask vpMask = ViewportMask::any()) const
inline

returns true if grid is present and visible

◆ isVisible()

bool MR::ViewportGlobalBasis::isVisible ( ViewportMask vpMask = ViewportMask::any()) const
inline

returns true if object is present and visible

◆ resetConnections()

void MR::ViewportGlobalBasis::resetConnections ( )
inline

clears connections of this structure (by default it changes colors on theme change and change font size on rescale)

◆ resetRedrawFlag()

MRVIEWER_API void MR::ViewportGlobalBasis::resetRedrawFlag ( ) const

reset redraw flag for all children

◆ setAxesProps()

MRVIEWER_API void MR::ViewportGlobalBasis::setAxesProps ( float length,
float width,
ViewportId id = {} )

Sets length and width for all axes.

◆ setColors()

MRVIEWER_API void MR::ViewportGlobalBasis::setColors ( const Color & xColor,
const Color & yColor,
const Color & zColor,
const Color & labelColors )

Sets colors for each axis of this object.

◆ setGridVisibilityMask()

MRVIEWER_API void MR::ViewportGlobalBasis::setGridVisibilityMask ( ViewportMask vpMask)

◆ setGridVisible()

MRVIEWER_API void MR::ViewportGlobalBasis::setGridVisible ( bool on,
ViewportMask vpMask = ViewportMask::all() )

Set visibility for grid objects.

◆ setVisibilityMask()

MRVIEWER_API void MR::ViewportGlobalBasis::setVisibilityMask ( ViewportMask vpMask)

◆ setVisible()

MRVIEWER_API void MR::ViewportGlobalBasis::setVisible ( bool on,
ViewportMask vpMask = ViewportMask::all() )

Set visibility for all child objects.


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