Loading...
Searching...
No Matches
pcl::common::CloudGenerator< PointT, GeneratorT > Class Template Reference

`#include <pcl/common/generate.h>`

## Public Types

using | GeneratorParameters = typename GeneratorT::Parameters

## Public Member Functions

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

## Detailed Description

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

Definition at line 58 of file generate.h.

## Member Typedef Documentation

## GeneratorParameters

template<typename PointT , typename GeneratorT >

using pcl::common::CloudGenerator< PointT, GeneratorT >::GeneratorParameters = typename GeneratorT::Parameters

Definition at line 61 of file generate.h.

## Constructor & Destructor Documentation

## CloudGenerator() [1/3]

template<typename PointT , typename GeneratorT >

pcl::common::CloudGenerator< PointT, GeneratorT >::CloudGenerator | ( |  | ) |

Default constructor.

Definition at line 53 of file generate.hpp.

## CloudGenerator() [2/3]

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

  params | parameters for X, Y and Z values generation. Uniqueness is ensured through seed incrementation

Definition at line 61 of file generate.hpp.

## CloudGenerator() [3/3]

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_params | parameters for x values generation
  y_params | parameters for y values generation
  z_params | parameters for z values generation

Definition at line 68 of file generate.hpp.

## Member Function Documentation

## fill() [1/2]

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] | width | width of generated cloud
  [in] | height | height of generated cloud
  [out] | cloud | output cloud

Returns
  0 if generation went well else -1.

Definition at line 151 of file generate.hpp.

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

## fill() [2/2]

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] | cloud | cloud to generate coordinates for

Returns
  0 if generation went well else -1.

Definition at line 144 of file generate.hpp.

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

## get()

template<typename PointT , typename GeneratorT >

PointT pcl::common::CloudGenerator< PointT, GeneratorT >::get | ( |  | ) |

Returns
  a single random generated point

Definition at line 133 of file generate.hpp.

## getParametersForX()

template<typename PointT , typename GeneratorT >

const CloudGenerator< PointT, GeneratorT >::GeneratorParameters & pcl::common::CloudGenerator< PointT, GeneratorT >::getParametersForX | ( |  | ) | const

Returns
  x values generation parameters

Definition at line 112 of file generate.hpp.

## getParametersForY()

template<typename PointT , typename GeneratorT >

const CloudGenerator< PointT, GeneratorT >::GeneratorParameters & pcl::common::CloudGenerator< PointT, GeneratorT >::getParametersForY | ( |  | ) | const

Returns
  y values generation parameters

Definition at line 119 of file generate.hpp.

## getParametersForZ()

template<typename PointT , typename GeneratorT >

const CloudGenerator< PointT, GeneratorT >::GeneratorParameters & pcl::common::CloudGenerator< PointT, GeneratorT >::getParametersForZ | ( |  | ) | const

Returns
  z values generation parameters

Definition at line 126 of file generate.hpp.

## setParameters()

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

  params | parameters for X, Y and Z values generation.

Definition at line 78 of file generate.hpp.

## setParametersForX()

template<typename PointT , typename GeneratorT >

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

Set parameters for x values generation.

Parameters

  x_params | parameters for x values generation

Definition at line 91 of file generate.hpp.

## setParametersForY()

template<typename PointT , typename GeneratorT >

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

Set parameters for y values generation.

Parameters

  y_params | parameters for y values generation

Definition at line 98 of file generate.hpp.

## setParametersForZ()

template<typename PointT , typename GeneratorT >

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

Set parameters for z values generation.

Parameters

  z_params | parameters for z values generation

Definition at line 105 of file generate.hpp.

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

- pcl/common/generate.h
- pcl/common/impl/generate.hpp