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);
151 public:
void SetScaleToHFOV(
const bool _scale);
158 public:
void SetUniformVariables(Ogre::Pass *_pass,
const float _ratio,
163 private:
void ConvertToCustom();
167 private: std::unique_ptr<CameraLensPrivate> dataPtr;
174 protected Ogre::CompositorInstance::Listener
183 const bool _autoRender =
true,
184 const int _textureSize = 256);
190 public:
void Init()
override;
193 public:
void Load()
override;
197 public:
virtual void Fini()
override;
201 public:
int EnvTextureSize()
const;
208 public:
void SetRenderTarget(Ogre::RenderTarget *_target)
override;
212 public:
void SetEnvTextureSize(
const int _size);
215 protected:
void CreateEnvCameras();
218 public:
void SetClipDist()
override;
222 public:
bool SetBackgroundColor(
const ignition::math::Color &_color)
229 public: ignition::math::Vector3d Project3d(
230 const ignition::math::Vector3d &_pt)
const;
234 protected:
void CreateEnvRenderTexture(
const std::string &_textureName);
237 protected:
void RenderImpl()
override;
240 protected:
void UpdateFOV()
override;
246 protected:
void notifyMaterialRender(Ogre::uint32 _pass_id,
247 Ogre::MaterialPtr &_material)
override;
251 private: std::unique_ptr<WideAngleCameraPrivate> dataPtr;
Basic camera sensor.
Definition: Camera.hh:81
Camera with variable mapping function.
Definition: WideAngleCamera.hh:172
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:82
virtual void SetClipDist()
Set the clip distance based on stored SDF values.
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:59