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

Basic implementation of ITransformControls. More...

#include <MRObjectTransformWidget.h>

+ Inheritance diagram for MR::TransformControls:

Classes

struct  VisualParams
 

Public Member Functions

MRVIEWER_API void setVisualParams (const VisualParams &params)
 
const VisualParamsgetVisualParams () const
 
virtual MRVIEWER_API ~TransformControls ()
 
virtual MRVIEWER_API void init (std::shared_ptr< Object > parent) override
 Called once on widget created to init internal objects.
 
virtual MRVIEWER_API void update () override
 
virtual float getRadius () const override
 should return current radius of the widget
 
MRVIEWER_API void setRadius (float radius)
 
float getWidth () const
 
MRVIEWER_API void setWidth (float width)
 set width for this widget
 
MRVIEWER_API void setSizeType (VisualParams::SizeType type)
 sets the type of widget size units ( recalculates the current values into new units of measurement )
 
virtual MRVIEWER_API void updateSizeInPixel () override
 calculates and sets the matrix to set the size in pixels
 
virtual MRVIEWER_API void updateTranslation (Axis ax, const Vector3f &startMove, const Vector3f &endMove, ViewportId vpId) override
 One have to implement these functions to have visualization of translation and rotation.
 
virtual MRVIEWER_API void updateRotation (Axis ax, const AffineXf3f &xf, float startAngle, float endAngle, ViewportId vpId) override
 xf - widget current xf
 
- Public Member Functions inherited from MR::ITransformControls
virtual ~ITransformControls ()=default
 
const Vector3f & getCenter () const
 get center of the widget in local space
 
MRVIEWER_API void setCenter (const Vector3f &center)
 
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.
 
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.
 

Static Public Member Functions

static MRVIEWER_API TransformModesValidator ThresholdDotValidator (float thresholdDot)
 returns TransformModesValidator by threshold dot value (this value is duty for hiding widget controls that have small projection on screen)
 

Additional Inherited Members

Detailed Description

Basic implementation of ITransformControls.


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