25# ifndef __BITPIT_LEVELSET_BOOLEAN_OBJECT_HPP__
26# define __BITPIT_LEVELSET_BOOLEAN_OBJECT_HPP__
32# include "levelSetCommon.hpp"
33# include "levelSetProxyObject.hpp"
43template<
typename SourceLevelSetObject>
49 const SourceLevelSetObject *m_object;
58 void update(
const SourceLevelSetObject *
object,
double value) ;
60 const SourceLevelSetObject *
getObject()
const ;
67template<
typename SourceLevelSetObject>
72 std::vector<const SourceLevelSetObject *> m_sourceObjects;
83 void replaceSourceObject(
const SourceLevelSetObject *current,
const SourceLevelSetObject *updated)
override ;
88 double _evalCellValue(
long id,
bool signedLevelSet)
const override;
89 std::array<double,3>
_evalCellGradient(
long id,
bool signedLevelSet)
const override;
91 double _evalValue(
const std::array<double,3> &point,
bool signedLevelSet)
const override;
92 std::array<double,3>
_evalGradient(
const std::array<double,3> &point,
bool signedLevelSet)
const override;
95 bool empty()
const override;
99 const SourceLevelSetObject *
getReferenceObject(
const std::array<double,3> &point)
const override;
101 std::vector<const SourceLevelSetObject *>
getSourceObjects()
const override;
104 template<
typename data_t,
typename function_t>
105 data_t
_evalCellFunction(
long id,
bool signedLevelSet,
const function_t &function)
const;
107 template<
typename data_t,
typename function_t>
108 data_t
_evalFunction(
const std::array<double,3> &point,
bool signedLevelSet,
const function_t &function)
const;
112template<
typename SourceLevelSetObject>
Base class which deals with boolean operation between two LevelSetObjects.
std::vector< const SourceLevelSetObject * > getSourceObjects() const override
std::array< double, 3 > _evalGradient(const std::array< double, 3 > &point, bool signedLevelSet) const override
const SourceLevelSetObject * getCellReferenceObject(long id) const override
bool empty() const override
double _evalValue(const std::array< double, 3 > &point, bool signedLevelSet) const override
std::array< double, 3 > _evalCellGradient(long id, bool signedLevelSet) const override
LevelSetBooleanBaseObject(int, LevelSetBooleanOperation, const SourceLevelSetObject *, const SourceLevelSetObject *)
const SourceLevelSetObject * getReferenceObject(const std::array< double, 3 > &point) const override
data_t _evalCellFunction(long id, bool signedLevelSet, const function_t &function) const
short _evalCellSign(long id) const override
double _evalCellValue(long id, bool signedLevelSet) const override
data_t _evalFunction(const std::array< double, 3 > &point, bool signedLevelSet, const function_t &function) const
void fillCellPropagatedSignCache() override
void replaceSourceObject(const SourceLevelSetObject *current, const SourceLevelSetObject *updated) override
Class which deals with boolean operation between two LevelSetObjects.
Allow to evaluate the result of a boolean operation between two LevelSetObjects.
void update(const SourceLevelSetObject *object, double value)
LevelSetBooleanResult(LevelSetBooleanOperation operation)
const SourceLevelSetObject * getObject() const
int getObjectSign() const
Interface class for all objects with respect to whom the levelset function may be computed.
Interface class for all objects, which depend on other LevelSetObjects.