LinkData Class Reference

Helper class to store link data. More...

#include <ModelData.hh>

Inherits QObject.

Public Member Functions

 LinkData ()
 Constructor. More...
 
 ~LinkData ()
 Destructor. More...
 
void AddCollision (rendering::VisualPtr _collisionVis, const msgs::Collision *_msg=NULL)
 Add a collision to the link. More...
 
void AddVisual (rendering::VisualPtr _visual)
 Add a visual to the link. More...
 
LinkDataClone (const std::string &_newName)
 Clone the link data. More...
 
double ComputeVolume () const
 Computes the volume of the link. More...
 
rendering::VisualPtr LinkVisual () const
 Get the visual for the link. More...
 
void Load (sdf::ElementPtr _sdf)
 Load the link with data from SDF. More...
 
std::string Name () const
 Get the name of the link. More...
 
ignition::math::Pose3d Pose () const
 Get the pose of the link. More...
 
ignition::math::Vector3d Scale () const
 Get the scale of the link. More...
 
void SetLinkVisual (const rendering::VisualPtr _visual)
 Set the visual for the link. More...
 
void SetName (const std::string &_name)
 Set the name of the link. More...
 
void SetPose (const ignition::math::Pose3d &_pose3d)
 Set the pose of the link. More...
 
void SetScale (const ignition::math::Vector3d &_scale)
 Set the scale of the link. More...
 
void UpdateConfig ()
 Update the inspector widget if necessary. More...
 

Static Public Member Functions

static ignition::math::Vector3d ComputeMomentOfInertia (const msgs::Collision &_collision, const double _mass)
 Computes mass moment of inertia for a link. More...
 
static double ComputeVolume (const msgs::Collision &_collision)
 Computes the volume of a link. More...
 

Public Attributes

std::map< rendering::VisualPtr,
msgs::Collision > 
collisions
 Collisions of the link. More...
 
std::vector< msgs::Collision * > collisionUpdateMsgs
 Msgs for updating collision visuals. More...
 
LinkInspectorinspector
 Inspector for configuring link properties. More...
 
sdf::ElementPtr linkSDF
 SDF representing the link data. More...
 
rendering::VisualPtr linkVisual
 Visual representing this link. More...
 
bool nested
 Flag set to true if this is a link of a nested model. More...
 
ignition::math::Vector3d scale
 Scale of link. More...
 
std::map< rendering::VisualPtr,
msgs::Visual > 
visuals
 Visuals of the link. More...
 
std::vector< msgs::Visual * > visualUpdateMsgs
 Msgs for updating visuals. More...
 

Detailed Description

Helper class to store link data.

Constructor & Destructor Documentation

LinkData ( )

Constructor.

~LinkData ( )

Destructor.

Member Function Documentation

void AddCollision ( rendering::VisualPtr  _collisionVis,
const msgs::Collision *  _msg = NULL 
)

Add a collision to the link.

Parameters
[in]_collisionVisVisual representing the collision.
[in]_msgOptional message containing collision params.
void AddVisual ( rendering::VisualPtr  _visual)

Add a visual to the link.

Parameters
[in]_visualVisual to be added.
LinkData* Clone ( const std::string &  _newName)

Clone the link data.

Parameters
[in]_newNameName to give to the cloned link.
Returns
A clone of this link data.
static ignition::math::Vector3d ComputeMomentOfInertia ( const msgs::Collision &  _collision,
const double  _mass 
)
static

Computes mass moment of inertia for a link.

Parameters
[in]_collisionA collision message.
[in]_massThe mass of the link.
Returns
Vector of principal moments of inertia.
static double ComputeVolume ( const msgs::Collision &  _collision)
static

Computes the volume of a link.

Parameters
[in]_collisionA collision message.
Returns
The computed volume.
double ComputeVolume ( ) const

Computes the volume of the link.

Returns
The volume.
rendering::VisualPtr LinkVisual ( ) const

Get the visual for the link.

Returns
Visual for the link.
void Load ( sdf::ElementPtr  _sdf)

Load the link with data from SDF.

Parameters
[in]_sdfLink SDF element.
std::string Name ( ) const

Get the name of the link.

Returns
Name of link.
ignition::math::Pose3d Pose ( ) const

Get the pose of the link.

Returns
Pose of link.
ignition::math::Vector3d Scale ( ) const

Get the scale of the link.

Returns
Scale of link.
void SetLinkVisual ( const rendering::VisualPtr  _visual)

Set the visual for the link.

Parameters
[in]_visualVisual for the link.
void SetName ( const std::string &  _name)

Set the name of the link.

Parameters
[in]_nameName of link.
void SetPose ( const ignition::math::Pose3d &  _pose3d)

Set the pose of the link.

Parameters
[in]_posePose of link.
void SetScale ( const ignition::math::Vector3d &  _scale)

Set the scale of the link.

Parameters
[in]_scaleScale of link.
void UpdateConfig ( )

Update the inspector widget if necessary.

Member Data Documentation

std::map<rendering::VisualPtr, msgs::Collision> collisions

Collisions of the link.

std::vector<msgs::Collision *> collisionUpdateMsgs

Msgs for updating collision visuals.

LinkInspector* inspector

Inspector for configuring link properties.

sdf::ElementPtr linkSDF

SDF representing the link data.

Visual representing this link.

bool nested

Flag set to true if this is a link of a nested model.

ignition::math::Vector3d scale

Scale of link.

std::map<rendering::VisualPtr, msgs::Visual> visuals

Visuals of the link.

std::vector<msgs::Visual *> visualUpdateMsgs

Msgs for updating visuals.


The documentation for this class was generated from the following file: