A gui tool for snapping one model to another. More...
#include <gui/Gui.hh>
Public Member Functions | |
void | GetSnapTransform (const std::vector< math::Vector3 > &_triangleSrc, const std::vector< math::Vector3 > &_triangleDest, const math::Pose &_poseSrc, math::Vector3 &_trans, math::Quaternion &_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. More... | |
void | Init () |
Initialize the model snapping tool. More... | |
void | OnMouseMoveEvent (const common::MouseEvent &_event) |
Process an object translate mouse move event. More... | |
void | OnMousePressEvent (const common::MouseEvent &_event) |
Process an object translate mouse press event. More... | |
void | OnMouseReleaseEvent (const common::MouseEvent &_event) |
Process an object translate mouse release event. More... | |
void | Reset () |
Reset the model snapping tool. More... | |
void | Snap (const std::vector< math::Vector3 > &_triangleSrc, const std::vector< math::Vector3 > &_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. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from SingletonT< ModelSnap > | |
static ModelSnap * | Instance () |
Get an instance of the singleton. More... | |
Protected Member Functions inherited from SingletonT< ModelSnap > | |
SingletonT () | |
Constructor. More... | |
virtual | ~SingletonT () |
Destructor. More... | |
A gui tool for snapping one model to another.
Private data for the ModelSnap class.
void gazebo::gui::ModelSnap::GetSnapTransform | ( | const std::vector< math::Vector3 > & | _triangleSrc, |
const std::vector< math::Vector3 > & | _triangleDest, | ||
const math::Pose & | _poseSrc, | ||
math::Vector3 & | _trans, | ||
math::Quaternion & | _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.
[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. |
void gazebo::gui::ModelSnap::Init | ( | ) |
Initialize the model snapping tool.
void gazebo::gui::ModelSnap::OnMouseMoveEvent | ( | const common::MouseEvent & | _event | ) |
Process an object translate mouse move event.
[in] | _event | Mouse event. |
void gazebo::gui::ModelSnap::OnMousePressEvent | ( | const common::MouseEvent & | _event | ) |
Process an object translate mouse press event.
[in] | _event | Mouse event. |
void gazebo::gui::ModelSnap::OnMouseReleaseEvent | ( | const common::MouseEvent & | _event | ) |
Process an object translate mouse release event.
[in] | _event | Mouse event. |
void gazebo::gui::ModelSnap::Reset | ( | ) |
Reset the model snapping tool.
void gazebo::gui::ModelSnap::Snap | ( | const std::vector< math::Vector3 > & | _triangleSrc, |
const std::vector< math::Vector3 > & | _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.
[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. |