Fawkes API  Fawkes Development Version
fawkes::pcl_utils::StorageAdapter Class Referenceabstract

Adapter base class. More...

#include <>>

Inheritance diagram for fawkes::pcl_utils::StorageAdapter:

Public Member Functions

virtual ~StorageAdapter ()
 Virtual empty destructor. More...
 
template<typename PointT >
bool is_pointtype () const
 Check if storage adapter is for specified point type. More...
 
template<typename PointT >
PointCloudStorageAdapter< PointT > * as_pointtype ()
 Transform to specific PointCloudStorageAdapter. More...
 
virtual void transform (const std::string &target_frame, const tf::Transformer &transformer)=0
 Transform point cloud. More...
 
virtual void transform (const std::string &target_frame, const Time &target_time, const std::string &fixed_frame, const tf::Transformer &transformer)=0
 Transform point cloud. More...
 
virtual const char * get_typename ()=0
 Get typename of storage adapter. More...
 
virtual StorageAdapterclone () const =0
 Clone this storage adapter. More...
 
virtual size_t point_size () const =0
 Get size of a point. More...
 
virtual unsigned int width () const =0
 Get width of point cloud. More...
 
virtual unsigned int height () const =0
 Get height of point cloud. More...
 
virtual size_t num_points () const =0
 Get numer of points in point cloud. More...
 
virtual void * data_ptr () const =0
 Get pointer on data. More...
 
virtual std::string frame_id () const =0
 Get frame ID of point cloud. More...
 
virtual void get_time (fawkes::Time &time) const =0
 Get last capture time. More...
 

Detailed Description

Adapter base class.

The adapter base class is required to store point clouds of arbitrary point types.

Author
Tim Niemueller

Definition at line 40 of file storage_adapter.h.

Constructor & Destructor Documentation

◆ ~StorageAdapter()

virtual fawkes::pcl_utils::StorageAdapter::~StorageAdapter ( )
inlinevirtual

Member Function Documentation

◆ as_pointtype()

template<typename PointT >
PointCloudStorageAdapter< PointT > * fawkes::pcl_utils::StorageAdapter::as_pointtype ( )

Transform to specific PointCloudStorageAdapter.

Returns
transformed PointCloudStorageAdapter
Exceptions
Exceptionthrown if storage adapter is not of requested point type or does not exist

Definition at line 133 of file storage_adapter.h.

Referenced by ~StorageAdapter().

◆ clone()

StorageAdapter * fawkes::pcl_utils::StorageAdapter::clone ( ) const
pure virtual

◆ data_ptr()

void * fawkes::pcl_utils::StorageAdapter::data_ptr ( ) const
pure virtual

Get pointer on data.

Returns
pointer on data

Implemented in fawkes::pcl_utils::PointCloudStorageAdapter< PointT >.

Referenced by PointCloudAdapter::get_data(), and ~StorageAdapter().

◆ frame_id()

std::string & fawkes::pcl_utils::StorageAdapter::frame_id ( ) const
pure virtual

Get frame ID of point cloud.

Returns
Frame ID of point cloud.

Implemented in fawkes::pcl_utils::PointCloudStorageAdapter< PointT >.

Referenced by PointCloudAdapter::get_data(), and ~StorageAdapter().

◆ get_time()

void fawkes::pcl_utils::StorageAdapter::get_time ( fawkes::Time time) const
pure virtual

Get last capture time.

Parameters
timeupon return contains last capture time

Implemented in fawkes::pcl_utils::PointCloudStorageAdapter< PointT >.

Referenced by fawkes::pcl_utils::PointCloudStorageAdapter< PointT >::frame_id(), PointCloudAdapter::get_data(), and ~StorageAdapter().

◆ get_typename()

const char * fawkes::pcl_utils::StorageAdapter::get_typename ( )
pure virtual

Get typename of storage adapter.

Returns
type name

Implemented in fawkes::pcl_utils::PointCloudStorageAdapter< PointT >.

Referenced by ~StorageAdapter().

◆ height()

unsigned int fawkes::pcl_utils::StorageAdapter::height ( ) const
pure virtual

Get height of point cloud.

Returns
height of point cloud

Implemented in fawkes::pcl_utils::PointCloudStorageAdapter< PointT >.

Referenced by PointCloudAdapter::get_data(), and ~StorageAdapter().

◆ is_pointtype()

template<typename PointT >
bool fawkes::pcl_utils::StorageAdapter::is_pointtype ( ) const

Check if storage adapter is for specified point type.

Returns
true if storage adapter is for specified point type, false otherwise

Definition at line 123 of file storage_adapter.h.

Referenced by ~StorageAdapter().

◆ num_points()

size_t fawkes::pcl_utils::StorageAdapter::num_points ( ) const
pure virtual

Get numer of points in point cloud.

Returns
number of points

Implemented in fawkes::pcl_utils::PointCloudStorageAdapter< PointT >.

Referenced by PointCloudAdapter::get_data(), and ~StorageAdapter().

◆ point_size()

size_t fawkes::pcl_utils::StorageAdapter::point_size ( ) const
pure virtual

Get size of a point.

Returns
size in bytes of a single point

Implemented in fawkes::pcl_utils::PointCloudStorageAdapter< PointT >.

Referenced by PointCloudAdapter::get_data(), and ~StorageAdapter().

◆ transform() [1/2]

void fawkes::pcl_utils::StorageAdapter::transform ( const std::string &  target_frame,
const tf::Transformer transformer 
)
pure virtual

Transform point cloud.

Parameters
target_frameframe to transform to
transformertransformer to get transform from

Implemented in fawkes::pcl_utils::PointCloudStorageAdapter< PointT >.

Referenced by fawkes::pcl_utils::PointCloudStorageAdapter< PointT >::cloud_const_ptr(), and ~StorageAdapter().

◆ transform() [2/2]

void fawkes::pcl_utils::StorageAdapter::transform ( const std::string &  target_frame,
const Time target_time,
const std::string &  fixed_frame,
const tf::Transformer transformer 
)
pure virtual

Transform point cloud.

Parameters
target_frameframe to transform to
target_timetime for which to transform
fixed_frameframe fixed over time
transformertransformer to get transform from

Implemented in fawkes::pcl_utils::PointCloudStorageAdapter< PointT >.

◆ width()

unsigned int fawkes::pcl_utils::StorageAdapter::width ( ) const
pure virtual

Get width of point cloud.

Returns
width of point cloud

Implemented in fawkes::pcl_utils::PointCloudStorageAdapter< PointT >.

Referenced by PointCloudAdapter::get_data(), and ~StorageAdapter().


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