Go to the documentation of this file.
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;
bool Param(const std::string &_key, boost::any &_value) const
Get a wind parameter with a boolean to indicate success or failure.
Forward declarations for the common classes.
Definition: Animation.hh:27
void SetLinearVel(const ignition::math::Vector3d &_vel)
Set the global wind velocity.
virtual void Load(sdf::ElementPtr _sdf)
Load the wind.
const ignition::math::Vector3d & LinearVel(void) const
Get the global wind velocity.
default namespace for gazebo
bool SetParam(const std::string &_key, const boost::any &_value)
Set a parameter of the wind.
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.
void SetLinearVelFunc(std::function< ignition::math::Vector3d(const Wind *_wind, const Entity *_entity) > _linearVelFunc)
Setup function to compute the wind.
The world provides access to all other object within a simulated environment.
Definition: World.hh:76
ignition::math::Vector3d RelativeLinearVel(const Entity *_entity) const
Get the wind velocity at an entity location.
Base class for wind.
Definition: Wind.hh:42
Base class for all physics objects in Gazebo.
Definition: Entity.hh:53
virtual ~Wind()
Destructor.
boost::any Param(const std::string &_key) const
Get a wind parameter.