Point Cloud Library (PCL)  1.9.1-dev
List of all members | Public Types | Public Member Functions
pcl::common::CloudGenerator< PointT, GeneratorT > Class Template Reference

#include <pcl/common/generate.h>

Public Types

typedef GeneratorT::Parameters GeneratorParameters
 

Public Member Functions

 CloudGenerator ()
 Default constructor. More...
 
 CloudGenerator (const GeneratorParameters &params)
 Constructor with single generator to ensure all X, Y and Z values are within same range. More...
 
 CloudGenerator (const GeneratorParameters &x_params, const GeneratorParameters &y_params, const GeneratorParameters &z_params)
 Constructor with independent generators per axis. More...
 
void setParameters (const GeneratorParameters &params)
 Set parameters for x, y and z values. More...
 
void setParametersForX (const GeneratorParameters &x_params)
 Set parameters for x values generation. More...
 
void setParametersForY (const GeneratorParameters &y_params)
 Set parameters for y values generation. More...
 
void setParametersForZ (const GeneratorParameters &z_params)
 Set parameters for z values generation. More...
 
const GeneratorParametersgetParametersForX () const
 
const GeneratorParametersgetParametersForY () const
 
const GeneratorParametersgetParametersForZ () const
 
PointT get ()
 
int fill (pcl::PointCloud< PointT > &cloud)
 Generates a cloud with X Y Z picked within given ranges. More...
 
int fill (int width, int height, pcl::PointCloud< PointT > &cloud)
 Generates a cloud of specified dimensions with X Y Z picked within given ranges. More...
 

Detailed Description

template<typename PointT, typename GeneratorT>
class pcl::common::CloudGenerator< PointT, GeneratorT >

Definition at line 58 of file generate.h.

Member Typedef Documentation

template<typename PointT , typename GeneratorT >
typedef GeneratorT::Parameters pcl::common::CloudGenerator< PointT, GeneratorT >::GeneratorParameters

Definition at line 61 of file generate.h.

Constructor & Destructor Documentation

template<typename PointT , typename GeneratorT >
pcl::common::CloudGenerator< PointT, GeneratorT >::CloudGenerator ( )

Default constructor.

Definition at line 47 of file generate.hpp.

template<typename PointT , typename GeneratorT >
pcl::common::CloudGenerator< PointT, GeneratorT >::CloudGenerator ( const GeneratorParameters params)

Constructor with single generator to ensure all X, Y and Z values are within same range.

Parameters
paramsparameters for X, Y and Z values generation. Uniqueness is ensured through seed incrementation

Definition at line 55 of file generate.hpp.

References pcl::common::CloudGenerator< PointT, GeneratorT >::setParameters().

template<typename PointT , typename GeneratorT >
pcl::common::CloudGenerator< PointT, GeneratorT >::CloudGenerator ( const GeneratorParameters x_params,
const GeneratorParameters y_params,
const GeneratorParameters z_params 
)

Constructor with independent generators per axis.

Parameters
x_paramsparameters for x values generation
y_paramsparameters for y values generation
z_paramsparameters for z values generation

Definition at line 63 of file generate.hpp.

Member Function Documentation

template<typename PointT , typename GeneratorT >
int pcl::common::CloudGenerator< PointT, GeneratorT >::fill ( pcl::PointCloud< PointT > &  cloud)

Generates a cloud with X Y Z picked within given ranges.

This function assumes that cloud is properly defined else it raises errors and does nothing.

Parameters
[out]cloudcloud to generate coordinates for
Returns
0 if generation went well else -1.

Definition at line 139 of file generate.hpp.

References pcl::PointCloud< PointT >::height, and pcl::PointCloud< PointT >::width.

Referenced by pcl::common::CloudGenerator< pcl::PointXY, GeneratorT >::fill().

template<typename PointT , typename GeneratorT >
int pcl::common::CloudGenerator< PointT, GeneratorT >::fill ( int  width,
int  height,
pcl::PointCloud< PointT > &  cloud 
)

Generates a cloud of specified dimensions with X Y Z picked within given ranges.

Parameters
[in]widthwidth of generated cloud
[in]heightheight of generated cloud
[out]cloudoutput cloud
Returns
0 if generation went well else -1.

Definition at line 146 of file generate.hpp.

References pcl::PointCloud< PointT >::begin(), pcl::PointCloud< PointT >::empty(), pcl::PointCloud< PointT >::end(), pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::PointCloud< PointT >::resize(), and pcl::PointCloud< PointT >::width.

template<typename PointT , typename GeneratorT >
PointT pcl::common::CloudGenerator< PointT, GeneratorT >::get ( )
Returns
a single random generated point

Definition at line 128 of file generate.hpp.

template<typename PointT , typename GeneratorT >
const pcl::common::CloudGenerator< PointT, GeneratorT >::GeneratorParameters & pcl::common::CloudGenerator< PointT, GeneratorT >::getParametersForX ( ) const
Returns
x values generation parameters

Definition at line 107 of file generate.hpp.

template<typename PointT , typename GeneratorT >
const pcl::common::CloudGenerator< PointT, GeneratorT >::GeneratorParameters & pcl::common::CloudGenerator< PointT, GeneratorT >::getParametersForY ( ) const
Returns
y values generation parameters

Definition at line 114 of file generate.hpp.

template<typename PointT , typename GeneratorT >
const pcl::common::CloudGenerator< PointT, GeneratorT >::GeneratorParameters & pcl::common::CloudGenerator< PointT, GeneratorT >::getParametersForZ ( ) const
Returns
z values generation parameters

Definition at line 121 of file generate.hpp.

template<typename PointT , typename GeneratorT >
void pcl::common::CloudGenerator< PointT, GeneratorT >::setParameters ( const GeneratorParameters params)

Set parameters for x, y and z values.

Uniqueness is ensured through seed incrementation.

Parameters
paramsparameteres for X, Y and Z values generation.

Definition at line 73 of file generate.hpp.

Referenced by pcl::common::CloudGenerator< PointT, GeneratorT >::CloudGenerator(), and pcl::common::CloudGenerator< pcl::PointXY, GeneratorT >::CloudGenerator().

template<typename PointT , typename GeneratorT >
void pcl::common::CloudGenerator< PointT, GeneratorT >::setParametersForX ( const GeneratorParameters x_params)

Set parameters for x values generation.

Parameters
x_paramsparameters for x values generation

Definition at line 86 of file generate.hpp.

template<typename PointT , typename GeneratorT >
void pcl::common::CloudGenerator< PointT, GeneratorT >::setParametersForY ( const GeneratorParameters y_params)

Set parameters for y values generation.

Parameters
y_paramsparameters for y values generation

Definition at line 93 of file generate.hpp.

template<typename PointT , typename GeneratorT >
void pcl::common::CloudGenerator< PointT, GeneratorT >::setParametersForZ ( const GeneratorParameters z_params)

Set parameters for z values generation.

Parameters
z_paramsparameters for z values generation

Definition at line 100 of file generate.hpp.


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