Gazebo Physics

API Reference

5.3.2
Gravity::World< PolicyT, FeaturesT > Class Template Reference

The World API for getting and setting the gravity vector. More...

#include <World.hh>

Public Types

using LinearVectorType = typename FromPolicy< PolicyT >::template Use< LinearVector >
 
using RelativeForceType = typename FromPolicy< PolicyT >::template Use< RelativeForce >
 
- Public Types inherited from Entity< PolicyT, FeaturesT >
using Features = FeaturesT
 
using Pimpl = typename detail::DeterminePlugin< Policy, Features >::type
 
using Policy = PolicyT
 

Public Member Functions

LinearVectorType GetGravity (const FrameID &_forceInCoordinatesOf=FrameID::World()) const
 Get the World gravity vector. Optionally, you may specify the frame whose coordinates are used to express the gravity vector. The World frame is used as a default if no frame is specified. More...
 
void SetGravity (const LinearVectorType &_gravity, const FrameID &_forceInCoordinatesOf=FrameID::World())
 Set the World gravity vector. Optionally, you may specify the frame whose coordinates are used to express the gravity vector. The World frame is used as a default if no frame is specified. More...
 
void SetGravity (const RelativeForceType &_gravity)
 Set the World gravity vector. More...
 
- Public Member Functions inherited from Feature::World< PolicyT, FeaturesT >
virtual ~World ()=default
 Virtual destructor. More...
 
- Public Member Functions inherited from Entity< PolicyT, FeaturesT >
virtual ~Entity ()=default
 Virtual destructor. More...
 
std::size_t EntityID () const
 Get the unique ID value of this Entity. More...
 
const std::shared_ptr< void > & EntityReference () const
 Get a reference-counting std::shared_ptr to the object inside the implementation that this object provides an abstraction for. More...
 
const Identity & FullIdentity () const
 Get the Identity object of this Entity. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Entity< PolicyT, FeaturesT >
 Entity (const std::shared_ptr< Pimpl > &_pimpl=nullptr, const Identity &_identity=Identity())
 Constructor for the Entity. More...
 
 Entity (std::shared_ptr< Pimpl > &&_pimpl, const Identity &_identity)
 Constructor that allows the pimpl to be moved instead of copied. More...
 
template<typename FeatureT >
FeatureT::template Implementation< PolicyT > * Interface ()
 Get a pointer to the implementation of FeatureT. More...
 
template<typename FeatureT >
const FeatureT::template Implementation< PolicyT > * Interface () const
 Same as Interface(), but const-qualified so that const entities can request const-qualified interfaces from the implementation. More...
 
- Protected Attributes inherited from Entity< PolicyT, FeaturesT >
Identity identity
 This field contains information to identify the entity. More...
 
std::shared_ptr< Pimplpimpl
 This is a pointer to the physics engine implementation, and it can be used by the object features to find the interfaces that they need in order to function. More...
 

Detailed Description

template<typename PolicyT, typename FeaturesT>
class ignition::physics::Gravity::World< PolicyT, FeaturesT >

The World API for getting and setting the gravity vector.

Member Typedef Documentation

◆ LinearVectorType

using LinearVectorType = typename FromPolicy<PolicyT>::template Use<LinearVector>

◆ RelativeForceType

using RelativeForceType = typename FromPolicy<PolicyT>::template Use<RelativeForce>

Member Function Documentation

◆ GetGravity()

LinearVectorType GetGravity ( const FrameID _forceInCoordinatesOf = FrameID::World< PolicyT, FeaturesT >()) const

Get the World gravity vector. Optionally, you may specify the frame whose coordinates are used to express the gravity vector. The World frame is used as a default if no frame is specified.

Parameters
[in]_inCoordinatesOfFrame whose coordinates are used to express _gravity.
Returns
Gravity vector in corrdinates of _inCoordinatesOf.

◆ SetGravity() [1/2]

void SetGravity ( const LinearVectorType _gravity,
const FrameID _forceInCoordinatesOf = FrameID::World< PolicyT, FeaturesT >() 
)

Set the World gravity vector. Optionally, you may specify the frame whose coordinates are used to express the gravity vector. The World frame is used as a default if no frame is specified.

Parameters
[in]_gravityGravity vector.
[in]_inCoordinatesOfFrame whose coordinates are used to express _gravity.

◆ SetGravity() [2/2]

void SetGravity ( const RelativeForceType _gravity)

Set the World gravity vector.

Parameters
[in]_gravityThe desired gravity as a Relative Gravity (a quantity that contains information about the coordinates in which it is expressed).

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