Go to the documentation of this file.
25 float x_min,
float x_max,
float y_min,
float y_max)
42 if (!textureImageHasBeenAssigned())
46 im_rgb.filledRectangle(0, 0, 3, 3, m_color);
50 this->assignImage(std::move(im_rgb), std::move(im_a));
58 t.
vertices[0].xyzrgba.pt = P3f(m_xMin, m_yMin, 0);
59 t.
vertices[1].xyzrgba.pt = P3f(m_xMax, m_yMin, 0);
60 t.
vertices[2].xyzrgba.pt = P3f(m_xMax, m_yMax, 0);
70 t.
vertices[0].xyzrgba.pt = P3f(m_xMin, m_yMin, 0);
71 t.
vertices[1].xyzrgba.pt = P3f(m_xMax, m_yMax, 0);
72 t.
vertices[2].xyzrgba.pt = P3f(m_xMin, m_yMax, 0);
87 writeToStreamRender(
out);
89 out << m_xMin << m_xMax;
90 out << m_yMin << m_yMax;
92 writeToStreamTexturedObject(
out);
106 readFromStreamRender(in);
107 in >> m_xMin >> m_xMax;
108 in >> m_yMin >> m_yMax;
109 readFromStreamTexturedObject(in);
120 if (!polygonUpToDate) updatePoly();
127 poly[0].x = poly[1].x = m_xMin;
128 poly[2].x = poly[3].x = m_xMax;
129 poly[0].y = poly[3].y = m_yMin;
130 poly[1].y = poly[2].y = m_yMax;
131 for (
size_t i = 0; i < 4; i++) poly[i].z = 0;
134 polygonUpToDate =
true;
140 bb_min.x = std::min(m_xMin, m_xMax);
141 bb_min.y = std::min(m_yMin, m_yMax);
144 bb_max.x = std::max(m_xMin, m_xMax);
145 bb_max.y = std::max(m_yMin, m_yMax);
virtual void onUpdateBuffers_TexturedTriangles() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
void notifyChange() const
Call to enable calling renderUpdateBuffers() before the next render() rendering iteration.
The base class of 3D objects that can be directly rendered through OpenGL.
bool traceRay(const mrpt::poses::CPose3D &o, double &dist) const override
Simulation of ray-trace, given a pose.
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
mrpt::vision::TStereoCalibResults out
TPoint3D_< float > TPoint3Df
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A 2D plane in the XY plane with a texture image.
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
#define THROW_EXCEPTION(msg)
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
bool traceRay(const std::vector< TPolygonWithPlane > &vec, const mrpt::math::TPose3D &pose, double &dist)
Fast ray tracing method using polygons' properties.
Virtual base class for "archives": classes abstracting I/O streams.
TPoint2D_< float > TPoint2Df
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
3D polygon, inheriting from std::vector<TPoint3D>
std::vector< mrpt::opengl::TTriangle > m_triangles
List of triangles.
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
To be added to all CSerializable-classes implementation files.
A class for storing images as grayscale or RGB bitmaps.
A triangle (float coordinates) with RGBA colors (u8) and UV (texture coordinates) for each vertex.
std::array< Vertex, 3 > vertices
static math::TPolygon3D tmpPoly(3)
This base provides a set of functions for maths stuff.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
The namespace for 3D scene representation and rendering.
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...
virtual void filledRectangle(int x0, int y0, int x1, int y1, const mrpt::img::TColor color)
Draws a filled rectangle.
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Fri Jul 17 08:43:33 UTC 2020 | |