17 #ifndef GAZEBO_RENDERING_WIDEANGLECAMERA_HH_ 18 #define GAZEBO_RENDERING_WIDEANGLECAMERA_HH_ 32 #include "gazebo/msgs/MessageTypes.hh" 48 class WideAngleCamera;
49 class CameraLensPrivate;
50 class WideAngleCameraPrivate;
69 public:
void Init(
const double _c1,
const double _c2,
70 const std::string &_fun,
const double _f,
75 public:
void Init(
const std::string &_name);
79 public:
void Load(sdf::ElementPtr _sdf);
86 public: std::string Type()
const;
90 public:
bool IsCustom()
const;
94 public:
double C1()
const;
98 public:
double C2()
const;
102 public:
double C3()
const;
106 public:
double F()
const;
110 public: std::string Fun()
const;
114 public:
double CutOffAngle()
const;
118 public:
bool ScaleToHFOV()
const;
122 public:
void SetType(
const std::string &_type);
126 public:
void SetC1(
const double _c);
130 public:
void SetC2(
const double _c);
134 public:
void SetC3(
const double _c);
138 public:
void SetF(
const double _f);
142 public:
void SetFun(
const std::string &_fun);
146 public:
void SetCutOffAngle(
const double _angle);
153 public:
void SetScaleToHFOV(
const bool _scale);
160 public:
void SetUniformVariables(Ogre::Pass *_pass,
const float _ratio,
165 private:
void ConvertToCustom();
169 private: std::unique_ptr<CameraLensPrivate> dataPtr;
176 protected Ogre::CompositorInstance::Listener
185 const bool _autoRender =
true,
186 const int _textureSize = 256);
192 public:
void Init()
override;
195 public:
void Load()
override;
199 public:
virtual void Fini()
override;
203 public:
int EnvTextureSize()
const;
210 public:
void SetRenderTarget(Ogre::RenderTarget *_target)
override;
214 public:
void SetEnvTextureSize(
const int _size);
217 protected:
void CreateEnvCameras();
220 public:
void SetClipDist()
override;
224 public:
bool SetBackgroundColor(
const ignition::math::Color &_color)
231 public: ignition::math::Vector3d Project3d(
232 const ignition::math::Vector3d &_pt)
const;
237 public: std::vector<Ogre::Camera *> OgreEnvCameras()
const;
241 protected:
void CreateEnvRenderTexture(
const std::string &_textureName);
244 protected:
void RenderImpl()
override;
247 protected:
void UpdateFOV()
override;
253 protected:
void notifyMaterialRender(Ogre::uint32 _pass_id,
254 Ogre::MaterialPtr &_material)
override;
258 private: std::unique_ptr<WideAngleCameraPrivate> dataPtr;
Basic camera sensor.
Definition: Camera.hh:84
Camera with variable mapping function.
Definition: WideAngleCamera.hh:174
Forward declarations for the common classes.
Definition: Animation.hh:26
Describes a lens of a camera as amapping function of type r = c1*f*fun(theta/c2+c3) ...
Definition: WideAngleCamera.hh:55
rendering
Definition: RenderEngine.hh:31
virtual void Load()
Load the camera with default parameters.
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