Describes a lens of a camera as amapping function of type r = c1*f*fun(theta/c2+c3)
More...
#include <rendering/rendering.hh>
|
| | CameraLens () |
| | Constructor.
|
| virtual | ~CameraLens () |
| | Destructor.
|
| double | C1 () const |
| | Gets c1 parameter.
|
| double | C2 () const |
| | Gets c2 parameter.
|
| double | C3 () const |
| | Gets c3 parameter.
|
| double | CutOffAngle () const |
| | Gets cut off angle.
|
| double | F () const |
| | Gets f parameter.
|
| std::string | Fun () const |
| | Gets angle transform function.
|
| 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 | Init (const std::string &_name) |
| | Init camera lens with standard mapping function.
|
| bool | IsCustom () const |
| | Checks if lens type is of the custom type.
|
| void | Load () |
| | Load camera lens with default parameters.
|
| void | Load (sdf::ElementPtr _sdf) |
| | Load camera lens from SDF file.
|
| bool | ScaleToHFOV () const |
| | Checks if image should be scaled to fit horizontal FOV.
|
| void | SetC1 (const double _c) |
| | Sets c1 parameter.
|
| void | SetC2 (const double _c) |
| | Sets c2 parameter.
|
| void | SetC3 (const double _c) |
| | Sets c3 parameter.
|
| void | SetCutOffAngle (const double _angle) |
| | Sets cut-off angle.
|
| void | SetF (const double _f) |
| | Sets f parameter.
|
| void | SetFun (const std::string &_fun) |
| | Sets 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 new focal length for achieving the desired FOV.
|
| void | SetType (const std::string &_type) |
| | Set lens projection type.
|
| void | SetUniformVariables (Ogre::Pass *_pass, const float _ratio, const float _hfov) |
| | Set uniform variables of a shader for the provided material technique pass.
|
| std::string | Type () const |
| | Get lens projection type.
|
Describes a lens of a camera as amapping function of type r = c1*f*fun(theta/c2+c3)
◆ CameraLens()
◆ ~CameraLens()
◆ C1()
Gets c1 parameter.
- Returns
- c1 parameter
◆ C2()
Gets c2 parameter.
- Returns
- c2 parameter
◆ C3()
Gets c3 parameter.
- Returns
- c3 parameter
◆ CutOffAngle()
| double CutOffAngle |
( |
| ) |
const |
Gets cut off angle.
- Returns
- Cut off angle
◆ F()
Gets f parameter.
- Returns
- f parameter
◆ Fun()
| std::string Fun |
( |
| ) |
const |
Gets angle transform function.
- Returns
- Angle transform function string
◆ Init() [1/2]
| 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.
- Parameters
-
| [in] | _c1 | Image scaling factor |
| [in] | _c2 | Angle scaling factor |
| [in] | _fun | Angle transform function |
| [in] | _f | Focal length of the optical system |
| [in] | _c3 | Angle shift parameter, should be 0 in most cases |
◆ Init() [2/2]
| void Init |
( |
const std::string & | _name | ) |
|
Init camera lens with standard mapping function.
- Parameters
-
| [in] | _name | Mapping function name |
◆ IsCustom()
Checks if lens type is of the custom type.
- Returns
- True if this->Type() == "custom"
◆ Load() [1/2]
Load camera lens with default parameters.
◆ Load() [2/2]
| void Load |
( |
sdf::ElementPtr | _sdf | ) |
|
Load camera lens from SDF file.
- Parameters
-
◆ ScaleToHFOV()
| bool ScaleToHFOV |
( |
| ) |
const |
Checks if image should be scaled to fit horizontal FOV.
- Returns
- True if the image will be scaled
◆ SetC1()
| void SetC1 |
( |
const double | _c | ) |
|
Sets c1 parameter.
- Parameters
-
◆ SetC2()
| void SetC2 |
( |
const double | _c | ) |
|
Sets c2 parameter.
- Parameters
-
◆ SetC3()
| void SetC3 |
( |
const double | _c | ) |
|
Sets c3 parameter.
- Parameters
-
◆ SetCutOffAngle()
| void SetCutOffAngle |
( |
const double | _angle | ) |
|
Sets cut-off angle.
- Parameters
-
◆ SetF()
| void SetF |
( |
const double | _f | ) |
|
Sets f parameter.
- Parameters
-
◆ SetFun()
| void SetFun |
( |
const std::string & | _fun | ) |
|
Sets angle transform function.
- Parameters
-
| [in] | _fun | Angle transform function string |
◆ SetScaleToHFOV()
| void SetScaleToHFOV |
( |
const bool | _scale | ) |
|
Sets whether the image should be scaled to fit horizontal FOV If True, the projection will compute a new focal length for achieving the desired FOV.
- Parameters
-
| [in] | _scale | true if it should, note: c1 and f parameters are ignored in this case |
◆ SetType()
| void SetType |
( |
const std::string & | _type | ) |
|
Set lens projection type.
- Parameters
-
| [in] | _type | Lens projection type string |
◆ SetUniformVariables()
| void SetUniformVariables |
( |
Ogre::Pass * | _pass, |
|
|
const float | _ratio, |
|
|
const float | _hfov ) |
Set uniform variables of a shader for the provided material technique pass.
- Parameters
-
| [in] | _pass | Ogre::Pass used for rendering |
| [in] | _ratio | Frame aspect ratio |
| [in] | _hfov | Horizontal field of view |
◆ Type()
| std::string Type |
( |
| ) |
const |
Get lens projection type.
- Returns
- Lens projection type string
The documentation for this class was generated from the following file: