A plugin that sets the model height (z) to be the same as the wave height calculated for the physics. All SDF parameters are optional. More...
#include <wavegauge_plugin.hh>
Public Member Functions | |
virtual void | Init () |
virtual void | Load (physics::ModelPtr _model, sdf::ElementPtr _sdf) |
WaveguagePlugin () | |
Constructor. More... | |
Protected Member Functions | |
virtual void | OnUpdate () |
Callback for World Update events. More... | |
Protected Attributes | |
double | fluidLevel |
The height of the fluid/air interface [m]. Defaults to 0. More... | |
physics::ModelPtr | model |
Pointer to the model. More... | |
event::ConnectionPtr | updateConnection |
Connection to World Update events. More... | |
std::string | waveModelName |
The name of the wave model. More... | |
A plugin that sets the model height (z) to be the same as the wave height calculated for the physics. All SDF parameters are optional.
<fluid_level>: The height of the fluid/air interface [m]. This parameter is optional.
<wave_model>: Name of the model that includes and instance of the WavefieldModelPlugin. For Example: <plugin name="wavegauge_plugin" filename="libwavegauge_plugin.so"> <wave_model>ocean_waves</wave_model> <fluid_level>0.0</fluid_level> </plugin> example
Definition at line 48 of file wavegauge_plugin.hh.
WaveguagePlugin::WaveguagePlugin | ( | ) |
Constructor.
Definition at line 33 of file wavegauge_plugin.cc.
|
virtual |
Definition at line 58 of file wavegauge_plugin.cc.
|
virtual |
Definition at line 39 of file wavegauge_plugin.cc.
|
protectedvirtual |
Callback for World Update events.
Definition at line 65 of file wavegauge_plugin.cc.
|
protected |
The height of the fluid/air interface [m]. Defaults to 0.
Definition at line 73 of file wavegauge_plugin.hh.
|
protected |
Pointer to the model.
Definition at line 67 of file wavegauge_plugin.hh.
|
protected |
Connection to World Update events.
Definition at line 64 of file wavegauge_plugin.hh.
|
protected |
The name of the wave model.
Definition at line 70 of file wavegauge_plugin.hh.