SurgSim::Particles::RandomSpherePointGenerator Class Reference

Class to generate points inside or on the surface of a sphere. More...

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

Inheritance diagram for SurgSim::Particles::RandomSpherePointGenerator:

## Public Member Functions

virtual | ~RandomSpherePointGenerator ()
| Destructor. 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...

## 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

Class to generate points inside or on the surface of a sphere.

## Constructor & Destructor Documentation

## ~RandomSpherePointGenerator()

SurgSim::Particles::RandomSpherePointGenerator::~RandomSpherePointGenerator | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## pointInShape()

Vector3d SurgSim::Particles::RandomSpherePointGenerator::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()

Vector3d SurgSim::Particles::RandomSpherePointGenerator::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.

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

- SurgSim/Particles/RandomSpherePointGenerator.h
- SurgSim/Particles/RandomSpherePointGenerator.cpp