Preset Class Reference

Representation of a preset physics profile. More...

#include <gazebo/physics/PresetManager.hh>

Public Member Functions

 Preset ()
 Constructor. More...
 
 Preset (const std::string &_name)
 Constructor. More...
 
 ~Preset ()
 Destructor. More...
 
bool GetParam (const std::string &_key, boost::any &_value) const
 Get a profile parameter. More...
 
bool HasParam (const std::string &_key) const
 Check if profile parameter is set. More...
 
std::string Name () const
 Get the profile name. More...
 
sdf::ElementPtr SDF () const
 Get this preset profile's SDF. More...
 
bool SDF (const sdf::ElementPtr _sdfElement)
 Set this preset profile's SDF. More...
 
bool SetAllParamsFromSDF (const sdf::ElementPtr _elem)
 Set all parameters of this preset based on the key/value pairs in the given SDF element. More...
 
bool SetAllPhysicsParameters (PhysicsEnginePtr _physicsEngine) const
 Set all parameters of this preset in the physics engine. More...
 
bool SetParam (const std::string &_key, const boost::any &_value)
 Set a profile parameter. More...
 

Detailed Description

Representation of a preset physics profile.

Constructor & Destructor Documentation

§ Preset() [1/2]

Preset ( )

Constructor.

§ Preset() [2/2]

Preset ( const std::string &  _name)

Constructor.

Parameters
[in]_nameThe name of the preset profile.

§ ~Preset()

~Preset ( )

Destructor.

Member Function Documentation

§ GetParam()

bool GetParam ( const std::string &  _key,
boost::any &  _value 
) const

Get a profile parameter.

Parameters
[in]_keyThe key of the parameter to retrieve.
[out]_valueThe parameter value at the input key.
Returns
True if the parameter exists in the map, false otherwise.

§ HasParam()

bool HasParam ( const std::string &  _key) const

Check if profile parameter is set.

Parameters
[in]_keyThe profile key to check.
Returns
True if the profile has parameter _key, false otherwise

§ Name()

std::string Name ( ) const

Get the profile name.

Returns
The name of the preset profile.

§ SDF() [1/2]

sdf::ElementPtr SDF ( ) const

Get this preset profile's SDF.

Returns
An SDF element pointer representing a <physics> element

§ SDF() [2/2]

bool SDF ( const sdf::ElementPtr  _sdfElement)

Set this preset profile's SDF.

Parameters
[in]_sdfElementPointer to an SDF physics element.
Returns
True if setting the profile SDF was successful.

§ SetAllParamsFromSDF()

bool SetAllParamsFromSDF ( const sdf::ElementPtr  _elem)

Set all parameters of this preset based on the key/value pairs in the given SDF element.

Parameters
[in]_elemThe physics SDF element from which to read values.
Returns
True if setting all parameters was successful.

§ SetAllPhysicsParameters()

bool SetAllPhysicsParameters ( PhysicsEnginePtr  _physicsEngine) const

Set all parameters of this preset in the physics engine.

Parameters
[in]_physicsEngineThe physics engine in which to affect the change.
Returns
True if setting all parameters was successful.

§ SetParam()

bool SetParam ( const std::string &  _key,
const boost::any &  _value 
)

Set a profile parameter.

Parameters
[in]_keyThe key of the parameter to change.
[in]_valueThe new value of the parameter.

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