Go to the documentation of this file.
100 const float fov_horz_left_degrees,
const float fov_horz_right_degrees);
103 const float fov_vert_down_degrees,
const float fov_vert_up_degrees);
127 float near_distance,
float far_distance,
float horz_FOV_degrees,
128 float vert_FOV_degrees,
float lineWidth,
bool draw_lines,
const mrpt::img::TColor & getPlaneColor() const
mrpt::img::TColor m_planes_color
float getVertFOVUp() const
void setHorzFOVAsymmetric(const float fov_horz_left_degrees, const float fov_horz_right_degrees)
Changes horizontal FOV (asymmetric)
void notifyChange() const
Call to enable calling renderUpdateBuffers() before the next render() rendering iteration.
void setNearFarPlanes(const float near_distance, const float far_distance)
Changes distance of near & far planes.
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
void setPlaneColor(const mrpt::img::TColor &c)
Changes the color of the planes; to change color of lines, use CRenderizable base methods.
float getFarPlaneDistance() const
virtual shader_list_t requiredShaders() const override
Returns the ID of the OpenGL shader program required to render this class.
float m_fov_horz_left
Semi FOVs (in radians)
Renderizable generic renderer for objects using the wireframe shader.
void onUpdateBuffers_Triangles() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
~CFrustum() override=default
Destructor
float getVertFOVDown() const
void setVertFOVAsymmetric(const float fov_vert_down_degrees, const float fov_vert_up_degrees)
Changes vertical FOV (asymmetric)
void freeOpenGLResources() override
Free opengl buffers.
void freeOpenGLResources() override
Free opengl buffers.
void setVertFOV(const float fov_vert_degrees)
Changes vertical FOV (symmetric)
static constexpr shader_id_t WIREFRAME
static constexpr shader_id_t TRIANGLES
float getHorzFOVLeft() const
constexpr double RAD2DEG(const double x)
Radians to degrees.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
void setHorzFOV(const float fov_horz_degrees)
Changes horizontal FOV (symmetric)
void renderUpdateBuffers() const override
Called whenever m_outdatedBuffers is true: used to re-generate OpenGL vertex buffers,...
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...
A solid or wireframe frustum in 3D (a rectangular truncated pyramid), with arbitrary (possibly assyme...
Context for calls to render()
void freeOpenGLResources() override
Free opengl buffers.
void render(const RenderContext &rc) const override
Implements the rendering of 3D objects in each class derived from CRenderizable.
void onUpdateBuffers_Wireframe() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
float m_fov_vert_down
Semi FOVs (in radians)
bool traceRay(const mrpt::poses::CPose3D &o, double &dist) const override
Simulation of ray-trace, given a pose.
std::vector< shader_id_t > shader_list_t
A list of shader IDs.
std::array< mrpt::math::TPoint3Df, 8 > computeFrustumCorners() const
Renderizable generic renderer for objects using the triangles shader.
float getHorzFOVRight() const
The namespace for 3D scene representation and rendering.
CFrustum()
Basic empty constructor.
float getNearPlaneDistance() const
float m_min_distance
Near and far planes.
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Fri Jul 17 08:43:33 UTC 2020 | |