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;
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;
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);
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);
199 public:
virtual void Fini()
override;
221 using Camera::SetClipDist;
232 const ignition::math::Vector3d &_pt)
const;
254 Ogre::MaterialPtr &_material)
override;
258 private: std::unique_ptr<WideAngleCameraPrivate> dataPtr;
rendering
Definition RenderEngine.hh:31
Describes a lens of a camera as amapping function of type r = c1*f*fun(theta/c2+c3)
Definition WideAngleCamera.hh:56
double F() const
Gets f parameter.
std::string Fun() const
Gets angle transform function.
void SetScaleToHFOV(const bool _scale)
Sets whether the image should be scaled to fit horizontal FOV If True, the projection will compute a ...
void SetUniformVariables(Ogre::Pass *_pass, const float _ratio, const float _hfov)
Set uniform variables of a shader for the provided material technique pass.
void SetType(const std::string &_type)
Set lens projection type.
void Init(const double _c1, const double _c2, const std::string &_fun, const double _f, const double _c3)
Init custom camera lens with specified parameters.
void SetF(const double _f)
Sets f parameter.
double CutOffAngle() const
Gets cut off angle.
double C2() const
Gets c2 parameter.
virtual ~CameraLens()
Destructor.
void SetC1(const double _c)
Sets c1 parameter.
double C1() const
Gets c1 parameter.
std::string Type() const
Get lens projection type.
void SetC2(const double _c)
Sets c2 parameter.
void SetFun(const std::string &_fun)
Sets angle transform function.
double C3() const
Gets c3 parameter.
void SetC3(const double _c)
Sets c3 parameter.
bool ScaleToHFOV() const
Checks if image should be scaled to fit horizontal FOV.
void Load(sdf::ElementPtr _sdf)
Load camera lens from SDF file.
void SetCutOffAngle(const double _angle)
Sets cut-off angle.
void Load()
Load camera lens with default parameters.
bool IsCustom() const
Checks if lens type is of the custom type.
void Init(const std::string &_name)
Init camera lens with standard mapping function.
Basic camera sensor.
Definition Camera.hh:86
Camera with variable mapping function.
Definition WideAngleCamera.hh:177
void UpdateFOV() override
Update the camera's field of view.
void SetClipDist() override
Set the clip distance based on stored SDF values.
int EnvTextureSize() const
Gets the environment texture size.
void CreateEnvCameras()
Creates a set of 6 cameras pointing in different directions.
void SetEnvTextureSize(const int _size)
Sets environment texture size.
void Init() override
Initialize the camera.
ignition::math::Vector3d Project3d(const ignition::math::Vector3d &_pt) const
Project 3D world coordinates to screen coordinates.
void notifyMaterialRender(Ogre::uint32 _pass_id, Ogre::MaterialPtr &_material) override
\bried Callback that is used to set mapping material uniform values, implements Ogre::CompositorInsta...
CameraLens * Lens() const
Gets camera's lens description.
void SetRenderTarget(Ogre::RenderTarget *_target) override
Set the camera's render target.
bool SetBackgroundColor(const ignition::math::Color &_color) override
Set background color for viewport (if viewport is not null)
void Load() override
Load the camera with default parameters.
virtual void Fini() override
Finalize the camera.
WideAngleCamera(const std::string &_namePrefix, ScenePtr _scene, const bool _autoRender=true, const int _textureSize=256)
Constructor.
void RenderImpl() override
Implementation of the render call.
virtual ~WideAngleCamera()
Destructor.
void CreateEnvRenderTexture(const std::string &_textureName)
Set the camera's render target.
std::vector< Ogre::Camera * > OgreEnvCameras() const
Get the list of ogre cameras used to create the cube map for generating the wide angle camera image.
boost::shared_ptr< Scene > ScenePtr
Definition RenderTypes.hh:82
Forward declarations for the common classes.
Definition Animation.hh:27
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition system.hh:59