Skip to content

Commit

Permalink
Making APIs consistent for Frustum
Browse files Browse the repository at this point in the history
fix gazebosim#301

Signed-off-by: Akshat Pandya <[email protected]>
  • Loading branch information
akshatpandya committed Dec 24, 2021
1 parent 09d216d commit 98187e7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions include/ignition/math/Frustum.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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.
Expand Down
12 changes: 6 additions & 6 deletions src/Frustum.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down Expand Up @@ -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();
Expand All @@ -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();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 98187e7

Please sign in to comment.