Solar
Public Member Functions | Friends | List of all members
SolAR::datastructure::PointCloud Class Reference

A 3D cloud composed of multiple cloud points. This class provides a point cloud. More...

#include <PointCloud.h>

Inheritance diagram for SolAR::datastructure::PointCloud:
Inheritance graph
[legend]
Collaboration diagram for SolAR::datastructure::PointCloud:
Collaboration graph
[legend]

Public Member Functions

 PointCloud ()
 PointCloud constructor.
 
 PointCloud (const PointCloud &other)
 
PointCloudoperator= (const PointCloud &other)
 
 ~PointCloud ()=default
 ~PointCloud
 
FrameworkReturnCode addPoint (const SRef< SolAR::datastructure::CloudPoint > point)
 This method allow to add a 3D point to the point cloud. More...
 
FrameworkReturnCode addPoints (const std::vector< SRef< SolAR::datastructure::CloudPoint > > &points)
 This method allow to add a vector of 3D points to the point cloud. More...
 
FrameworkReturnCode addPoint (const SolAR::datastructure::CloudPoint &point)
 This method allow to add a 3D point to the point cloud. More...
 
FrameworkReturnCode addPoints (const std::vector< SolAR::datastructure::CloudPoint > &points)
 This method allow to add a vector of 3D points to the point cloud. More...
 
FrameworkReturnCode getPoint (const uint32_t id, SRef< SolAR::datastructure::CloudPoint > &point) const
 This method allows to get a 3D point stored in the point cloud by its id. More...
 
FrameworkReturnCode getPoints (const std::vector< uint32_t > &ids, std::vector< SRef< SolAR::datastructure::CloudPoint > > &points) const
 This method allows to get a set of 3D points stored in the point cloud by their ids. More...
 
FrameworkReturnCode getAllPoints (std::vector< SRef< SolAR::datastructure::CloudPoint > > &points) const
 This method allows to get all 3D points stored in the point cloud. More...
 
FrameworkReturnCode suppressPoint (const uint32_t id)
 This method allow to suppress a point stored in the point cloud by its id. More...
 
FrameworkReturnCode suppressPoints (const std::vector< uint32_t > &ids)
 This method allow to suppress a vector of points stored in the point cloud by their ids. More...
 
bool isExistPoint (const uint32_t id) const
 This method allows to know if a point is already stored in the component. More...
 
int getNbPoints () const
 This method allows to get the number of points stored in the point cloud. More...
 
SolAR::datastructure::DescriptorType getDescriptorType () const
 This method allows to get the descriptor type used to extract descriptor for each cloud point. More...
 
FrameworkReturnCode setDescriptorType (const SolAR::datastructure::DescriptorType &type)
 This method allows to set the descriptor type used to extract descriptor for each cloud point. More...
 
template<typename Archive >
void serialize (Archive &ar, ATTRIBUTE(maybe_unused) const unsigned int version)
 
- Public Member Functions inherited from SolAR::datastructure::Lockable
 Lockable ()=default
 LockableCollection constructor.
 
std::unique_lock< std::mutex > acquireLock ()
 This method returns the point cloud. More...
 
void lock ()
 
void unlock ()
 
bool tryLock ()
 

Friends

class boost::serialization::access
 

Detailed Description

A 3D cloud composed of multiple cloud points. This class provides a point cloud.

Member Function Documentation

◆ addPoint() [1/2]

FrameworkReturnCode SolAR::datastructure::PointCloud::addPoint ( const SolAR::datastructure::CloudPoint point)

This method allow to add a 3D point to the point cloud.

Parameters
[in]pointthe 3D point to add to the persistent point cloud
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ addPoint() [2/2]

FrameworkReturnCode SolAR::datastructure::PointCloud::addPoint ( const SRef< SolAR::datastructure::CloudPoint point)

This method allow to add a 3D point to the point cloud.

Parameters
[in]pointthe 3D point to add to the persistent point cloud
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ addPoints() [1/2]

FrameworkReturnCode SolAR::datastructure::PointCloud::addPoints ( const std::vector< SolAR::datastructure::CloudPoint > &  points)

This method allow to add a vector of 3D points to the point cloud.

Parameters
[in]avector of the 3D points to add to the persistent point cloud
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ addPoints() [2/2]

FrameworkReturnCode SolAR::datastructure::PointCloud::addPoints ( const std::vector< SRef< SolAR::datastructure::CloudPoint > > &  points)

This method allow to add a vector of 3D points to the point cloud.

Parameters
[in]avector of the 3D points to add to the persistent point cloud
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ getAllPoints()

FrameworkReturnCode SolAR::datastructure::PointCloud::getAllPoints ( std::vector< SRef< SolAR::datastructure::CloudPoint > > &  points) const

This method allows to get all 3D points stored in the point cloud.

Parameters
[out]theset of 3D point stored in the point cloud
Returns
FrameworkReturnCode::SUCCESS if succeed, else FrameworkReturnCode::_ERROR.

◆ getDescriptorType()

DescriptorType SolAR::datastructure::PointCloud::getDescriptorType ( ) const

This method allows to get the descriptor type used to extract descriptor for each cloud point.

Returns
Descriptor type

◆ getNbPoints()

int SolAR::datastructure::PointCloud::getNbPoints ( ) const

This method allows to get the number of points stored in the point cloud.

Returns
The number of points

◆ getPoint()

FrameworkReturnCode SolAR::datastructure::PointCloud::getPoint ( const uint32_t  id,
SRef< SolAR::datastructure::CloudPoint > &  point 
) const

This method allows to get a 3D point stored in the point cloud by its id.

Parameters
[in]idof the point to get
[out]a3D point stored in the point cloud
Returns
FrameworkReturnCode::SUCCESS if succeed, else FrameworkReturnCode::_ERROR.

◆ getPoints()

FrameworkReturnCode SolAR::datastructure::PointCloud::getPoints ( const std::vector< uint32_t > &  ids,
std::vector< SRef< SolAR::datastructure::CloudPoint > > &  points 
) const

This method allows to get a set of 3D points stored in the point cloud by their ids.

Parameters
[in]avector of ids of the points to get
[out]avector of 3D points stored in the point cloud
Returns
FrameworkReturnCode::SUCCESS if succeed, else FrameworkReturnCode::_ERROR.

◆ isExistPoint()

bool SolAR::datastructure::PointCloud::isExistPoint ( const uint32_t  id) const

This method allows to know if a point is already stored in the component.

Parameters
[in]Idof this point
Returns
true if exist, else false

◆ setDescriptorType()

FrameworkReturnCode SolAR::datastructure::PointCloud::setDescriptorType ( const SolAR::datastructure::DescriptorType &  type)

This method allows to set the descriptor type used to extract descriptor for each cloud point.

Parameters
[in]typethe descriptor type
Returns
FrameworkReturnCode::SUCCESS if succeed, else FrameworkReturnCode::_ERROR.

◆ suppressPoint()

FrameworkReturnCode SolAR::datastructure::PointCloud::suppressPoint ( const uint32_t  id)

This method allow to suppress a point stored in the point cloud by its id.

Parameters
[in]idof the point to suppress
Returns
FrameworkReturnCode::SUCCESS if the suppression succeed, else FrameworkReturnCode::_ERROR.

◆ suppressPoints()

FrameworkReturnCode SolAR::datastructure::PointCloud::suppressPoints ( const std::vector< uint32_t > &  ids)

This method allow to suppress a vector of points stored in the point cloud by their ids.

Parameters
[in]idsthe vector of ids of the point to suppress
Returns
FrameworkReturnCode::SUCCESS if the suppression succeed, else FrameworkReturnCode::_ERROR.

The documentation for this class was generated from the following files: