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