mirror of https://github.com/CGAL/cgal
Add test for LCC
This commit is contained in:
parent
ebd54153ea
commit
8ece528538
|
|
@ -381,6 +381,7 @@ int main()
|
|||
{
|
||||
test_Euler_operations<Polyhedron>();
|
||||
test_Euler_operations<SM>();
|
||||
test_Euler_operations<LCC>();
|
||||
|
||||
#ifdef CGAL_USE_OPENMESH
|
||||
test_Euler_operations<OMesh>();
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@
|
|||
|
||||
#include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
|
||||
|
||||
#include <CGAL/Linear_cell_complex.h>
|
||||
#include <CGAL/Linear_cell_complex_constructors.h>
|
||||
#include <CGAL/boost/graph/graph_traits_Linear_cell_complex.h>
|
||||
#include <CGAL/boost/graph/properties_Linear_cell_complex.h>
|
||||
|
||||
#ifdef CGAL_USE_SURFACE_MESH
|
||||
#include <CGAL/Surface_mesh.h>
|
||||
#include <CGAL/Surface_mesh/IO.h>
|
||||
|
|
@ -33,6 +38,23 @@ typedef Kernel::Vector_3 Vector_3;
|
|||
typedef Kernel::Triangle_3 Triangle_3;
|
||||
typedef Kernel::Iso_cuboid_3 Iso_cuboid_3;
|
||||
|
||||
typedef CGAL::Linear_cell_complex_traits<3, Kernel> MyTraits;
|
||||
|
||||
struct Myitem
|
||||
{
|
||||
template<class Refs>
|
||||
struct Dart_wrapper
|
||||
{
|
||||
typedef CGAL::Dart<2, Refs > Dart;
|
||||
typedef CGAL::Cell_attribute_with_point< Refs > Vertex_attribute;
|
||||
typedef CGAL::Cell_attribute< Refs > Face_attribute;
|
||||
typedef CGAL::cpp11::tuple<Vertex_attribute, void, Face_attribute> Attributes;
|
||||
};
|
||||
};
|
||||
|
||||
typedef CGAL::Linear_cell_complex<2, 3, MyTraits, Myitem> LCC;
|
||||
|
||||
|
||||
#ifdef CGAL_USE_SURFACE_MESH
|
||||
typedef CGAL::Surface_mesh<Point_3> SM;
|
||||
#endif
|
||||
|
|
@ -119,6 +141,14 @@ bool read_a_mesh(Polyhedron& p, const std::string& str) {
|
|||
return success;
|
||||
}
|
||||
|
||||
bool read_a_mesh(LCC& lcc, const std::string& str) {
|
||||
std::ifstream in(str.c_str());
|
||||
bool success = in.good();
|
||||
if(success)
|
||||
CGAL::load_off(lcc, in);
|
||||
return success;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
std::vector<T> t_data()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue