#include <Rodin/Distance/Base.h>
template<class Derived>
Base class
Base class for distance function computation models using CRTP.
| Template parameters | |
|---|---|
| Derived | The derived class type (CRTP pattern) |
This class provides common functionality for distance function models, specifically management of interior and interface regions. It uses the Curiously Recurring Template Pattern (CRTP) to enable static polymorphism.
Usage
Derived classes should inherit from this base class to automatically gain methods for setting and retrieving interior and interface regions:
class MyDistanceModel : public Base<MyDistanceModel> { // Implementation };
Public functions
-
template<class A1, class ... As>auto setInterior(A1&& a1, As && ... as) -> Derived&
- Sets the interior region attributes.
-
auto setInterior(const FlatSet<Geometry::
Attribute>& interior) -> Derived& - Sets the interior region attributes from a set.
-
template<class A1, class ... As>auto setInterface(A1&& a1, As && ... as) -> Derived&
- Sets the interface region attributes.
-
auto setInterface(const FlatSet<Geometry::
Attribute>& interface) -> Derived& - Sets the interface region attributes from a set.
- auto getInterior() const -> const auto&
- Gets the interior region attributes.
- auto getInterface() const -> const auto&
- Gets the interface region attributes.
Function documentation
template<class Derived>
template<class A1, class ... As>
Derived& Rodin:: Distance:: Base<Derived>:: setInterior(A1&& a1,
As && ... as)
Sets the interior region attributes.
| Template parameters | |
|---|---|
| A1 | Type of first attribute |
| As | Types of remaining attributes |
| Parameters | |
| a1 in | First attribute to add to interior region |
| as in | Additional attributes to add to interior region |
| Returns | Reference to the derived class for method chaining |
template<class Derived>
Derived& Rodin:: Distance:: Base<Derived>:: setInterior(const FlatSet<Geometry:: Attribute>& interior)
Sets the interior region attributes from a set.
| Parameters | |
|---|---|
| interior in | Set of attributes defining the interior region |
| Returns | Reference to the derived class for method chaining |
template<class Derived>
template<class A1, class ... As>
Derived& Rodin:: Distance:: Base<Derived>:: setInterface(A1&& a1,
As && ... as)
Sets the interface region attributes.
| Template parameters | |
|---|---|
| A1 | Type of first attribute |
| As | Types of remaining attributes |
| Parameters | |
| a1 in | First attribute to add to interface region |
| as in | Additional attributes to add to interface region |
| Returns | Reference to the derived class for method chaining |
template<class Derived>
Derived& Rodin:: Distance:: Base<Derived>:: setInterface(const FlatSet<Geometry:: Attribute>& interface)
Sets the interface region attributes from a set.
| Parameters | |
|---|---|
| interface in | Set of attributes defining the interface region |
| Returns | Reference to the derived class for method chaining |
template<class Derived>
const auto& Rodin:: Distance:: Base<Derived>:: getInterior() const
Gets the interior region attributes.
| Returns | Const reference to the set of interior region attributes |
|---|
template<class Derived>
const auto& Rodin:: Distance:: Base<Derived>:: getInterface() const
Gets the interface region attributes.
| Returns | Const reference to the set of interface region attributes |
|---|