MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::ITransformControls Class Referenceabstract

Interface class for ObjectTransformWidget custom visualization. More...

#include <MRObjectTransformWidget.h>

+ Inheritance diagram for MR::ITransformControls:

Classes

class  ChangeCenterAction
 build-in history action class for change center More...
 

Public Member Functions

virtual ~ITransformControls ()=default
 
const Vector3f & getCenter () const
 get center of the widget in local space
 
MRVIEWER_API void setCenter (const Vector3f &center)
 
virtual float getRadius () const
 should return current radius of the widget
 
virtual void updateSizeInPixel ()
 should calculates and sets the matrix to set the size in pixels
 
void setTransformModesValidator (TransformModesValidator validator)
 
void setPickThrough (bool on)
 Enables or disables pick through mode, in this mode controls will be picked even if they are occluded by other objects.
 
bool getPickThrough () const
 
ControlBit getHoveredControl () const
 Returns currently hovered control.
 
virtual void init (std::shared_ptr< Object > parent)=0
 Called once on widget created to init internal objects.
 
virtual void update ()=0
 
void hover ()
 Called for hover checks.
 
void stopModify ()
 This is called to stop drawing active visualization when modification is stopped.
 
MRVIEWER_API void updateVisualTransformMode (ControlBit showMask, ViewportMask viewportMask, const AffineXf3f &xf)
 Called each frame for each viewport to update available transformation modes.
 
virtual void updateTranslation (Axis ax, const Vector3f &startMove, const Vector3f &endMove, ViewportId vpId)=0
 One have to implement these functions to have visualization of translation and rotation.
 
virtual void updateRotation (Axis ax, const AffineXf3f &xf, float startAngle, float endAngle, ViewportId vpId)=0
 xf - widget current xf
 

Protected Member Functions

virtual ControlBit hover_ (bool pickThrough)=0
 
virtual void stopModify_ ()=0
 
virtual void updateVisualTransformMode_ (ControlBit showMask, ViewportMask viewportMask)=0
 

Detailed Description

Interface class for ObjectTransformWidget custom visualization.


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