SurgSim::Particles::RandomPointGenerator Class Reference

RandomPointGenerator will generate points based on the shape passed. More...

`#include <SurgSim/Particles/RandomPointGenerator.h>`

Inheritance diagram for SurgSim::Particles::RandomPointGenerator:

## Public Member Functions

| RandomPointGenerator ()
| Constructor. More...
SurgSim::Math::Vector3d | pointInShape (std::shared_ptr< SurgSim::Math::Shape > shape) override
| Generates one point inside the given shape. More...
SurgSim::Math::Vector3d | pointOnShape (std::shared_ptr< SurgSim::Math::Shape > shape) override
| Generates one point on the surface of the given shape. More...
Public Member Functions inherited from SurgSim::Particles::PointGenerator
| PointGenerator ()
| Constructor. More...
virtual | ~PointGenerator ()
| Destructor. More...

## Private Attributes

std::array< std::unique_ptr< PointGenerator >, SurgSim::Math::SHAPE_TYPE_COUNT > | m_pointGenerators
| List of point generators. More...

## Additional Inherited Members

Protected Attributes inherited from SurgSim::Particles::PointGenerator
std::mt19937 | m_generator
std::uniform_real_distribution< double > | m_openOneOneDistribution
std::uniform_real_distribution< double > | m_closedOneOneDistribution
std::uniform_real_distribution< double > | m_closedZeroOneDistribution
std::uniform_real_distribution< double > | m_closedZeroOpenOneDistribution

## Detailed Description

RandomPointGenerator will generate points based on the shape passed.

Internally, this class maintains a list of PointGenerators for each supported shape. The list gets populated when RandomPointGenerator is constructed.

See also
  PointGenerator

## Constructor & Destructor Documentation

## RandomPointGenerator()

SurgSim::Particles::RandomPointGenerator::RandomPointGenerator | ( |  | ) |

Constructor.

## Member Function Documentation

## pointInShape()

Math::Vector3d SurgSim::Particles::RandomPointGenerator::pointInShape | ( | std::shared_ptr< SurgSim::Math::Shape > | shape | ) |

override virtual

Generates one point inside the given shape.

Parameters

  shape | The shape inside which a point will be generated.

Returns
  A point inside the shape, shape is assumed to be located at the origin.

Implements SurgSim::Particles::PointGenerator.

## pointOnShape()

Math::Vector3d SurgSim::Particles::RandomPointGenerator::pointOnShape | ( | std::shared_ptr< SurgSim::Math::Shape > | shape | ) |

override virtual

Generates one point on the surface of the given shape.

Parameters

  shape | The shape on which a point will be generated.

Returns
  A point on the surface of the shape, shape is assumed to be located at the origin.

Implements SurgSim::Particles::PointGenerator.

## Member Data Documentation

## m_pointGenerators

std::array<std::unique_ptr<PointGenerator>, SurgSim::Math::SHAPE_TYPE_COUNT> SurgSim::Particles::RandomPointGenerator::m_pointGenerators

private

List of point generators.

Will be populated by constructor.

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

- SurgSim/Particles/RandomPointGenerator.h
- SurgSim/Particles/RandomPointGenerator.cpp