17#ifndef GAZEBO_GUI_MODELSNAP_HH_
18#define GAZEBO_GUI_MODELSNAP_HH_
22#include <ignition/math/Quaternion.hh>
23#include <ignition/math/Triangle3.hh>
41 class ModelSnapPrivate;
74 const ignition::math::Triangle3d &_triangleSrc,
75 const ignition::math::Triangle3d &_triangleDest,
89 const ignition::math::Triangle3d &_triangleSrc,
90 const ignition::math::Triangle3d &_triangleDest,
91 const ignition::math::Pose3d &_poseSrc,
92 ignition::math::Vector3d &_trans,
93 ignition::math::Quaterniond &_rot);
112 private:
void Update();
119 private: std::unique_ptr<ModelSnapPrivate> dataPtr;
common
Definition FuelModelDatabase.hh:37
gui
Definition KeyEventHandler.hh:29
gazebo
Definition ModelSnap.hh:30
gui
Definition ModelSnap.hh:30
Singleton template class.
Definition SingletonT.hh:34
Generic description of a mouse event.
Definition MouseEvent.hh:36
A gui tool for snapping one model to another.
Definition ModelSnap.hh:46
void Fini()
Clean up the model snap tool.
void OnMousePressEvent(const common::MouseEvent &_event)
Process an object translate mouse press event.
void Init()
Initialize 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 ...
void Reset()
Reset the model snapping tool.
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 ...
void Clear()
Clear the model snapping tool.
void OnMouseMoveEvent(const common::MouseEvent &_event)
Process an object translate mouse move event.
void OnMouseReleaseEvent(const common::MouseEvent &_event)
Process an object translate mouse release event.
#define GZ_SINGLETON_DECLARE(visibility, n1, n2, singletonType)
Helper to declare typed SingletonT.
Definition SingletonT.hh:58
std::shared_ptr< Visual > VisualPtr
Definition RenderTypes.hh:114
Forward declarations for the common classes.
Definition Animation.hh:27