LinkData Class Reference

Helper class to store link data. More...

#include <ModelData.hh>

Inherits QObject.

Public Slots

void ShowCollisions (const bool _show)
 Show or hide collision visuals. More...
 
void ShowLinkFrame (const bool _show)
 Show or hide link frame visuals. More...
 
void ShowVisuals (const bool _show)
 Show or hide visual visuals. More...
 

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...
 
std::string GetName () const
 Get the name of the link. More...
 
rendering::VisualPtr LinkVisual () const
 Get the link visual. More...
 
void Load (sdf::ElementPtr _sdf)
 Load the link with data from SDF. 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 (rendering::VisualPtr _linkVisual)
 Set the link visual. 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...
 

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...
 
std::map< rendering::VisualPtr, msgs::Collision > deletedCollisions
 Deleted collisions of the link. More...
 
std::map< rendering::VisualPtr, msgs::Visual > deletedVisuals
 Deleted visuals of the link. More...
 
LinkInspectorinspector
 Inspector for configuring link properties. More...
 
rendering::LinkFrameVisualPtr linkFrameVis
 Link frame visual. More...
 
sdf::ElementPtr linkSDF
 SDF representing the link data. 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...
 
bool showCollisions = true
 True if all collisions are currently visible, false otherwise. More...
 
bool showLinkFrame = true
 True if all link frames are currently visible, false otherwise. More...
 
bool showVisuals = true
 True if all visuals are currently visible, false otherwise. 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()

LinkData ( )

Constructor.

◆ ~LinkData()

~LinkData ( )

Destructor.

Member Function Documentation

◆ AddCollision()

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.

◆ AddVisual()

void AddVisual ( rendering::VisualPtr  _visual)

Add a visual to the link.

Parameters
[in]_visualVisual to be added.

◆ Clone()

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.

◆ GetName()

std::string GetName ( ) const

Get the name of the link.

Returns
Name of link.

◆ LinkVisual()

rendering::VisualPtr LinkVisual ( ) const

Get the link visual.

Returns
Link visual pointer.

◆ Load()

void Load ( sdf::ElementPtr  _sdf)

Load the link with data from SDF.

Parameters
[in]_sdfLink SDF element.

◆ Pose()

ignition::math::Pose3d Pose ( ) const

Get the pose of the link.

Returns
Pose of link.

◆ Scale()

ignition::math::Vector3d Scale ( ) const

Get the scale of the link.

Returns
Scale of link.

◆ SetLinkVisual()

void SetLinkVisual ( rendering::VisualPtr  _linkVisual)

Set the link visual.

Parameters
[in]Linkvisual pointer.

◆ SetName()

void SetName ( const std::string &  _name)

Set the name of the link.

Parameters
[in]_nameName of link.

◆ SetPose()

void SetPose ( const ignition::math::Pose3d &  _pose3d)

Set the pose of the link.

Parameters
[in]_posePose of link.

◆ SetScale()

void SetScale ( const ignition::math::Vector3d &  _scale)

Set the scale of the link.

Parameters
[in]_scaleScale of link.

◆ ShowCollisions

void ShowCollisions ( const bool  _show)
slot

Show or hide collision visuals.

Parameters
[in]_showTrue to show, false to hide.

◆ ShowLinkFrame

void ShowLinkFrame ( const bool  _show)
slot

Show or hide link frame visuals.

Parameters
[in]_showTrue to show, false to hide.

◆ ShowVisuals

void ShowVisuals ( const bool  _show)
slot

Show or hide visual visuals.

Parameters
[in]_showTrue to show, false to hide.

◆ UpdateConfig()

void UpdateConfig ( )

Update the inspector widget if necessary.

Member Data Documentation

◆ collisions

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

Collisions of the link.

◆ collisionUpdateMsgs

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

Msgs for updating collision visuals.

◆ deletedCollisions

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

Deleted collisions of the link.

◆ deletedVisuals

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

Deleted visuals of the link.

◆ inspector

LinkInspector* inspector

Inspector for configuring link properties.

◆ linkFrameVis

Link frame visual.

◆ linkSDF

sdf::ElementPtr linkSDF

SDF representing the link data.

◆ nested

bool nested

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

◆ scale

ignition::math::Vector3d scale

Scale of link.

◆ showCollisions

bool showCollisions = true

True if all collisions are currently visible, false otherwise.

◆ showLinkFrame

bool showLinkFrame = true

True if all link frames are currently visible, false otherwise.

◆ showVisuals

bool showVisuals = true

True if all visuals are currently visible, false otherwise.

◆ visuals

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

Visuals of the link.

◆ visualUpdateMsgs

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

Msgs for updating visuals.


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