CollisionConfig Class Reference

A tab for configuring collision properties of a link. More...

#include <CollisionConfig.hh>

Inherits QWidget.

Public Slots

void RestoreOriginalData ()
 Restore the widget's data to how it was when first opened. More...
 

Signals

void Applied ()
 Qt signal emitted to indicate that changes should be applied. More...
 
void CollisionAdded (const std::string &_name, const std::string &_collisionShape)
 Qt signal emitted when a collision is added. More...
 
void CollisionChanged (const std::string &_name, const std::string &_type)
 Signal to indicate a collision change. More...
 
void CollisionRemoved (const std::string &_name)
 Qt signal emitted when a collision is removed. More...
 
void ShowCollision (const bool _show, const std::string &_name)
 Qt signal emitted requesting to show/hide a collision. More...
 

Public Member Functions

 CollisionConfig ()
 Constructor. More...
 
 ~CollisionConfig ()
 Destructor. More...
 
void AddCollision (const std::string &_name, const msgs::Collision *_collisionMsg=NULL)
 Add a collision widget to the tab. More...
 
const std::map< int, CollisionConfigData * > & ConfigData () const
 Get collision config data. More...
 
void Geometry (const std::string &_name, ignition::math::Vector3d &_size, std::string &_uri) const
 Get the geometry data of a collision. More...
 
unsigned int GetCollisionCount () const
 Get the number of collisions. More...
 
msgs::Collision * GetData (const std::string &_name) const
 Get the msg containing all collision data. More...
 
void Init ()
 Initialize widget. More...
 
void Reset ()
 Reset the collision tab. More...
 
void SetGeometry (const std::string &_name, const ignition::math::Vector3d &_size, const std::string &_uri="")
 Set the geometry data of a collision. More...
 
void SetShowCollision (const bool _show, const std::string &_name)
 Set the state of a show collision button. More...
 
void UpdateCollision (const std::string &_name, ConstCollisionPtr _collisionMsg)
 Update a collision widget from a collision msg. More...
 

Detailed Description

A tab for configuring collision properties of a link.

Constructor & Destructor Documentation

◆ CollisionConfig()

Constructor.

◆ ~CollisionConfig()

Destructor.

Member Function Documentation

◆ AddCollision()

void AddCollision ( const std::string &  _name,
const msgs::Collision *  _collisionMsg = NULL 
)

Add a collision widget to the tab.

Parameters
[in]_nameName of collision added.
[in]_collisionMsgMsg containing information of the collision to be added.

◆ Applied

void Applied ( )
signal

Qt signal emitted to indicate that changes should be applied.

◆ CollisionAdded

void CollisionAdded ( const std::string &  _name,
const std::string &  _collisionShape 
)
signal

Qt signal emitted when a collision is added.

Parameters
[in]_nameName of collision added.
[in]_collisionShapeCollision shape, either "box", "sphere" or "cylinder".

◆ CollisionChanged

void CollisionChanged ( const std::string &  _name,
const std::string &  _type 
)
signal

Signal to indicate a collision change.

Parameters
[in]_nameName of collision changed.
[in]_typeType of change.

◆ CollisionRemoved

void CollisionRemoved ( const std::string &  _name)
signal

Qt signal emitted when a collision is removed.

Parameters
[in]_nameName of collision removed.

◆ ConfigData()

const std::map<int, CollisionConfigData *>& ConfigData ( ) const

Get collision config data.

Returns
Config data for the collisions.

◆ Geometry()

void Geometry ( const std::string &  _name,
ignition::math::Vector3d &  _size,
std::string &  _uri 
) const

Get the geometry data of a collision.

Parameters
[in]_nameName of collision.
[in]_sizeSize of the geometry.
[in]_uriURI of the geometry.

◆ GetCollisionCount()

unsigned int GetCollisionCount ( ) const

Get the number of collisions.

Returns
Number of collisions.

◆ GetData()

msgs::Collision* GetData ( const std::string &  _name) const

Get the msg containing all collision data.

Parameters
[in]_nameName of collision.
Returns
Collision msg.

◆ Init()

void Init ( )

Initialize widget.

◆ Reset()

void Reset ( )

Reset the collision tab.

◆ RestoreOriginalData

void RestoreOriginalData ( )
slot

Restore the widget's data to how it was when first opened.

◆ SetGeometry()

void SetGeometry ( const std::string &  _name,
const ignition::math::Vector3d &  _size,
const std::string &  _uri = "" 
)

Set the geometry data of a collision.

Parameters
[in]_nameName of collision.
[in]_sizeSize to set the geometry to.
[in]_uriURI of the geometry.

◆ SetShowCollision()

void SetShowCollision ( const bool  _show,
const std::string &  _name 
)

Set the state of a show collision button.

Parameters
[in]_showIf true, button is checked.
[in]_nameName of collision.

◆ ShowCollision

void ShowCollision ( const bool  _show,
const std::string &  _name 
)
signal

Qt signal emitted requesting to show/hide a collision.

Parameters
[in]_showTrue to show, false to hide.
[in]_nameName of collision removed.

◆ UpdateCollision()

void UpdateCollision ( const std::string &  _name,
ConstCollisionPtr  _collisionMsg 
)

Update a collision widget from a collision msg.

Parameters
[in]_nameName of collision to be updated.
[in]_collisionMsgMsg used to update the collision widget values.

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