-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7513 from sloriot/T23-exact_serialization
EPECK Triangulation serialization
- Loading branch information
Showing
16 changed files
with
99 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
Surface_mesher/test/Surface_mesher/implicit_surface_mesher_test.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
Triangulation_3/test/Triangulation_3/test_triangulation_serialization_3.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#include <CGAL/Simple_cartesian.h> | ||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> | ||
#include <CGAL/Exact_predicates_exact_constructions_kernel.h> | ||
#include <CGAL/Exact_rational.h> | ||
|
||
#include <CGAL/Delaunay_triangulation_3.h> | ||
|
||
#include <CGAL/Random.h> | ||
|
||
|
||
#include <sstream> | ||
|
||
template <class K> | ||
void test() | ||
{ | ||
typedef typename K::FT FT; | ||
CGAL::Delaunay_triangulation_3<K> dt3; | ||
|
||
|
||
// create a bunch of points | ||
CGAL::Random random; | ||
FT x,y,z; | ||
for (int n=0;n<50;++n) | ||
{ | ||
x=random.get_int(-500,500); | ||
y=random.get_int(-500,500); | ||
z=random.get_int(-500,500); | ||
dt3.insert(typename K::Point_3(x/FT(3),y/FT(5),z/FT(7))); | ||
} | ||
|
||
std::stringstream buffer; | ||
buffer << std::setprecision(17) << dt3; | ||
decltype(dt3) dt3_bis; | ||
buffer >> dt3_bis; | ||
|
||
assert(dt3==dt3_bis); | ||
} | ||
|
||
int main() | ||
{ | ||
test<CGAL::Simple_cartesian<CGAL::Exact_rational>>(); | ||
test<CGAL::Exact_predicates_exact_constructions_kernel>(); | ||
test<CGAL::Exact_predicates_inexact_constructions_kernel>(); | ||
} |