25# ifndef __BITPIT_LEVELSET_TPP__
26# define __BITPIT_LEVELSET_TPP__
37template<
typename LevelSetSourceObject>
40 const LevelSetSourceObject *sourceObject = getObjectPtr<LevelSetSourceObject>(sourceId) ;
42 throw std::runtime_error(
"The type of the object does not match the type of the complement object!");
47 return registerObject(std::move(
object));
59template<
typename LevelSetSourceObject>
62 const LevelSetObject *object1 = getObjectPtr<LevelSetSourceObject>(id1) ;
64 throw std::runtime_error(
"The type of the object does not match the type of the boolean object!");
67 const LevelSetObject *object2 = getObjectPtr<LevelSetSourceObject>(id2) ;
69 throw std::runtime_error(
"The type of the object does not match the type of the boolean object!");
74 return registerObject(std::move(
object));
85template<
typename LevelSetSourceObject>
88 std::vector<const LevelSetSourceObject*> objects;
90 const LevelSetSourceObject *
object = getObjectPtr<LevelSetSourceObject>(
id) ;
92 throw std::runtime_error(
"The type of the object does not match the type of the boolean object!");
95 objects.push_back(
object );
100 return registerObject(std::move(
object));
111 return dynamic_cast<T &
>(*m_objects.at(
id)) ;
122 return dynamic_cast<T *
>(m_objects.at(
id).get()) ;
131 std::vector<T *> objects;
132 objects.reserve(m_objects.size());
133 for(
const auto &entry : m_objects){
136 objects.push_back(
object ) ;
Class which deals with boolean operation between two LevelSetObjects.
Class that allows to evaluate the complement of a LevelSetObjects.
Interface class for all objects with respect to whom the levelset function may be computed.
LevelSetObject & getObject(int) const
int addObjectComplement(int, int id=levelSetDefaults::OBJECT)
LevelSetObject * getObjectPtr(int) const
std::vector< LevelSetObject * > getObjectPtrs() const
int addObject(LevelSetBooleanOperation, int, int, int id=levelSetDefaults::OBJECT)