Commit bb1e2b7f authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[constraints] provide default ctor

parent 5f6dd320
......@@ -27,6 +27,7 @@
#include <stdexcept>
#include <variant>
#include <vector>
#include <type_traits>
#include <frackit/distance/distance.hh>
#include <frackit/magnitude/magnitude.hh>
......@@ -88,6 +89,17 @@ public:
//! Exort the engine used for angle computations
using AngleComputationEngine = AE;
/*!
* \brief Default constructor.
* \note This is only available if the engines are default constructible
*/
EntityNetworkConstraints()
{
static_assert(std::is_default_constructible<AE>::value,
"Angle computation engine not default constructible. "
"Use constructor taking the engines as arguments instead");
}
/*!
* \brief The constructor.
* \param angleEngine An instance of the engine used for angle computations.
......
......@@ -22,7 +22,7 @@ int main()
const Vector e3(0.0, 0.0, 1.0);
// Define constraints
auto constraints = Frackit::makeDefaultConstraints<ctype>();
Frackit::EntityNetworkConstraints<ctype> constraints;
constraints.setMinDistance(0.1);
constraints.setMinIntersectingAngle(M_PI/4.0);
constraints.setMinIntersectionMagnitude(0.05);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment