Base class for wind.  
 More...
#include <physics/physics.hh>
 | 
|   | Wind (World &_world, sdf::ElementPtr _sdf) | 
|   | Default constructor.  More...
  | 
|   | 
| virtual  | ~Wind () | 
|   | Destructor.  More...
  | 
|   | 
| const ignition::math::Vector3d &  | LinearVel (void) const  | 
|   | Get the global wind velocity.  More...
  | 
|   | 
| virtual void  | Load (sdf::ElementPtr _sdf) | 
|   | Load the wind.  More...
  | 
|   | 
| boost::any  | Param (const std::string &_key) const  | 
|   | Get a wind parameter.  More...
  | 
|   | 
| bool  | Param (const std::string &_key, boost::any &_value) const  | 
|   | Get a wind parameter with a boolean to indicate success or failure.  More...
  | 
|   | 
| ignition::math::Vector3d  | RelativeLinearVel (const Entity *_entity) const  | 
|   | Get the wind velocity at an entity location.  More...
  | 
|   | 
| void  | SetLinearVel (const ignition::math::Vector3d &_vel) | 
|   | Set the global wind velocity.  More...
  | 
|   | 
| void  | SetLinearVelFunc (std::function< ignition::math::Vector3d(const Wind *_wind, const Entity *_entity) > _linearVelFunc) | 
|   | Setup function to compute the wind.  More...
  | 
|   | 
| bool  | SetParam (const std::string &_key, const boost::any &_value) | 
|   | Set a parameter of the wind.  More...
  | 
|   | 
| ignition::math::Vector3d  | WorldLinearVel (const Entity *_entity) const  | 
|   | Get the wind velocity at an entity location in the world coordinate frame.  More...
  | 
|   | 
  
  
      
        
          | Wind  | 
          ( | 
          World &  | 
          _world,  | 
         
        
           | 
           | 
          sdf::ElementPtr  | 
          _sdf  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
explicit   | 
  
 
Default constructor. 
- Parameters
 - 
  
    | [in] | _world | Reference to the world.  | 
    | [in] | _sdf | SDF element parameters for the wind.  | 
  
   
 
 
      
        
          | const ignition::math::Vector3d& LinearVel  | 
          ( | 
          void  | 
           | ) | 
           const | 
        
      
 
Get the global wind velocity. 
- Returns
 - Linear velocity of the wind. 
 
 
 
  
  
      
        
          | virtual void Load  | 
          ( | 
          sdf::ElementPtr  | 
          _sdf | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
Load the wind. 
- Parameters
 - 
  
    | [in] | _sdf | Pointer to the SDF parameters.  | 
  
   
 
 
      
        
          | boost::any Param  | 
          ( | 
          const std::string &  | 
          _key | ) | 
           const | 
        
      
 
Get a wind parameter. 
- Parameters
 - 
  
  
 
- See Also
 - SetParam 
 
- Returns
 - The value of the parameter 
 
 
 
      
        
          | bool Param  | 
          ( | 
          const std::string &  | 
          _key,  | 
        
        
           | 
           | 
          boost::any &  | 
          _value  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
Get a wind parameter with a boolean to indicate success or failure. 
- Parameters
 - 
  
    | [in] | _key | Key of the accessed param  | 
    | [out] | _value | Value of the accessed param  | 
  
   
- Returns
 - True if the parameter was successfully retrieved 
 
 
 
      
        
          | ignition::math::Vector3d RelativeLinearVel  | 
          ( | 
          const Entity *  | 
          _entity | ) | 
           const | 
        
      
 
Get the wind velocity at an entity location. 
- Parameters
 - 
  
    | [in] | _entity | Entity at which location the wind is applied.  | 
  
   
- Returns
 - Linear velocity of the wind. 
 
 
 
      
        
          | void SetLinearVel  | 
          ( | 
          const ignition::math::Vector3d &  | 
          _vel | ) | 
           | 
        
      
 
Set the global wind velocity. 
- Parameters
 - 
  
    | [in] | _vel | Global wind velocity.  | 
  
   
 
 
      
        
          | void SetLinearVelFunc  | 
          ( | 
          std::function< ignition::math::Vector3d(const Wind *_wind, const Entity *_entity) >  | 
          _linearVelFunc | ) | 
           | 
        
      
 
Setup function to compute the wind. 
- Parameters
 - 
  
    | [in] | _linearVelFunc | The function callback that is used to calculate the wind's velocity. The parameters to the function callback is a reference to an instance of Wind and a pointer to an entity in the scene. The function must return the new wind velocity as a vector.  | 
  
   
 
 
      
        
          | bool SetParam  | 
          ( | 
          const std::string &  | 
          _key,  | 
        
        
           | 
           | 
          const boost::any &  | 
          _value  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Set a parameter of the wind. 
See SetParam documentation for descriptions of duplicate parameters. 
- Parameters
 - 
  
    | [in] | _key | String key Below is a list of _key parameter definitions:
- "linear_vel" (Vector3d) - wind linear velocity
 
 
 | 
    | [in] | _value | The value to set to  | 
  
   
- Returns
 - true if SetParam is successful, false if operation fails. 
 
 
 
      
        
          | ignition::math::Vector3d WorldLinearVel  | 
          ( | 
          const Entity *  | 
          _entity | ) | 
           const | 
        
      
 
Get the wind velocity at an entity location in the world coordinate frame. 
- Parameters
 - 
  
    | [in] | _entity | Entity at which location the wind is applied.  | 
  
   
- Returns
 - Linear velocity of the wind. 
 
 
 
The documentation for this class was generated from the following file: