Go to the documentation of this file.
29 uint8_t CSetOfTexturedTriangles::serializeGetVersion()
const {
return 2; }
30 void CSetOfTexturedTriangles::serializeTo(
35 writeToStreamRender(
out);
36 writeToStreamTexturedObject(
out);
38 n = (uint32_t)m_triangles.size();
42 for (uint32_t i = 0; i < n; i++) m_triangles[i].writeTo(
out);
45 void CSetOfTexturedTriangles::serializeFrom(
54 readFromStreamRender(in);
57 readFromStreamTexturedObject(in);
66 m_triangles.resize(n);
68 for (uint32_t i = 0; i < n; i++) m_triangles[i].readFrom(in);
74 CRenderizable::notifyChange();
79 [[maybe_unused]]
double& dist)
const
81 throw std::runtime_error(
82 "TODO: TraceRay not implemented in CSetOfTexturedTriangles");
85 void CSetOfTexturedTriangles::getBoundingBox(
89 std::numeric_limits<double>::max(), std::numeric_limits<double>::max(),
90 std::numeric_limits<double>::max());
92 -std::numeric_limits<double>::max(),
93 -std::numeric_limits<double>::max(),
94 -std::numeric_limits<double>::max());
96 for (
const auto& t : m_triangles)
98 for (
size_t i = 0; i < 3; i++)
TPoint3D_< double > TPoint3D
Lightweight 3D point.
The base class of 3D objects that can be directly rendered through OpenGL.
mrpt::vision::TStereoCalibResults out
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define THROW_EXCEPTION(msg)
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.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
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.
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
To be added to all CSerializable-classes implementation files.
This base provides a set of functions for maths stuff.
A set of textured triangles.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
The namespace for 3D scene representation and rendering.
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Fri Jul 17 08:43:33 UTC 2020 | |