23 #ifndef _ASV_WAVE_SIM_GAZEBO_PLUGINS_WAVEFIELD_VISUAL_PLUGIN_HH_ 24 #define _ASV_WAVE_SIM_GAZEBO_PLUGINS_WAVEFIELD_VISUAL_PLUGIN_HH_ 26 #include <gazebo/common/Plugin.hh> 27 #include <gazebo/msgs/msgs.hh> 28 #include <gazebo/rendering/Camera.hh> 42 class WavefieldVisualPluginPrivate;
139 public gazebo::VisualPlugin,
140 public Ogre::RenderTargetListener
149 public:
virtual void Load(
150 gazebo::rendering::VisualPtr _visual,
151 sdf::ElementPtr _sdf);
154 public:
virtual void Init();
157 public:
virtual void Reset();
161 private:
void OnPreRender();
165 private:
void SetupReflectionRefraction();
169 private:
void UpdateClipPlanes();
173 private:
void AddNewCamerasForReflectionRefraction();
178 private:
void CreateRtts(Ogre::Camera* _camera);
182 private: std::vector<gazebo::rendering::CameraPtr> NewCameras();
188 private:
void OnStatsMsg(ConstWorldStatisticsPtr &_msg);
192 private:
void SetShaderParams();
199 private:
virtual void preRenderTargetUpdate(
200 const Ogre::RenderTargetEvent& rte);
201 private:
virtual void postRenderTargetUpdate(
202 const Ogre::RenderTargetEvent& rte);
206 private:
void OnCameraPreRender(
const std::string &_camera);
210 private: std::shared_ptr<WavefieldVisualPluginPrivate>
data;
A Gazebo visual plugin to synchronise and control a vertex shader rendering Gerstner waves...
std::shared_ptr< WavefieldVisualPluginPrivate > data