28 #ifndef CWeightedPointsMap_H
29 #define CWeightedPointsMap_H
58 virtual ~CWeightedPointsMap();
68 virtual
void reserve(
size_t newLength);
74 virtual
void resize(
size_t newLength);
80 virtual
void setSize(
size_t newLength);
83 virtual
void setPointFast(
size_t index,
float x,
float y,
float z);
86 virtual
void insertPointFast(
float x,
float y,
float z = 0 );
90 virtual
void copyFrom(const CPointsMap &obj);
96 virtual
void getPointAllFieldsFast( const
size_t index, std::vector<
float> & point_data )
const {
98 point_data[0] = x[index];
99 point_data[1] = y[index];
100 point_data[2] = z[index];
101 point_data[3] = pointWeight[index];
110 x[index] = point_data[0];
111 y[index] = point_data[1];
112 z[index] = point_data[2];
113 pointWeight[index] = point_data[3];
117 virtual void loadFromRangeScan(
119 const CPose3D *robotPose = NULL );
122 virtual void loadFromRangeScan(
124 const CPose3D *robotPose = NULL );
129 virtual void addFrom_classSpecific(
const CPointsMap &anotherMap,
const size_t nPreviousPoints);
132 template <
class Derived>
friend struct detail::loadFromRangeImpl;
133 template <
class Derived>
friend struct detail::pointmap_traits;
141 virtual void setPointWeight(
size_t index,
unsigned long w) { pointWeight[index]=w; }
143 virtual unsigned int getPointWeight(
size_t index)
const {
return pointWeight[index]; }
150 virtual void internal_clear();
156 virtual void PLY_import_set_vertex_count(
const size_t N);
172 static const int HAS_RGB = 0;
173 static const int HAS_RGBf = 0;
174 static const int HAS_RGBu8 = 0;
179 inline size_t size()
const {
return m_obj.size(); }
181 inline void resize(
const size_t N) { m_obj.resize(N); }
184 template <
typename T>
185 inline void getPointXYZ(
const size_t idx, T &x,T &y, T &z)
const {
186 m_obj.getPointFast(idx,x,y,z);
190 m_obj.setPointFast(idx,x,y,z);