9 #ifndef opengl_CFrustum_H
10 #define opengl_CFrustum_H
72 float near_distance,
float far_distance,
float horz_FOV_degrees,
73 float vert_FOV_degrees,
float lineWidth = 1.5f,
bool draw_lines =
true,
74 bool draw_planes =
false);
100 void setHorzFOV(
const float fov_horz_degrees);
102 void setVertFOV(
const float fov_vert_degrees);
105 const float fov_horz_left_degrees,
const float fov_horz_right_degrees);
108 const float fov_vert_down_degrees,
const float fov_vert_up_degrees);
147 float near_distance,
float far_distance,
float horz_FOV_degrees,
148 float vert_FOV_degrees,
float lineWidth,
bool draw_lines,
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
A solid or wireframe frustum in 3D (a rectangular truncated pyramid), with arbitrary (possibly assyme...
void setNearFarPlanes(const float near_distance, const float far_distance)
Changes distance of near & far planes.
void setLineWidth(float width)
const mrpt::utils::TColor & getPlaneColor() const
void setHorzFOV(const float fov_horz_degrees)
Changes horizontal FOV (symmetric)
float m_min_distance
Near and far planes.
std::shared_ptr< CFrustum > Ptr
void setVertFOV(const float fov_vert_degrees)
Changes vertical FOV (symmetric)
static CFrustum::Ptr Create(float near_distance, float far_distance, float horz_FOV_degrees, float vert_FOV_degrees, float lineWidth=1.5f, bool draw_lines=true, bool draw_planes=false)
Constructor returning a smart pointer to the newly created object.
float getVertFOVUp() const
void setVertFOVAsymmetric(const float fov_vert_down_degrees, const float fov_vert_up_degrees)
Changes vertical FOV (asymmetric)
float getHorzFOVLeft() const
float getLineWidth() const
float getHorzFOVRight() const
float getNearPlaneDistance() const
CFrustum()
Basic empty constructor.
virtual ~CFrustum()
Destructor
void render_dl() const override
Render.
float m_fov_vert_down
Semi FOVs (in radians)
bool traceRay(const mrpt::poses::CPose3D &o, double &dist) const override
Ray tracing.
void getBoundingBox(mrpt::math::TPoint3D &bb_min, mrpt::math::TPoint3D &bb_max) const override
Evaluates the bounding box of this object (including possible children) in the coordinate frame of th...
void setPlaneColor(const mrpt::utils::TColor &c)
Changes the color of the planes; to change color of lines, use CRenderizable base methods.
float getFarPlaneDistance() const
mrpt::utils::TColor m_planes_color
float m_fov_horz_left
Semi FOVs (in radians)
float getVertFOVDown() const
void setHorzFOVAsymmetric(const float fov_horz_left_degrees, const float fov_horz_right_degrees)
Changes horizontal FOV (asymmetric)
A renderizable object suitable for rendering with OpenGL's display lists.
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated)
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
double RAD2DEG(const double x)
Radians to degrees.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.