From 98187e7e38d463ab44ac81cda857140bd8bec0e7 Mon Sep 17 00:00:00 2001 From: Akshat Pandya Date: Thu, 23 Dec 2021 21:32:50 -0800 Subject: [PATCH] Making APIs consistent for Frustum fix #301 Signed-off-by: Akshat Pandya --- include/ignition/math/Frustum.hh | 12 ++++++------ src/Frustum.cc | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/ignition/math/Frustum.hh b/include/ignition/math/Frustum.hh index b85e23f2a..38af773f0 100644 --- a/include/ignition/math/Frustum.hh +++ b/include/ignition/math/Frustum.hh @@ -80,10 +80,10 @@ namespace ignition /// by height of the near or far planes. /// \param[in] _pose Pose of the frustum, which is the vertex (top of /// the pyramid). - public: Frustum(const double _near, - const double _far, + public: Frustum(double _near, + double _far, const math::Angle &_fov, - const double _aspectRatio, + double _aspectRatio, const math::Pose3d &_pose = math::Pose3d::Zero); /// \brief Copy Constructor @@ -103,7 +103,7 @@ namespace ignition /// frustum's vertex to the closest plane. /// \param[in] _near Near distance. /// \sa Near - public: void SetNear(const double _near); + public: void SetNear(double _near); /// \brief Get the far distance. This is the distance from the /// frustum's vertex to the farthest plane. @@ -115,7 +115,7 @@ namespace ignition /// frustum's vertex to the farthest plane. /// \param[in] _far Far distance. /// \sa Far - public: void SetFar(const double _far); + public: void SetFar(double _far); /// \brief Get the horizontal field of view. The field of view is the /// angle between the frustum's vertex and the edges of the near or far @@ -141,7 +141,7 @@ namespace ignition /// of the near or far planes. /// \param[in] _aspectRatio The frustum's aspect ratio. /// \sa AspectRatio - public: void SetAspectRatio(const double _aspectRatio); + public: void SetAspectRatio(double _aspectRatio); /// \brief Get a plane of the frustum. /// \param[in] _plane The plane to return. diff --git a/src/Frustum.cc b/src/Frustum.cc index 44a328665..ab34da22a 100644 --- a/src/Frustum.cc +++ b/src/Frustum.cc @@ -31,10 +31,10 @@ Frustum::Frustum() } ///////////////////////////////////////////////// -Frustum::Frustum(const double _near, - const double _far, +Frustum::Frustum(double _near, + double _far, const Angle &_fov, - const double _aspectRatio, + double _aspectRatio, const Pose3d &_pose) : dataPtr(new FrustumPrivate(_near, _far, _fov, _aspectRatio, _pose)) { @@ -171,7 +171,7 @@ double Frustum::Near() const } ///////////////////////////////////////////////// -void Frustum::SetNear(const double _near) +void Frustum::SetNear(double _near) { this->dataPtr->near = _near; this->ComputePlanes(); @@ -184,7 +184,7 @@ double Frustum::Far() const } ///////////////////////////////////////////////// -void Frustum::SetFar(const double _far) +void Frustum::SetFar(double _far) { this->dataPtr->far = _far; this->ComputePlanes(); @@ -223,7 +223,7 @@ double Frustum::AspectRatio() const } ///////////////////////////////////////////////// -void Frustum::SetAspectRatio(const double _aspectRatio) +void Frustum::SetAspectRatio(double _aspectRatio) { this->dataPtr->aspectRatio = _aspectRatio; this->ComputePlanes();