Go to the documentation of this file.
89 vbd.emplace_back(segment.point1);
90 vbd.emplace_back(segment.point2);
94 cbd.assign(vbd.size(),
m_color);
111 vbd.emplace_back(segment.point1);
112 vbd.emplace_back(segment.point2);
116 cbd.assign(vbd.size(),
m_color);
138 in >> x0 >> y0 >> z0 >> x1 >> y1 >> z1;
143 size_t N = x0.
size();
145 for (
size_t i = 0; i < N; i++)
183 std::numeric_limits<double>::max(), std::numeric_limits<double>::max(),
184 std::numeric_limits<double>::max());
186 -std::numeric_limits<double>::max(),
187 -std::numeric_limits<double>::max(),
188 -std::numeric_limits<double>::max());
192 for (
size_t p = 0; p < 2; p++)
195 for (
size_t j = 0; j < 3; j++)
209 size_t index,
double& x0,
double& y0,
double& z0,
double& x1,
double& y1,
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...
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
TPoint3D_< double > TPoint3D
Lightweight 3D point.
void renderUpdateBuffers() const override
Called whenever m_outdatedBuffers is true: used to re-generate OpenGL vertex buffers,...
void notifyChange() const
Call to enable calling renderUpdateBuffers() before the next render() rendering iteration.
void readFromStreamRender(mrpt::serialization::CArchive &in)
CSetOfLines()
Constructor.
void render(const RenderContext &rc) const override
Implements the rendering of 3D objects in each class derived from CRenderizable.
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
A set of independent lines (or segments), one line with its own start and end positions (X,...
std::vector< mrpt::img::TColor > m_color_buffer_data
Renderizable generic renderer for objects using the wireframe shader.
mrpt::vision::TStereoCalibResults out
std::vector< mrpt::math::TSegment3D > m_Segments
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define THROW_EXCEPTION(msg)
#define ASSERT_(f)
Defines an assertion mechanism.
float getVerticesPointSize() const
Virtual base class for "archives": classes abstracting I/O streams.
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
static constexpr shader_id_t WIREFRAME
mrpt::poses::CPose3D m_pose
6D pose wrt the parent coordinate reference.
std::vector< mrpt::math::TPoint3Df > m_vertex_buffer_data
mrpt::img::TColor m_color
Color components in the range [0,255].
void composePoint(double lx, double ly, double lz, double &gx, double &gy, double &gz, mrpt::optional_ref< mrpt::math::CMatrixDouble33 > out_jacobian_df_dpoint=std::nullopt, mrpt::optional_ref< mrpt::math::CMatrixDouble36 > out_jacobian_df_dpose=std::nullopt, mrpt::optional_ref< mrpt::math::CMatrixDouble36 > out_jacobian_df_dse3=std::nullopt, bool use_small_rot_approx=false) const
An alternative, slightly more efficient way of doing with G and L being 3D points and P this 6D pose...
void params_deserialize(mrpt::serialization::CArchive &in)
void setLineByIndex(size_t index, const mrpt::math::TSegment3D &segm)
Sets a specific line in the set, given its index.
void renderUpdateBuffers() const override
Called whenever m_outdatedBuffers is true: used to re-generate OpenGL vertex buffers,...
void render(const RenderContext &rc) const override
Implements the rendering of 3D objects in each class derived from CRenderizable.
void keep_max(T &var, const K test_val)
If the second argument is above the first one, set the first argument to this higher value.
void keep_min(T &var, const K test_val)
If the second argument is below the first one, set the first argument to this lower value.
3D segment, consisting of two points.
Context for calls to render()
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
To be added to all CSerializable-classes implementation files.
void render(const RenderContext &rc) const override
Implements the rendering of 3D objects in each class derived from CRenderizable.
mrpt::opengl::shader_id_t shader_id
Template for column vectors of dynamic size, compatible with Eigen.
void onUpdateBuffers_Points() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
size_type size() const
Get a 2-vector with [NROWS NCOLS] (as in MATLAB command size(x))
void params_serialize(mrpt::serialization::CArchive &out) const
This base provides a set of functions for maths stuff.
std::vector< mrpt::math::TPoint3Df > m_vertex_buffer_data
void getLineByIndex(size_t index, double &x0, double &y0, double &z0, double &x1, double &y1, double &z1) const
Gets a specific line in the set, given its index.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
void writeToStreamRender(mrpt::serialization::CArchive &out) const
void renderUpdateBuffers() const override
Called whenever m_outdatedBuffers is true: used to re-generate OpenGL vertex buffers,...
std::vector< mrpt::img::TColor > m_color_buffer_data
The namespace for 3D scene representation and rendering.
static constexpr shader_id_t POINTS
void onUpdateBuffers_Wireframe() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
void setVerticesPointSize(const float size_points)
Enable showing vertices as dots if size_points>0.
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Fri Jul 17 08:43:33 UTC 2020 | |