SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Member Functions | List of all members
smtk::model::PointLocatorExtension Class Referenceabstract

A base class for extensions that provide point-locators for finding nearest points on tessellations of model entities. More...

#include <PointLocatorExtension.h>

Inheritance diagram for smtk::model::PointLocatorExtension:
[legend]
Collaboration diagram for smtk::model::PointLocatorExtension:
[legend]

Public Member Functions

 smtkTypeMacro (PointLocatorExtension)
 
 smtkSuperclassMacro (smtk::common::Extension)
 
 smtkSharedFromThisMacro (smtk::common::Extension)
 
virtual bool closestPointOn (const EntityRef &entity, std::vector< double > &closestPoints, const std::vector< double > &sourcePoints, bool snapToPoint)=0
 Overwrites closestPoints with points on entity closest to sourcePoints. More...
 
virtual bool randomPoint (const EntityRef &entity, std::size_t nPoints, std::vector< double > &points, std::size_t seed)=0
 Generate nPoints random points on entity and store the results in points. More...
 
bool randomPoint (const EntityRef &entity, std::size_t nPoints, std::vector< double > &points)
 Same as above, but seeded with a hardware-supplied random integer.
 
- Public Member Functions inherited from smtk::common::Extension
 smtkTypeMacroBase (Extension)
 

Additional Inherited Members

- Static Public Member Functions inherited from smtk::common::Extension
static bool registerExtension (const std::string &name, std::function< Extension::Ptr(void)> ctor, bool oneShot=true)
 Register an extension with a unique name. More...
 
static bool unregisterExtension (const std::string &name)
 Remove an extension from the registry.
 
static void visitAll (std::function< std::pair< bool, bool >(const std::string &, Extension::Ptr)> visitor)
 Call the given function on each registered extension. More...
 
template<typename T >
static void visit (std::function< std::pair< bool, bool >(const std::string &, T)> visitor)
 Iterate over all the extensions that are subclasses of the given type. More...
 
static Extension::Ptr find (const std::string &name, bool removeOneShot=true)
 Find an extension given a specific name.
 
template<typename T >
static T::Ptr findAs (const std::string &name)
 Find the first extension with a given name and type.
 

Detailed Description

A base class for extensions that provide point-locators for finding nearest points on tessellations of model entities.

Member Function Documentation

◆ closestPointOn()

virtual bool smtk::model::PointLocatorExtension::closestPointOn ( const EntityRef entity,
std::vector< double > &  closestPoints,
const std::vector< double > &  sourcePoints,
bool  snapToPoint 
)
pure virtual

Overwrites closestPoints with points on entity closest to sourcePoints.

If snapToPoint, the nearest point explicitly defined in the entity is returned. Otherwise, the nearest point on the entity's surface is returned.

Implemented in smtk::extension::vtk::source::ModelEntityPointLocator, and smtk::mesh::moab::ModelEntityPointLocator.

◆ randomPoint()

virtual bool smtk::model::PointLocatorExtension::randomPoint ( const EntityRef entity,
std::size_t  nPoints,
std::vector< double > &  points,
std::size_t  seed 
)
pure virtual

Generate nPoints random points on entity and store the results in points.

Return true if successful.

Implemented in smtk::mesh::moab::ModelEntityPointLocator, and smtk::extension::vtk::source::ModelEntityPointLocator.


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