Go to the documentation of this file.
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;
void SetPose(const Pose3d &_pose)
Set the pose of the frustum.
An angle and related functions.
Definition: Angle.hh:48
Planed Plane(const FrustumPlane _plane) const
Get a plane of the frustum.
Frustum(const double _near, const double _far, const math::Angle &_fov, const double _aspectRatio, const math::Pose3d &_pose=math::Pose3d::Zero)
Constructor.
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.
double AspectRatio() const
Get the aspect ratio, which is the width divided by height of the near or far planes.
Mathematical representation of a frustum and related functions.
Definition: Frustum.hh:37
Pose3d Pose() const
Get the pose of the frustum.
virtual ~Frustum()
Destructor.
bool Contains(const Vector3d &_p) const
Check if a point lies inside the pyramid frustum.
The Vector3 class represents the generic vector containing 3 elements. Since it's commonly used to ke...
Definition: Vector3.hh:40
double Far() const
Get the far distance.
void SetFOV(const math::Angle &_fov)
Set the horizontal field of view.
Mathematical representation of a box and related functions.
Definition: Box.hh:39
double Near() const
Get the near distance.
bool Contains(const Box &_b) const
Check if a box lies inside the pyramid frustum.
A plane and related functions.
Definition: Plane.hh:35
Frustum()
Default constructor.
void SetFar(const double _far)
Set the far distance.
Encapsulates a position and rotation in three space.
Definition: Pose3.hh:34
FrustumPlane
Planes that define the boundaries of the frustum.
Definition: Frustum.hh:40
void SetNear(const double _near)
Set the near distance.
math::Angle FOV() const
Get the horizontal field of view.
Frustum(const Frustum &_p)
Copy Constructor.