41 out.WriteBufferFixEndianness<
double>(
42 (
double*)&TPolygon2D::operator[](0), 2 *
n);
69 TPolygon2D::resize(
n);
72 for (i = 0; i <
n; i++)
77 for (i = 0; i <
n; i++)
92 in >>
n >> dumm >> dumm >> dumm >> dumm >> dumm >> dumm;
95 TPolygon2D::resize(
n);
98 for (
size_t i = 0; i <
n; i++)
103 for (
size_t i = 0; i <
n; i++)
118 TPolygon2D::resize(
n);
122 in.ReadBufferFixEndianness<
double>(
123 (
double*)&TPolygon2D::operator[](0), 2 *
n);
135 const std::vector<double>&
x,
const std::vector<double>&
y)
138 setAllVertices(
x.size(), &
x[0], &
y[0]);
145 size_t nVertices,
const double* xs,
const double* ys)
148 TPolygon2D::resize(nVertices);
149 for (
size_t i = 0; i < nVertices; i++)
160 size_t nVertices,
const float* xs,
const float* ys)
163 TPolygon2D::resize(nVertices);
164 for (
size_t i = 0; i < nVertices; i++)
172 std::vector<double>&
x, std::vector<double>&
y)
const 178 for (
size_t i = 0; i <
n; i++)
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
The virtual base class which provides a unified interface for all persistent objects in MRPT...
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
void setAllVertices(const std::vector< double > &x, const std::vector< double > &y)
Set all vertices at once.
A wrapper of a TPolygon2D class, implementing CSerializable.
void getAllVertices(std::vector< double > &x, std::vector< double > &y) const
Get all vertices at once.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
This base provides a set of functions for maths stuff.
void readFromStream(mrpt::utils::CStream &in, int version) override
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly...
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
VALUE & operator[](const KEY &key)
Write/read via [i] operator, that creates an element if it didn't exist already.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
unsigned __int32 uint32_t