opensurgsim
Public Member Functions | List of all members
SurgSim::Particles::DefaultPointGenerator Class Reference

DefaultPointGenerator, methods of this class will always return (0.0, 0.0, 0.0) and output a severe logging message. More...

#include <DefaultPointGenerator.h>

Inheritance diagram for SurgSim::Particles::DefaultPointGenerator:
SurgSim::Particles::PointGenerator

Public Member Functions

virtual ~DefaultPointGenerator ()
 Destructor.
 
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.
 
virtual ~PointGenerator ()
 Destructor.
 
void seed (unsigned int val)
 Set the seed to the given value. 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

DefaultPointGenerator, methods of this class will always return (0.0, 0.0, 0.0) and output a severe logging message.

They are served more like a place holder (concrete implementation) to be used in ShapesPointGenerator. One should develop an actual XXXPointGenerator to produce points in/on the shape.

Member Function Documentation

§ pointInShape()

Vector3d SurgSim::Particles::DefaultPointGenerator::pointInShape ( std::shared_ptr< SurgSim::Math::Shape shape)
overridevirtual

Generates one point inside the given shape.

Parameters
shapeThe 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::DefaultPointGenerator::pointOnShape ( std::shared_ptr< SurgSim::Math::Shape shape)
overridevirtual

Generates one point on the surface of the given shape.

Parameters
shapeThe 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: