9 #ifndef opengl_CFrustum_H 10 #define opengl_CFrustum_H 52 float m_min_distance, m_max_distance;
53 float m_fov_horz_left,m_fov_horz_right;
54 float m_fov_vert_down,m_fov_vert_up;
55 bool m_draw_lines, m_draw_planes;
57 mrpt::utils::TColor m_planes_color;
61 static CFrustumPtr 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 );
71 void setNearFarPlanes(
const float near_distance,
const float far_distance);
77 void setHorzFOV(
const float fov_horz_degrees);
79 void setVertFOV(
const float fov_vert_degrees);
81 void setHorzFOVAsymmetric(
const float fov_horz_left_degrees,
const float fov_horz_right_degrees);
83 void setVertFOVAsymmetric(
const float fov_vert_down_degrees,
const float fov_vert_up_degrees);
93 void render_dl()
const;
105 CFrustum(
float near_distance,
float far_distance,
float horz_FOV_degrees,
float vert_FOV_degrees,
float lineWidth,
bool draw_lines,
bool draw_planes);
float getHorzFOVLeft() const
float getNearPlaneDistance() const
float getHorzFOVRight() const
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated) ...
float getVertFOVUp() const
A renderizable object suitable for rendering with OpenGL's display lists.
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
void setPlaneColor(const mrpt::utils::TColor &c)
Changes the color of the planes; to change color of lines, use CRenderizable base methods...
double RAD2DEG(const double x)
Radians to degrees.
float getLineWidth() const
const mrpt::utils::TColor & getPlaneColor() const
bool BASE_IMPEXP traceRay(const vector< TPolygonWithPlane > &vec, const mrpt::poses::CPose3D &pose, double &dist)
Fast ray tracing method using polygons' properties.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
virtual ~CFrustum()
Destructor.
A solid or wireframe frustum in 3D (a rectangular truncated pyramid), with arbitrary (possibly assyme...
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
float getFarPlaneDistance() const
float getVertFOVDown() const