17#ifndef IGNITION_MATH_FRUSTUM_HH_
18#define IGNITION_MATH_FRUSTUM_HH_
23#include <ignition/math/config.hh>
29 inline namespace IGNITION_MATH_VERSION_NAMESPACE
42 FRUSTUM_PLANE_NEAR = 0,
45 FRUSTUM_PLANE_FAR = 1,
48 FRUSTUM_PLANE_LEFT = 2,
51 FRUSTUM_PLANE_RIGHT = 3,
54 FRUSTUM_PLANE_TOP = 4,
57 FRUSTUM_PLANE_BOTTOM = 5
84 const double _aspectRatio,
98 public:
double Near()
const;
110 public:
double Far()
const;
176 private:
void ComputePlanes();
180 private: FrustumPrivate *dataPtr;
An angle and related functions.
Definition Angle.hh:48
Mathematical representation of a box and related functions.
Definition Box.hh:39
Mathematical representation of a frustum and related functions.
Definition Frustum.hh:37
Frustum(const Frustum &_p)
Copy Constructor.
Planed Plane(const FrustumPlane _plane) const
Get a plane of the frustum.
void SetFOV(const math::Angle &_fov)
Set the horizontal field of view.
double Far() const
Get the far distance.
Frustum()
Default constructor.
FrustumPlane
Planes that define the boundaries of the frustum.
Definition Frustum.hh:40
double AspectRatio() const
Get the aspect ratio, which is the width divided by height of the near or far planes.
void SetPose(const Pose3d &_pose)
Set the pose of the frustum.
void SetNear(const double _near)
Set the near distance.
Frustum(const double _near, const double _far, const math::Angle &_fov, const double _aspectRatio, const math::Pose3d &_pose=math::Pose3d::Zero)
Constructor.
void SetFar(const double _far)
Set the far distance.
Pose3d Pose() const
Get the pose of the frustum.
double Near() const
Get the near distance.
bool Contains(const Box &_b) const
Check if a box lies inside the pyramid frustum.
void SetAspectRatio(const double _aspectRatio)
Set the aspect ratio, which is the width divided by height of the near or far planes.
Frustum & operator=(const Frustum &_f)
Assignment operator.
virtual ~Frustum()
Destructor.
math::Angle FOV() const
Get the horizontal field of view.
bool Contains(const Vector3d &_p) const
Check if a point lies inside the pyramid frustum.
A plane and related functions.
Definition Plane.hh:35
Encapsulates a position and rotation in three space.
Definition Pose3.hh:34
The Vector3 class represents the generic vector containing 3 elements.
Definition Vector3.hh:40