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

Class to generate points on the surface of a mesh. More...

#include <SurgSim/Particles/RandomMeshPointGenerator.h>

Inheritance diagram for SurgSim::Particles::RandomMeshPointGenerator:
SurgSim::Particles::PointGenerator

Public Member Functions

Math::Vector3d pointInShape (std::shared_ptr< Math::Shape > shape) override
 
Math::Vector3d pointOnShape (std::shared_ptr< Math::Shape > shape) override
 
- Public Member Functions inherited from SurgSim::Particles::PointGenerator
 PointGenerator ()
 Constructor. More...
 
virtual ~PointGenerator ()
 Destructor. More...
 
virtual SurgSim::Math::Vector3d pointInShape (std::shared_ptr< SurgSim::Math::Shape > shape)=0
 Generates one point inside the given shape. More...
 
virtual SurgSim::Math::Vector3d pointOnShape (std::shared_ptr< SurgSim::Math::Shape > shape)=0
 Generates one point on the surface of the given shape. 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 on the surface of a mesh.

Note
Each triangle in the mesh has equal weight in the distribution of points. As a result, areas with higher triangle density have a higher likely hood of generating points than areas with a lower triangle density.

Member Function Documentation

§ pointInShape()

Math::Vector3d SurgSim::Particles::RandomMeshPointGenerator::pointInShape ( std::shared_ptr< Math::Shape shape)
override

§ pointOnShape()

Math::Vector3d SurgSim::Particles::RandomMeshPointGenerator::pointOnShape ( std::shared_ptr< Math::Shape shape)
override

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