18 #ifndef GAZEBO_RENDERING_LENSFLARE_HH_
19 #define GAZEBO_RENDERING_LENSFLARE_HH_
35 class LensFlarePrivate;
37 class LensFlareCompositorListenerPrivate;
42 :
public Ogre::CompositorInstance::Listener
60 public:
void SetColor(
const ignition::math::Vector3d &_color);
66 Ogre::MaterialPtr &_mat);
72 private:
void CameraPosScale(
const CameraPtr &_camera,
73 ignition::math::Vector3d &_pos,
double &_scale);
79 private:
void WideAngleCameraPosScale(
81 ignition::math::Vector3d &_pos,
double &_scale);
88 private:
double OcclusionScale(
const CameraPtr &_cam,
89 const ignition::math::Vector3d &_imgPos,
90 const ignition::math::Vector3d &_worldPos);
94 private: std::unique_ptr<LensFlareCompositorListenerPrivate> dataPtr;
124 public:
void SetColor(
const ignition::math::Vector3d &_color);
141 std::shared_ptr<LensFlareCompositorListener> _listener);
149 private:
void OnRequest(ConstRequestPtr &_msg);
153 private: std::unique_ptr<LensFlarePrivate> dataPtr;
rendering
Definition: RenderEngine.hh:31
We'll create an instance of this class for each camera, to be used to inject lens flare uniforms in e...
Definition: LensFlare.hh:43
LensFlareCompositorListener(CameraPtr _camera, LightPtr _light)
Constructor.
void SetScale(const double _scale)
Set the scale of lens flare.
~LensFlareCompositorListener()
Destructor.
virtual void notifyMaterialRender(unsigned int _passId, Ogre::MaterialPtr &_mat)
Callback that OGRE will invoke for us on each render call.
void SetColor(const ignition::math::Vector3d &_color)
Set the color of lens flare.
void SetLight(LightPtr _light)
Set directional light that generates lens flare.
Camera lens flare compositor.
Definition: LensFlare.hh:107
void SetScale(const double _scale)
Set the scale of lens flare.
void SetLensFlareInstance(Ogre::CompositorInstance *_instance)
Set lensFlareInstance stored in LensFlarePrivate.
void SetCameraImpl(CameraPtr _camera)
Set camera stored in LensFlarePrivate.
void SetCamera(CameraPtr _camera)
Set the camera which lensFlare will be applied to.
virtual ~LensFlare()
Destructor.
void SetLensFlareCompositorListener(std::shared_ptr< LensFlareCompositorListener > _listener)
Set lensFlareCompositorListener stored in LensFlarePrivate.
void SetColor(const ignition::math::Vector3d &_color)
Set the color of lens flare.
void Update()
Update function to search light source.
void SetCompositorName(const std::string &_name)
Set the name of the lens flare compositor to use the next time SetCamera is called.
boost::shared_ptr< Light > LightPtr
Definition: RenderTypes.hh:86
boost::shared_ptr< Camera > CameraPtr
Definition: RenderTypes.hh:90
boost::shared_ptr< WideAngleCamera > WideAngleCameraPtr
Definition: RenderTypes.hh:102
Forward declarations for the common classes.
Definition: Animation.hh:27