A gui tool for snapping one model to another.
More...
#include <gui/Gui.hh>
Inherits SingletonT< ModelSnap >.
|
void | Clear () |
| Clear the model snapping tool.
|
|
void | Fini () |
| Clean up the model snap tool.
|
|
void | Init () |
| Initialize the model snapping tool.
|
|
void | OnMouseMoveEvent (const common::MouseEvent &_event) |
| Process an object translate mouse move event.
|
|
void | OnMousePressEvent (const common::MouseEvent &_event) |
| Process an object translate mouse press event.
|
|
void | OnMouseReleaseEvent (const common::MouseEvent &_event) |
| Process an object translate mouse release event.
|
|
void | Reset () |
| Reset the model snapping tool.
|
|
void | Snap (const ignition::math::Triangle3d &_triangleSrc, const ignition::math::Triangle3d &_triangleDest, rendering::VisualPtr _visualSrc) |
| Calculate the translation and rotation needed to snap the centroid of a mesh triangle of a visual to another, taking into account any pose offsets.
|
|
|
static ModelSnap * | Instance () |
| Get an instance of the singleton.
|
|
static void | SnapTransform (const ignition::math::Triangle3d &_triangleSrc, const ignition::math::Triangle3d &_triangleDest, const ignition::math::Pose3d &_poseSrc, ignition::math::Vector3d &_trans, ignition::math::Quaterniond &_rot) |
| Calculate the translation and rotation needed to snap the centroid of a mesh triangle of a visual to another, taking into account any pose offsets.
|
|
A gui tool for snapping one model to another.
◆ Clear()
Clear the model snapping tool.
This explicity cleans up the internal state of the singleton and prepares it for exit.
◆ Fini()
Clean up the model snap tool.
◆ Init()
Initialize the model snapping tool.
◆ Instance()
Get an instance of the singleton.
◆ OnMouseMoveEvent()
Process an object translate mouse move event.
- Parameters
-
◆ OnMousePressEvent()
Process an object translate mouse press event.
- Parameters
-
◆ OnMouseReleaseEvent()
Process an object translate mouse release event.
- Parameters
-
◆ Reset()
Reset the model snapping tool.
◆ Snap()
void Snap |
( |
const ignition::math::Triangle3d & | _triangleSrc, |
|
|
const ignition::math::Triangle3d & | _triangleDest, |
|
|
rendering::VisualPtr | _visualSrc ) |
Calculate the translation and rotation needed to snap the centroid of a mesh triangle of a visual to another, taking into account any pose offsets.
- Parameters
-
[in] | _triangleSrc | vertices of target triangle being snapped to. |
[in] | _triangleDest | vertices of the other triangle that will be moved. |
[in] | _visualSrc | Visual being moved by the snap action. |
◆ SnapTransform()
static void SnapTransform |
( |
const ignition::math::Triangle3d & | _triangleSrc, |
|
|
const ignition::math::Triangle3d & | _triangleDest, |
|
|
const ignition::math::Pose3d & | _poseSrc, |
|
|
ignition::math::Vector3d & | _trans, |
|
|
ignition::math::Quaterniond & | _rot ) |
|
static |
Calculate the translation and rotation needed to snap the centroid of a mesh triangle of a visual to another, taking into account any pose offsets.
- Parameters
-
[in] | _triangleSrc | vertices of target triangle being snapped to. |
[in] | _triangleDest | vertices of the other triangle that will be moved. |
[in] | _poseSrc | Pose offset of triangleB relative to its model visual. |
[out] | _trans | Translation output. |
[out] | _rotation | Rotation output. |
The documentation for this class was generated from the following file: