17 #ifndef GAZEBO_RENDERING_WIDEANGLECAMERA_HH_
18 #define GAZEBO_RENDERING_WIDEANGLECAMERA_HH_
30 #include "gazebo/msgs/MessageTypes.hh"
46 class WideAngleCamera;
47 class CameraLensPrivate;
48 class WideAngleCameraPrivate;
67 public:
void Init(
const double _c1,
const double _c2,
68 const std::string &_fun,
const double _f,
73 public:
void Init(
const std::string &_name);
77 public:
void Load(sdf::ElementPtr _sdf);
84 public: std::string Type()
const;
88 public:
bool IsCustom()
const;
92 public:
double C1()
const;
96 public:
double C2()
const;
100 public:
double C3()
const;
104 public:
double F()
const;
108 public: std::string Fun()
const;
112 public:
double CutOffAngle()
const;
116 public:
bool ScaleToHFOV()
const;
120 public:
void SetType(
const std::string &_type);
124 public:
void SetC1(
const double _c);
128 public:
void SetC2(
const double _c);
132 public:
void SetC3(
const double _c);
136 public:
void SetF(
const double _f);
140 public:
void SetFun(
const std::string &_fun);
144 public:
void SetCutOffAngle(
const double _angle);
149 public:
void SetScaleToHFOV(
const bool _scale);
156 public:
void SetUniformVariables(Ogre::Pass *_pass,
const float _ratio,
161 private:
void ConvertToCustom();
165 private: std::unique_ptr<CameraLensPrivate> dataPtr;
172 protected Ogre::CompositorInstance::Listener
181 const bool _autoRender =
true,
182 const int _textureSize = 256);
188 public:
void Init()
override;
191 public:
void Load()
override;
195 public:
virtual void Fini()
override;
199 public:
int EnvTextureSize()
const;
206 public:
void SetRenderTarget(Ogre::RenderTarget *_target)
override;
210 public:
void SetEnvTextureSize(
const int _size);
213 protected:
void CreateEnvCameras();
216 public:
void SetClipDist()
override;
220 public:
bool SetBackgroundColor(
const common::Color &_color)
override;
224 protected:
void CreateEnvRenderTexture(
const std::string &_textureName);
227 protected:
void RenderImpl()
override;
230 protected:
void UpdateFOV()
override;
236 protected:
void notifyMaterialRender(Ogre::uint32 _pass_id,
237 Ogre::MaterialPtr &_material)
override;
241 private: std::unique_ptr<WideAngleCameraPrivate> dataPtr;
Basic camera sensor.
Definition: Camera.hh:85
Camera with variable mapping function.
Definition: WideAngleCamera.hh:170
Describes a lens of a camera as amapping function of type r = c1*f*fun(theta/c2+c3) ...
Definition: WideAngleCamera.hh:53
virtual void Load()
Load the camera with default parmeters.
boost::shared_ptr< Scene > ScenePtr
Definition: RenderTypes.hh:81
virtual void SetClipDist()
Set the clip distance based on stored SDF values.
Defines a color.
Definition: Color.hh:36
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:58