17#ifndef GAZEBO_PHYSICS_WIND_HH_
18#define GAZEBO_PHYSICS_WIND_HH_
23#include <boost/any.hpp>
41 class GZ_PHYSICS_VISIBLE
Wind
46 public:
explicit Wind(
World &_world, sdf::ElementPtr _sdf);
53 public:
virtual void Load(sdf::ElementPtr _sdf);
64 const boost::any &_value);
70 public: boost::any
Param(
const std::string &_key)
const;
77 public:
bool Param(
const std::string &_key, boost::any &_value)
const;
81 private:
void OnWindMsg(ConstWindPtr &_msg);
85 private:
void OnRequest(ConstRequestPtr &_msg);
102 public:
const ignition::math::Vector3d&
LinearVel(
void)
const;
115 const Wind *_wind,
const Entity *_entity) > _linearVelFunc);
122 private: ignition::math::Vector3d LinearVelDefault(
const Wind *_wind,
127 private: std::unique_ptr<WindPrivate> dataPtr;
default namespace for gazebo
Base class for all physics objects in Gazebo.
Definition Entity.hh:53
Base class for wind.
Definition Wind.hh:42
void SetLinearVelFunc(std::function< ignition::math::Vector3d(const Wind *_wind, const Entity *_entity) > _linearVelFunc)
Setup function to compute the wind.
boost::any Param(const std::string &_key) const
Get a wind parameter.
ignition::math::Vector3d WorldLinearVel(const Entity *_entity) const
Get the wind velocity at an entity location in the world coordinate frame.
Wind(World &_world, sdf::ElementPtr _sdf)
Default constructor.
virtual ~Wind()
Destructor.
bool SetParam(const std::string &_key, const boost::any &_value)
Set a parameter of the wind.
void SetLinearVel(const ignition::math::Vector3d &_vel)
Set the global wind velocity.
bool Param(const std::string &_key, boost::any &_value) const
Get a wind parameter with a boolean to indicate success or failure.
const ignition::math::Vector3d & LinearVel(void) const
Get the global wind velocity.
virtual void Load(sdf::ElementPtr _sdf)
Load the wind.
ignition::math::Vector3d RelativeLinearVel(const Entity *_entity) const
Get the wind velocity at an entity location.
The world provides access to all other object within a simulated environment.
Definition World.hh:76
Forward declarations for the common classes.
Definition Animation.hh:27