17 #ifndef _MODEL_DATA_HH_
18 #define _MODEL_DATA_HH_
29 class recursive_mutex;
34 class recursive_mutex;
68 public: std::string
GetName()
const;
72 public:
void SetName(
const std::string &_name);
84 public:
void Load(sdf::ElementPtr _sdf);
111 private:
void Update();
115 private:
bool Apply();
119 private slots:
void OnAccept();
123 private slots:
void OnApply();
127 private slots:
void OnAddVisual(
const std::string &_name);
131 private slots:
void OnAddCollision(
const std::string &_name);
135 private slots:
void OnRemoveVisual(
const std::string &_name);
139 private slots:
void OnRemoveCollision(
const std::string &_name);
142 private: std::vector<event::ConnectionPtr> connections;
145 private: boost::recursive_mutex *updateMutex;
157 public: std::map<rendering::VisualPtr, msgs::Visual>
visuals;
166 public: std::map<rendering::VisualPtr, msgs::Collision>
collisions;
Definition: LinkInspector.hh:33
std::map< rendering::VisualPtr, msgs::Collision > collisions
Collisions of the link.
Definition: ModelData.hh:166
std::vector< msgs::Visual * > visualUpdateMsgs
Msgs for updating visuals.
Definition: ModelData.hh:160
void UpdateConfig()
Update the inspector widget if necessary.
math::Pose GetPose() const
Get the pose of the link.
Encapsulates a position and rotation in three space.
Definition: Pose.hh:37
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
rendering::VisualPtr linkVisual
Visual representing this link.
Definition: ModelData.hh:154
sdf::ElementPtr linkSDF
SDF representing the link data.
Definition: ModelData.hh:148
static double GetEditTransparency()
Get the default transparency setting for entities in model editor.
Definition: ModelData.hh:43
LinkInspector * inspector
Inspector for configuring link properties.
Definition: ModelData.hh:169
void AddVisual(rendering::VisualPtr _visual)
Add a visual to the link.
void Load(sdf::ElementPtr _sdf)
Load the link with data from SDF.
std::map< rendering::VisualPtr, msgs::Visual > visuals
Visuals of the link.
Definition: ModelData.hh:157
static std::string GetTemplateSDFString()
Get a template SDF string of a simple model.
void SetName(const std::string &_name)
Set the name of the link.
void AddCollision(rendering::VisualPtr _collisionVis)
Add a collision to the link.
std::vector< msgs::Collision * > collisionUpdateMsgs
Msgs for updating collision visuals.
Definition: ModelData.hh:163
LinkData * Clone(const std::string &_newName)
Clone the link data.
math::Vector3 scale
Scale of link.
Definition: ModelData.hh:151
math::Vector3 GetScale() const
Get the scale of the link.
Helper class to store link data.
Definition: ModelData.hh:56
void SetScale(const math::Vector3 &_scale)
Set the scale of the link.
boost::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:107
void SetPose(const math::Pose &_pose)
Set the pose of the link.
std::string GetName() const
Get the name of the link.