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

#include <MRObjectTransformWidget.h>

+ Inheritance diagram for MR::ObjectTransformWidget:

Classes

class  ChangeXfAction
 History action for TransformWidget. More...
 

Public Types

enum  AxisTransformMode { AxisTranslation , AxisScaling , UniformScaling }
 Transform operation applying to object while dragging an axis. This parameter does not apply to active operation. More...
 

Public Member Functions

MRVIEWER_API void create (const Box3f &box, const AffineXf3f &xf, std::shared_ptr< ITransformControls > controls={})
 
MRVIEWER_API void reset ()
 
ControlBit getTransformModeMask (ViewportId id={}) const
 Returns current transform mode mask.
 
MRVIEWER_API void setTransformMode (ControlBit mask, ViewportId id={})
 Sets transform mode mask (enabling or disabling corresponding widget controls)
 
AxisTransformMode getAxisTransformMode () const
 Returns current axis transform mode (translate/scale object while dragging an axis)
 
void setAxisTransformMode (AxisTransformMode mode)
 Sets current axis transform mode (translate/scale object while dragging an axis)
 
std::shared_ptr< ObjectgetRootObject () const
 Returns root object of widget.
 
std::shared_ptr< ITransformControlsgetControls () const
 Returns controls object, that visualize widget.
 
template<typename T >
std::shared_ptr< T > getControlsAs () const
 
MRVIEWER_API void setControlsXf (const AffineXf3f &xf, ViewportId id={})
 
MRVIEWER_API AffineXf3f getControlsXf (ViewportId id={}) const
 
MRVIEWER_API void followObjVisibility (const std::weak_ptr< Object > &obj)
 
void setScaleTooltipCallback (std::function< void(float)> callback)
 Sets callback that will be called in draw function during scaling with current scale arg.
 
void setTranslateTooltipCallback (std::function< void(float)> callback)
 Sets callback that will be called in draw function during translation with current shift arg.
 
void setRotateTooltipCallback (std::function< void(float)> callback)
 Sets callback that will be called in draw function during rotation with current angle in rad.
 
void setStopModifyCallback (std::function< void()> callback)
 Sets callback that will be called when modification of widget stops.
 
void setStartModifyCallback (std::function< void()> callback)
 Sets callback that will be called when modification of widget starts.
 
void setAddXfCallback (std::function< void(const AffineXf3f &)> callback)
 Sets callback that will be called when widget gets additive transform.
 
void setApproveXfCallback (std::function< bool(const AffineXf3f &)> callback)
 
- Public Member Functions inherited from MR::MultiListener< MouseDownListener, MouseMoveListener, MouseUpListener, PreDrawListener, PostDrawListener >
virtual ~MultiListener ()=default
 
virtual void connect (Viewer *viewer, int group=0, boost::signals2::connect_position pos=boost::signals2::connect_position::at_back)
 
virtual void disconnect ()
 

Detailed Description

Visual widget to modify transform present in scene (ancillary), subscribes to viewer events


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