iMSTK
Interactive Medical Simulation Toolkit
|
Manages and generates the CollisionDetectionAlgorithms. More...
#include <imstkCDObjectFactory.h>
Static Public Member Functions | |
static std::shared_ptr< CollisionDetectionAlgorithm > | makeCollisionDetection (const std::string collisionTypeName) |
attempts to create a new CD algorithm More... | |
static std::string | getCDType (const Geometry &obj1, const Geometry &obj2) |
Get the CD type from the types of objects colliding. | |
![]() | |
static std::shared_ptr< CollisionDetectionAlgorithm > | create (const std::string &name, Args &&... args) |
tries to construct the object give name, it will forward the given paramters More... | |
static void | add (const std::string &name, Creator c) |
adds a new creation function to the factory More... | |
static bool | contains (const std::string &name) |
static const std::vector< std::string > | getNames () |
Additional Inherited Members | |
![]() | |
using | BaseType = std::shared_ptr< CollisionDetectionAlgorithm > |
using | Creator = std::function< std::shared_ptr< CollisionDetectionAlgorithm >(Args...)> |
Type of the function to generate a new object. | |
Manages and generates the CollisionDetectionAlgorithms.
The factory is a singleton and can be accessed anywhere. Given a name of a geometry/geometry algorithm this will generate the appropriate object that should be executed. In by default the class name is the name that is used to look up the algorithm. The generation Will fail if the name is not known to the factory
There are multiple ways to register an collision detection algorithm, preferred should be ...
will register the delegate for the class-name of the algorithm, this will satisfy the default mechanism If want to register a custom delegate with more customization you can use
Definition at line 36 of file imstkCDObjectFactory.h.
|
static |
attempts to create a new CD algorithm
collisionTypeName | name of the class to look up |
Definition at line 71 of file imstkCDObjectFactory.cpp.