Main MRPT website > C++ reference
MRPT logo
Public Member Functions | Protected Member Functions
mrpt::slam::CSimplePointsMap Class Reference

Detailed Description

A cloud of points in 2D or 3D, which can be built from a sequence of laser scans.

This class only stores the coordinates (x,y,z) of each point.

See mrpt::slam::CPointsMap and derived classes for other point cloud classes.

See also:
CMetricMap, CWeightedPointsMap, CPoint, mrpt::utils::CSerializable

#include <mrpt/slam/CSimplePointsMap.h>

Inheritance diagram for mrpt::slam::CSimplePointsMap:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CSimplePointsMap ()
 Default constructor.
virtual ~CSimplePointsMap ()
 Destructor.
virtual const CSimplePointsMap * getAsSimplePointsMap () const
 If the map is a simple points map or it's a multi-metric map that contains EXACTLY one simple points map, return it.
virtual CSimplePointsMap * getAsSimplePointsMap ()

Protected Member Functions

virtual void internal_clear ()
 Clear the map, erasing all the points.
PLY Import virtual methods to implement in base classes
virtual void PLY_import_set_vertex_count (const size_t N)
 In a base class, reserve memory to prepare subsequent calls to PLY_import_set_vertex.

RTTI stuff

typedef CSimplePointsMapPtr SmartPtr
static mrpt::utils::CLASSINIT _init_CSimplePointsMap
static mrpt::utils::TRuntimeClassId classCSimplePointsMap
static const
mrpt::utils::TRuntimeClassId * 
classinfo
static const
mrpt::utils::TRuntimeClassId * 
_GetBaseClass ()
virtual const
mrpt::utils::TRuntimeClassId * 
GetRuntimeClass () const
 Returns information about the class of an object in runtime.
virtual mrpt::utils::CObject * duplicate () const
 Returns a copy of the object, indepently of its class.
static mrpt::utils::CObject * CreateObject ()
static CSimplePointsMapPtr Create ()

Pure virtual interfaces to be implemented by any class derived from CPointsMap

struct detail::loadFromRangeImpl
struct detail::pointmap_traits
virtual void reserve (size_t newLength)
 Reserves memory for a given number of points: the size of the map does not change, it only reserves the memory.
virtual void resize (size_t newLength)
 Resizes all point buffers so they can hold the given number of points: newly created points are set to default values, and old contents are not changed.
virtual void setSize (size_t newLength)
 Resizes all point buffers so they can hold the given number of points, *erasing* all previous contents and leaving all points to default values.
virtual void setPointFast (size_t index, float x, float y, float z)
 Changes the coordinates of the given point (0-based index), *without* checking for out-of-bounds and *without* calling mark_as_modified()
virtual void insertPointFast (float x, float y, float z=0)
 The virtual method for insertPoint() *without* calling mark_as_modified()
virtual void copyFrom (const CPointsMap &obj)
 Virtual assignment operator, to be implemented in derived classes.
virtual void getPointAllFieldsFast (const size_t index, std::vector< float > &point_data) const
 Get all the data fields for one point as a vector: [X Y Z] Unlike getPointAllFields(), this method does not check for index out of bounds.
virtual void setPointAllFieldsFast (const size_t index, const std::vector< float > &point_data)
 Set all the data fields for one point as a vector: [X Y Z] Unlike setPointAllFields(), this method does not check for index out of bounds.
virtual void loadFromRangeScan (const CObservation2DRangeScan &rangeScan, const CPose3D *robotPose=NULL)
 See CPointsMap::loadFromRangeScan()
virtual void loadFromRangeScan (const CObservation3DRangeScan &rangeScan, const CPose3D *robotPose=NULL)
 See CPointsMap::loadFromRangeScan()
virtual void addFrom_classSpecific (const CPointsMap &anotherMap, const size_t nPreviousPoints)
 Auxiliary method called from within addFrom() automatically, to finish the copying of class-specific data.

Member Typedef Documentation

A typedef for the associated smart pointer

Definition at line 57 of file CSimplePointsMap.h.


Constructor & Destructor Documentation

mrpt::slam::CSimplePointsMap::CSimplePointsMap ( )

Default constructor.

virtual mrpt::slam::CSimplePointsMap::~CSimplePointsMap ( ) [virtual]

Destructor.


Member Function Documentation

static const mrpt::utils::TRuntimeClassId* mrpt::slam::CSimplePointsMap::_GetBaseClass ( ) [static, protected]

Reimplemented from mrpt::slam::CPointsMap.

virtual void mrpt::slam::CSimplePointsMap::addFrom_classSpecific ( const CPointsMap &  anotherMap,
const size_t  nPreviousPoints 
) [inline, protected, virtual]

Auxiliary method called from within addFrom() automatically, to finish the copying of class-specific data.

Implements mrpt::slam::CPointsMap.

Definition at line 131 of file CSimplePointsMap.h.

virtual void mrpt::slam::CSimplePointsMap::copyFrom ( const CPointsMap &  obj) [virtual]

Virtual assignment operator, to be implemented in derived classes.

Implements mrpt::slam::CPointsMap.

static CSimplePointsMapPtr mrpt::slam::CSimplePointsMap::Create ( ) [static]
static mrpt::utils::CObject* mrpt::slam::CSimplePointsMap::CreateObject ( ) [static]
virtual mrpt::utils::CObject* mrpt::slam::CSimplePointsMap::duplicate ( ) const [virtual]

Returns a copy of the object, indepently of its class.

Implements mrpt::utils::CObject.

virtual const CSimplePointsMap* mrpt::slam::CSimplePointsMap::getAsSimplePointsMap ( ) const [inline, virtual]

If the map is a simple points map or it's a multi-metric map that contains EXACTLY one simple points map, return it.

Otherwise, return NULL

Reimplemented from mrpt::slam::CPointsMap.

Definition at line 149 of file CSimplePointsMap.h.

virtual CSimplePointsMap* mrpt::slam::CSimplePointsMap::getAsSimplePointsMap ( ) [inline, virtual]

Reimplemented from mrpt::slam::CPointsMap.

Definition at line 150 of file CSimplePointsMap.h.

virtual void mrpt::slam::CSimplePointsMap::getPointAllFieldsFast ( const size_t  index,
std::vector< float > &  point_data 
) const [inline, virtual]

Get all the data fields for one point as a vector: [X Y Z] Unlike getPointAllFields(), this method does not check for index out of bounds.

See also:
getPointAllFields, setPointAllFields, setPointAllFieldsFast

Implements mrpt::slam::CPointsMap.

Definition at line 99 of file CSimplePointsMap.h.

virtual const mrpt::utils::TRuntimeClassId* mrpt::slam::CSimplePointsMap::GetRuntimeClass ( ) const [virtual]

Returns information about the class of an object in runtime.

Reimplemented from mrpt::slam::CPointsMap.

virtual void mrpt::slam::CSimplePointsMap::insertPointFast ( float  x,
float  y,
float  z = 0 
) [virtual]

The virtual method for insertPoint() *without* calling mark_as_modified()

Implements mrpt::slam::CPointsMap.

virtual void mrpt::slam::CSimplePointsMap::internal_clear ( ) [protected, virtual]

Clear the map, erasing all the points.

Implements mrpt::slam::CMetricMap.

virtual void mrpt::slam::CSimplePointsMap::loadFromRangeScan ( const CObservation2DRangeScan &  rangeScan,
const CPose3D *  robotPose = NULL 
) [virtual]
virtual void mrpt::slam::CSimplePointsMap::loadFromRangeScan ( const CObservation3DRangeScan &  rangeScan,
const CPose3D *  robotPose = NULL 
) [virtual]
virtual void mrpt::slam::CSimplePointsMap::PLY_import_set_vertex_count ( const size_t  N) [protected, virtual]

In a base class, reserve memory to prepare subsequent calls to PLY_import_set_vertex.

Implements mrpt::utils::PLY_Importer.

virtual void mrpt::slam::CSimplePointsMap::reserve ( size_t  newLength) [virtual]

Reserves memory for a given number of points: the size of the map does not change, it only reserves the memory.

This is useful for situations where it is approximately known the final size of the map. This method is more efficient than constantly increasing the size of the buffers. Refer to the STL C++ library's "reserve" methods.

Implements mrpt::slam::CPointsMap.

virtual void mrpt::slam::CSimplePointsMap::resize ( size_t  newLength) [virtual]

Resizes all point buffers so they can hold the given number of points: newly created points are set to default values, and old contents are not changed.

See also:
reserve, setPoint, setPointFast, setSize

Implements mrpt::slam::CPointsMap.

virtual void mrpt::slam::CSimplePointsMap::setPointAllFieldsFast ( const size_t  index,
const std::vector< float > &  point_data 
) [inline, virtual]

Set all the data fields for one point as a vector: [X Y Z] Unlike setPointAllFields(), this method does not check for index out of bounds.

See also:
setPointAllFields, getPointAllFields, getPointAllFieldsFast

Implements mrpt::slam::CPointsMap.

Definition at line 110 of file CSimplePointsMap.h.

References ASSERTDEB_, and Eigen::internal::y.

virtual void mrpt::slam::CSimplePointsMap::setPointFast ( size_t  index,
float  x,
float  y,
float  z 
) [virtual]

Changes the coordinates of the given point (0-based index), *without* checking for out-of-bounds and *without* calling mark_as_modified()

See also:
setPoint

Implements mrpt::slam::CPointsMap.

virtual void mrpt::slam::CSimplePointsMap::setSize ( size_t  newLength) [virtual]

Resizes all point buffers so they can hold the given number of points, *erasing* all previous contents and leaving all points to default values.

See also:
reserve, setPoint, setPointFast, setSize

Implements mrpt::slam::CPointsMap.


Friends And Related Function Documentation

friend struct detail::loadFromRangeImpl [friend]

Reimplemented from mrpt::slam::CPointsMap.

Definition at line 136 of file CSimplePointsMap.h.

friend struct detail::pointmap_traits [friend]

Reimplemented from mrpt::slam::CPointsMap.

Definition at line 137 of file CSimplePointsMap.h.


Member Data Documentation

Definition at line 57 of file CSimplePointsMap.h.

Definition at line 57 of file CSimplePointsMap.h.

Definition at line 57 of file CSimplePointsMap.h.




Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Sun Oct 16 12:16:33 UTC 2011