ViennaLS
Loading...
Searching...
No Matches
viennals::BooleanOperation< T, D > Class Template Reference

This class is used to perform boolean operations on two level sets and write the resulting level set into the first passed level set. When the boolean operation is set to CUSTOM, a comparator must be set using setBooleanOperationComparator. This comparator returns one value generated from the level set value supplied by each level set. E.g.: for a union, the comparator will always return the smaller of the two values. The function signature for the comparator is defined in the public ComparatorType. More...

#include <lsBooleanOperation.hpp>

Public Types

using ComparatorType = std::pair<T, bool> (*)(const T &, const T &)
 

Public Member Functions

 BooleanOperation ()
 
 BooleanOperation (SmartPointer< Domain< T, D > > passedlsDomain, BooleanOperationEnum passedOperation=BooleanOperationEnum::INVERT)
 
 BooleanOperation (SmartPointer< Domain< T, D > > passedlsDomainA, SmartPointer< Domain< T, D > > passedlsDomainB, BooleanOperationEnum passedOperation=BooleanOperationEnum::INTERSECT)
 
void setLevelSet (SmartPointer< Domain< T, D > > passedlsDomain)
 Set which level set to perform the boolean operation on.
 
void setSecondLevelSet (SmartPointer< Domain< T, D > > passedlsDomain)
 Set the level set which will be used to modify the first level set.
 
void setBooleanOperation (BooleanOperationEnum passedOperation)
 Set which of the operations of BooleanOperationEnum to perform.
 
void setBooleanOperationComparator (ComparatorType passedOperationComp)
 Set the comparator to be used when the BooleanOperation is set to CUSTOM.
 
void setUpdatePointData (bool update)
 Set whether to update the point data stored in the LS during this algorithm. Defaults to true.
 
void setPruneResult (bool pR)
 Set whether the resulting level set should be pruned. Defaults to true.
 
void apply ()
 Perform operation.
 

Detailed Description

template<class T, int D>
class viennals::BooleanOperation< T, D >

This class is used to perform boolean operations on two level sets and write the resulting level set into the first passed level set. When the boolean operation is set to CUSTOM, a comparator must be set using setBooleanOperationComparator. This comparator returns one value generated from the level set value supplied by each level set. E.g.: for a union, the comparator will always return the smaller of the two values. The function signature for the comparator is defined in the public ComparatorType.

Member Typedef Documentation

◆ ComparatorType

template<class T , int D>
using viennals::BooleanOperation< T, D >::ComparatorType = std::pair<T, bool> (*)(const T &, const T &)

Constructor & Destructor Documentation

◆ BooleanOperation() [1/3]

template<class T , int D>
viennals::BooleanOperation< T, D >::BooleanOperation ( )
inline

◆ BooleanOperation() [2/3]

template<class T , int D>
viennals::BooleanOperation< T, D >::BooleanOperation ( SmartPointer< Domain< T, D > > passedlsDomain,
BooleanOperationEnum passedOperation = BooleanOperationEnum::INVERT )
inline

◆ BooleanOperation() [3/3]

template<class T , int D>
viennals::BooleanOperation< T, D >::BooleanOperation ( SmartPointer< Domain< T, D > > passedlsDomainA,
SmartPointer< Domain< T, D > > passedlsDomainB,
BooleanOperationEnum passedOperation = BooleanOperationEnum::INTERSECT )
inline

Member Function Documentation

◆ apply()

template<class T , int D>
void viennals::BooleanOperation< T, D >::apply ( )
inline

Perform operation.

◆ setBooleanOperation()

template<class T , int D>
void viennals::BooleanOperation< T, D >::setBooleanOperation ( BooleanOperationEnum passedOperation)
inline

Set which of the operations of BooleanOperationEnum to perform.

◆ setBooleanOperationComparator()

template<class T , int D>
void viennals::BooleanOperation< T, D >::setBooleanOperationComparator ( ComparatorType passedOperationComp)
inline

Set the comparator to be used when the BooleanOperation is set to CUSTOM.

◆ setLevelSet()

template<class T , int D>
void viennals::BooleanOperation< T, D >::setLevelSet ( SmartPointer< Domain< T, D > > passedlsDomain)
inline

Set which level set to perform the boolean operation on.

◆ setPruneResult()

template<class T , int D>
void viennals::BooleanOperation< T, D >::setPruneResult ( bool pR)
inline

Set whether the resulting level set should be pruned. Defaults to true.

◆ setSecondLevelSet()

template<class T , int D>
void viennals::BooleanOperation< T, D >::setSecondLevelSet ( SmartPointer< Domain< T, D > > passedlsDomain)
inline

Set the level set which will be used to modify the first level set.

◆ setUpdatePointData()

template<class T , int D>
void viennals::BooleanOperation< T, D >::setUpdatePointData ( bool update)
inline

Set whether to update the point data stored in the LS during this algorithm. Defaults to true.


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