Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tools
frackit
Commits
bb1e2b7f
Commit
bb1e2b7f
authored
Jan 18, 2020
by
Dennis Gläser
Browse files
[constraints] provide default ctor
parent
5f6dd320
Changes
2
Hide whitespace changes
Inline
Side-by-side
frackit/entitynetwork/constraints.hh
View file @
bb1e2b7f
...
...
@@ -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.
...
...
test/entitynetwork/test_constraints_disk.cc
View file @
bb1e2b7f
...
...
@@ -22,7 +22,7 @@ int main()
const
Vector
e3
(
0.0
,
0.0
,
1.0
);
// Define constraints
auto
constraints
=
Frackit
::
makeDefault
Constraints
<
ctype
>
()
;
Frackit
::
EntityNetwork
Constraints
<
ctype
>
constraints
;
constraints
.
setMinDistance
(
0.1
);
constraints
.
setMinIntersectingAngle
(
M_PI
/
4.0
);
constraints
.
setMinIntersectionMagnitude
(
0.05
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment