Go to the documentation of this file.
34 (
double*)&TPolygon2D::operator[](0), 2 *
n);
56 TPolygon2D::resize(
n);
59 for (i = 0; i <
n; i++)
64 for (i = 0; i <
n; i++)
79 in >>
n >> dumm >> dumm >> dumm >> dumm >> dumm >> dumm;
82 TPolygon2D::resize(
n);
85 for (
size_t i = 0; i <
n; i++)
90 for (
size_t i = 0; i <
n; i++)
105 TPolygon2D::resize(
n);
109 in.ReadBufferFixEndianness<
double>(
110 (
double*)&TPolygon2D::operator[](0), 2 *
n);
122 const std::vector<double>&
x,
const std::vector<double>&
y)
125 setAllVertices(
x.size(), &
x[0], &
y[0]);
132 size_t nVertices,
const double* xs,
const double* ys)
135 TPolygon2D::resize(nVertices);
136 for (
size_t i = 0; i < nVertices; i++)
147 size_t nVertices,
const float* xs,
const float* ys)
150 TPolygon2D::resize(nVertices);
151 for (
size_t i = 0; i < nVertices; i++)
159 std::vector<double>&
x, std::vector<double>&
y)
const
165 for (
size_t i = 0; i <
n; i++)
VALUE & operator[](const KEY &key)
Write/read via [i] operator, that creates an element if it didn't exist already.
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define ASSERT_(f)
Defines an assertion mechanism.
Virtual base class for "archives": classes abstracting I/O streams.
#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.
This base provides a set of functions for maths stuff.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
void WriteBufferFixEndianness(const T *ptr, size_t ElementCount)
Writes a sequence of elemental datatypes, taking care of reordering their bytes from the running arch...
void getAllVertices(std::vector< double > &x, std::vector< double > &y) const
Get all vertices at once.
unsigned __int32 uint32_t
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |