![]() |
ImFusion SDK 4.3
|
#include <ImFusion/GUI/MeshManipulator.h>
Mesh manipulator with 3d controls. More...
Inheritance diagram for MeshManipulator:Mesh manipulator with 3d controls.
The MeshManipulator can modify the translation, rotation and scaling of a mesh. For each transformation mode it offers controls that are displayed around the mesh center.
For proper use the MeshManipulator object must be wrapped inside an InteractiveObject before being added to the corresponding view, e.g.
The manipulator must be removed again before deleting!
Public Types | |
| enum | Mode { None = 0 , Translation = 1 , Rotation = 2 , Scaling = 3 } |
| enum | Interaction { InteractionNone , InteractionTranslationX , InteractionTranslationY , InteractionTranslationZ , InteractionRotationX , InteractionRotationY , InteractionRotationZ , InteractionScaleX , InteractionScaleY , InteractionScaleZ , InteractionScaleAll } |
Public Types inherited from GlObject | |
| enum | RenderingOrderGroup { RenderingGroupRest , RenderingGroupMesh , RenderingGroupManipulator } |
| Enumeration to determine rendering order of GlObjects in GlSliceView and GlVolumeView. More... | |
Public Member Functions | |
| MeshManipulator (Gl3DObject &mesh) | |
| Creates a MeshManipulator object that will manipulate the matrix of the given mesh. | |
| bool | sceneEvent (QEvent *event, const GlView &view) override |
| void | draw (const GlView &view) override |
| Draw the object in 3D space. | |
| Geometry::AlignedBox | bounds () const override |
| Get the axis-aligned bounding box of this GlObject in world space. | |
| void | setMode (Mode m) |
| Sets the current mode. | |
| Mode | mode () const |
| void | setVisible (bool visible) override |
| Set object visibility. | |
| const mat4 & | transformation () const |
| Returns current transformation of the mesh. | |
| void | setTransformation (const mat4 &m) |
| Set transformation. | |
| std::string | typeName () const override |
| Return unique identifier for this object class used for serialization. | |
| void | setUseMeshCoordinates (bool v) |
| bool | useMeshCoordinates () const |
| void | resetMesh () |
| Sets the Gl matrix of the mesh to identity, removing all previous transformations. | |
| Interaction | currentInteraction () const |
Public Member Functions inherited from Manipulator | |
| void | addListener (ManipulatorListener *listener) |
| void | removeListener (const ManipulatorListener *listener) |
| virtual bool | requiresFocus () |
| Derived classes that need priority scene events can override this. | |
| virtual void | openContextMenu (QPoint pos, QPoint globalPos, Qt::KeyboardModifiers modifiers) |
| GUI::EventResult | handleInputEvent (const GUI::InputEvent &event, const GUI::View &view) override |
| This function is called by sources of input events in order to dispatch them to the handlers. | |
Public Member Functions inherited from GlObject | |
| virtual Geometry::AlignedBox | boundsSpherical () const |
| Get the spherical bounds of this GlObject in world space. | |
| virtual void | setMatrix (const mat4 &m) |
| Set the modelview matrix of this object. | |
| virtual const mat4 & | matrix () const |
| Return the modelview matrix. | |
| virtual bool | visible () const |
| Return object visibility. | |
| virtual void | setAlwaysVisible (bool alwaysVisible) |
| Set if object is always visible. | |
| virtual bool | alwaysVisible () const |
| Return if object is always visible. | |
| RenderingOrderGroup | renderingOrder () const |
| Return current rendering order value for this GlObject. | |
| void | setRenderingOrder (RenderingOrderGroup group) |
| Set rendering order value for this GlObject. | |
| void | setDraw3DIn2DView (bool draw3DIn2DView) |
| void | configure (const Properties *p) override |
| Configure this object instance by de-serializing the given Properties. | |
| void | configuration (Properties *p) const override |
| Serialize the current object configuration into the given Properties object. | |
Public Member Functions inherited from Configurable | |
| virtual void | configureDefaults () |
| Retrieve the properties of this object, replaces values with their defaults and sets it again. | |
| void | registerParameter (ParameterBase *param) |
| Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration(). | |
| void | unregisterParameter (const ParameterBase *param) |
| Remove the given Parameter or SubProperty from the list of registered parameters. | |
| Configurable (const Configurable &rhs) | |
| Configurable (Configurable &&rhs) noexcept | |
| Configurable & | operator= (const Configurable &) |
| Configurable & | operator= (Configurable &&) noexcept |
Additional Inherited Members | |
Public Attributes inherited from Configurable | |
| Signal | signalParametersChanged |
Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
Protected Member Functions inherited from Manipulator | |
| void | notifyListeners (void *eventData) |
Protected Attributes inherited from GlObject | |
| mat4 | m_matrix = mat4::Identity() |
| Modelview transformation matrix of this object. | |
| bool | m_visible = true |
| Object visibility. | |
| bool | m_alwaysVisible = false |
| Object always visible. | |
| bool | m_draw3DIn2DView |
| Draw 3D objects in 2D views. This is to render 3D objects in projective 2D views. Property is not serialized. | |
| RenderingOrderGroup | m_renderingOrder = RenderingGroupRest |
Protected Attributes inherited from Configurable | |
| std::vector< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
|
overridevirtual |
Implements Manipulator.
|
overridevirtual |
|
inline |
Sets the current mode.
Use None to disable interaction
|
overridevirtual |
Set object visibility.
Reimplemented from GlObject.
|
inlineoverridevirtual |
Return unique identifier for this object class used for serialization.
Implements GlObject.