Basic implementation of ITransformControls. More...
#include <MRViewer/MRObjectTransformWidget.h>
Classes | |
| struct | VisualParams |
Public Member Functions | |
| void | setVisualParams (const VisualParams ¶ms) |
| const VisualParams & | getVisualParams () const |
| virtual | ~TransformControls () |
| virtual void | init (std::shared_ptr< Object > parent) override |
| Called once on widget created to init internal objects. | |
| virtual void | update () override |
| virtual float | getRadius () const override |
| should return current radius of the widget | |
| void | setRadius (float radius) |
| float | getWidth () const |
| void | setWidth (float width) |
| set width for this widget | |
| void | setSizeType (VisualParams::SizeType type) |
| sets the type of widget size units ( recalculates the current values into new units of measurement ) | |
| virtual void | updateSizeInPixel () override |
| calculates and sets the matrix to set the size in pixels | |
| virtual 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 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 | |
| void | setCenter (const Vector3f ¢er) |
| 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. | |
| 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 TransformModesValidator | ThresholdDotValidator (float thresholdDot) |
| returns TransformModesValidator by threshold dot value (this value is duty for hiding widget controls that have small projection on screen) | |
Basic implementation of ITransformControls.