SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
A base class for extensions that provide point-locators for finding nearest points on tessellations of model entities. More...
#include <PointLocatorExtension.h>
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. | |
![]() | |
smtkTypeMacroBase (Extension) | |
Additional Inherited Members | |
![]() | |
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. | |
A base class for extensions that provide point-locators for finding nearest points on tessellations of model entities.
|
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.
|
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.