From d28b5eddfca0b6309ca1f7fafcf4d32748d32b3f Mon Sep 17 00:00:00 2001 From: Fernando Cacciola Date: Wed, 11 Oct 2006 18:54:44 +0000 Subject: [PATCH] testsuite --- .gitattributes | 6 + .../Surface_mesh_simplification/makefile | 9 +- .../LT_cost_cache_strategy.cpp | 4 + .../LT_cost_placement_cache_strategy.cpp | 4 + .../LT_no_cache_strategy.cpp | 6 +- .../MP_no_cache_strategy.cpp | 4 + .../aux_edge_collapse_test_Polyhedron_3.cpp | 229 +++++------------- .../check_audit_edge_collapse_visitor.cpp | 166 +++++++++++++ ...te_audit_edge_collapse_Polyhedron_3_LT.cpp | 5 +- ...te_audit_edge_collapse_Polyhedron_3_MP.cpp | 5 + .../create_audit_edge_collapse_visitor.cpp | 19 +- .../edge_collapse_test.kdevelop | 26 +- .../test/Surface_mesh_simplification/makefile | 12 +- ...edge_collapse_Polyhedron_3_LT_no_cache.cpp | 5 + 14 files changed, 299 insertions(+), 201 deletions(-) create mode 100644 Surface_mesh_simplification/test/Surface_mesh_simplification/LT_cost_cache_strategy.cpp create mode 100644 Surface_mesh_simplification/test/Surface_mesh_simplification/LT_cost_placement_cache_strategy.cpp create mode 100644 Surface_mesh_simplification/test/Surface_mesh_simplification/MP_no_cache_strategy.cpp create mode 100644 Surface_mesh_simplification/test/Surface_mesh_simplification/check_audit_edge_collapse_visitor.cpp create mode 100644 Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_MP.cpp create mode 100644 Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_LT_no_cache.cpp diff --git a/.gitattributes b/.gitattributes index 7338772aa60..7b04960e8f5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2119,12 +2119,18 @@ Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Ed Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Set_cost_cache.h -text Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Vertex_is_fixed_property_map_always_false.h -text Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/collapse_triangulation_edge_Polyhedron_3.h -text +Surface_mesh_simplification/test/Surface_mesh_simplification/LT_cost_cache_strategy.cpp -text +Surface_mesh_simplification/test/Surface_mesh_simplification/LT_cost_placement_cache_strategy.cpp -text Surface_mesh_simplification/test/Surface_mesh_simplification/LT_no_cache_strategy.cpp -text +Surface_mesh_simplification/test/Surface_mesh_simplification/MP_no_cache_strategy.cpp -text Surface_mesh_simplification/test/Surface_mesh_simplification/aux_edge_collapse_test_Polyhedron_3.cpp -text +Surface_mesh_simplification/test/Surface_mesh_simplification/check_audit_edge_collapse_visitor.cpp -text Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_LT.cpp -text +Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_MP.cpp -text Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_visitor.cpp -text Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_test.cpp -text Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_test.kdevelop -text +Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_LT_no_cache.cpp -text Surface_mesher/demo/Surface_mesher/windows/Mesh.suo -text Surface_mesher/demo/Surface_mesher/windows/res/Mesh.ico -text svneol=unset#image/x-icon Surface_mesher/demo/Surface_mesher/windows/res/MeshDoc.ico -text svneol=unset#image/x-icon diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/makefile b/Surface_mesh_simplification/examples/Surface_mesh_simplification/makefile index 71618aa1625..0064ade3f7e 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/makefile +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/makefile @@ -15,6 +15,7 @@ include $(CGAL_MAKEFILE) CXXFLAGS = -I../../include/ \ -I../../../BGL/include/ \ + $(TESTSUITE_CXXFLAGS) \ $(EXTRA_FLAGS) \ $(CGAL_CXXFLAGS) @@ -22,9 +23,13 @@ CXXFLAGS = -I../../include/ \ # linker flags #---------------------------------------------------------------------# -LIBPATH = $(CGAL_LIBPATH) +LIBPATH = \ + $(TESTSUITE_LIBPATH) \ + $(CGAL_LIBPATH) -LDFLAGS = $(CGAL_LDFLAGS) +LDFLAGS = \ + $(TESTSUITE_LDFLAGS) \ + $(CGAL_LDFLAGS) #---------------------------------------------------------------------# # target entries diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/LT_cost_cache_strategy.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/LT_cost_cache_strategy.cpp new file mode 100644 index 00000000000..bee69899a98 --- /dev/null +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/LT_cost_cache_strategy.cpp @@ -0,0 +1,4 @@ +SMS::Set_no_cache cache ; +SMS::Cached_cost cost ; +SMS::LindstromTurk_placement placement ; + diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/LT_cost_placement_cache_strategy.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/LT_cost_placement_cache_strategy.cpp new file mode 100644 index 00000000000..97139e390df --- /dev/null +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/LT_cost_placement_cache_strategy.cpp @@ -0,0 +1,4 @@ +SMS::Set_no_cache cache ; +SMS::LindstromTurk_cost cost ; +SMS::LindstromTurk_placement placement ; + diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/LT_no_cache_strategy.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/LT_no_cache_strategy.cpp index 8e6ece0a206..97139e390df 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/LT_no_cache_strategy.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/LT_no_cache_strategy.cpp @@ -1,2 +1,4 @@ -Method sMethod = LT ; -Cache sCache = None ; +SMS::Set_no_cache cache ; +SMS::LindstromTurk_cost cost ; +SMS::LindstromTurk_placement placement ; + diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/MP_no_cache_strategy.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/MP_no_cache_strategy.cpp new file mode 100644 index 00000000000..57b26f3375e --- /dev/null +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/MP_no_cache_strategy.cpp @@ -0,0 +1,4 @@ +SMS::Set_no_cache cache ; +SMS::Edge_length_cost cost ; +SMS::Midpoint_placement placement ; + diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/aux_edge_collapse_test_Polyhedron_3.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/aux_edge_collapse_test_Polyhedron_3.cpp index e7454f97789..ff1525dade9 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/aux_edge_collapse_test_Polyhedron_3.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/aux_edge_collapse_test_Polyhedron_3.cpp @@ -22,8 +22,6 @@ #include #include #include -#include -#include #define CGAL_CHECK_EXPENSIVE @@ -72,212 +70,97 @@ void error_handler ( char const* what, char const* expr, char const* file, int l if ( msg != 0) cerr << "Explanation:" << msg << endl; - throw std::logic_error(""); + throw std::runtime_error(expr); } namespace SMS = CGAL::Surface_mesh_simplification ; typedef Vertex_is_fixed_property_map_always_false Vertex_is_fixed_map ; -enum Method { LT, MP } ; -enum Cache { None, Cost, CostAndPlacement } ; - -char const* method_to_string( Method aMethod ) +template +ostream& operator << ( ostream& os, optional const& o ) { - switch(aMethod) - { - case LT: return "LT" ; break ; - case MP: return "MP" ; break ; - } - - return "" ; + if ( o ) + return os << *o ; + else return os << "" ; } -char const* cache_to_string( Cache aCache ) -{ - switch(aCache) - { - case None : return "NoCache" ; break ; - case Cost : return "CostCache" ; break ; - case CostAndPlacement : return "CostAndPlacementCache" ; break ; - } - - return "" ; -} +#define ERROR(msg) \ + { \ + cerr << "\nError: " << msg << endl \ + << " File:" << __FILE__ << endl \ + << " Line:" << __LINE__ << endl ; \ + throw runtime_error("test error"); \ + } + +#define CHECK_MSG(pred,msg) if (!(pred)) ERROR(msg) + +#define CHECK(pred) CHECK_MSG(pred,#pred) + +#define CHECK_EQUAL(x,y) CHECK_MSG(((x)==(y)),"assertion " << #x << ":(" << x << ")==" << #y << ":(" << y << ") FAILED") +#define CHECK_NOT_EQUAL(x,y) CHECK_MSG(((x)!=(y)),"assertion " << #x << ":(" << x << ")!=" << #y << ":(" << y << ") FAILED") #include VISITOR -#include STRATEGY -typedef SMS::LindstromTurk_params LT_params ; -typedef char Dummy_params ; - -typedef SMS::Cost_cache Cost_cache ; -typedef SMS::Cost_and_placement_cache Cost_placement_cache ; - -typedef SMS::Cached_cost Cached_cost ; -typedef SMS::Edge_length_cost MP_cost ; -typedef SMS::LindstromTurk_cost LT_cost ; - -typedef SMS::Cached_placement Cached_placement ; -typedef SMS::Midpoint_placement MP_placement ; -typedef SMS::LindstromTurk_placement LT_placement ; - -typedef SMS::Set_no_cache Set_no_cache ; - -typedef SMS::Set_cost_cache Set_cost_cache_MP ; -typedef SMS::LindstromTurk_set_cost_cache Set_cost_cache_LT ; - -typedef SMS::Set_cost_and_placement_cache Set_cost_placement_cache_MP ; -typedef SMS::LindstromTurk_set_cost_and_placement_cache Set_cost_placement_cache_LT ; - -bool Test ( string aName, Method aMethod, Cache aCache ) +bool Test ( string aName ) { bool rSucceeded = false ; - string off_name = aName ; - - string audit_name = aName.substr(0,aName.find_last_of(".")) + "_" + method_to_string(aMethod) + ".audit" ; - - ifstream off_is(off_name.c_str()); - if ( off_is ) + try { - Surface lSurface; - off_is >> lSurface ; - if ( lSurface.is_valid() ) + string off_name = aName ; + + string audit_name = aName.substr(0,aName.find_last_of(".")) + "_" + STRATEGY_ACRN + ".audit" ; + + ifstream off_is(off_name.c_str()); + if ( off_is ) { - if ( lSurface.is_pure_triangle() ) + Surface lSurface; + off_is >> lSurface ; + if ( lSurface.is_valid() ) { - ofstream audit_s(audit_name.c_str()); - if ( audit_s ) + if ( lSurface.is_pure_triangle() ) { + Visitor lVisitor(audit_name) ; + set_halfedgeds_items_id(lSurface); SMS::Count_stop_predicate stop(1); - Cached_cost get_cached_cost ; - MP_cost get_MP_cost; - LT_cost get_LT_cost; - - Cached_placement get_cached_placement ; - MP_placement get_MP_placement; - LT_placement get_LT_placement; - - Set_no_cache set_no_cache ; - - Set_cost_cache_MP set_cost_cache_MP(get_MP_cost) ; - Set_cost_cache_LT set_cost_cache_LT ; - - Set_cost_placement_cache_MP set_cost_placement_cache_MP(get_MP_cost,get_MP_placement) ; - Set_cost_placement_cache_LT set_cost_placement_cache_LT ; - - Visitor lVisitor(audit_s) ; - - int r = -1 ; - +#include STRATEGY_POLICIES + Real_timer t ; t.start(); - switch( aMethod ) - { - case MP: - - switch ( aCache ) - { - case None : - - r = edge_collapse(lSurface - ,stop - ,set_cache(set_no_cache) - .get_cost(get_MP_cost) - .get_placement(get_MP_placement) - .visitor(&lVisitor) - ); - break ; - - case Cost : - - r = edge_collapse(lSurface - ,stop - ,set_cache(set_cost_cache_MP) - .get_cost(get_cached_cost) - .get_placement(get_MP_placement) - .visitor(&lVisitor) - ); - break ; - - case CostAndPlacement : - - r = edge_collapse(lSurface - ,stop - ,set_cache(set_cost_placement_cache_MP) - .get_cost(get_cached_cost) - .get_placement(get_cached_placement) - .visitor(&lVisitor) - ); - break ; - - } - - break ; - - case LT: - - switch ( aCache ) - { - case None : - - r = edge_collapse(lSurface - ,stop - ,set_cache(set_no_cache) - .get_cost(get_LT_cost) - .get_placement(get_LT_placement) - .visitor(&lVisitor) - ); - break ; - - case Cost : - - r = edge_collapse(lSurface - ,stop - ,set_cache(set_cost_cache_LT) - .get_cost(get_cached_cost) - .get_placement(get_LT_placement) - .visitor(&lVisitor) - ); - break ; - - case CostAndPlacement : - - r = edge_collapse(lSurface - ,stop - ,set_cache(set_cost_placement_cache_LT) - .get_cost(get_cached_cost) - .get_placement(get_cached_placement) - .visitor(&lVisitor) - ); - break ; - - } - - break ; - } + edge_collapse(lSurface + ,stop + ,set_cache(cache) + .get_cost(cost) + .get_placement(placement) + .visitor(&lVisitor) + ); t.stop(); + rSucceeded = true ; } - else cerr << "Unable to open audit file: " << audit_name << endl ; + else + { + cerr << "Surface is not triangulated (has faces with more than 3 sides): " << aName << endl ; + } } else { - cerr << "Surface is not triangulated (has faces with more than 3 sides): " << aName << endl ; + cerr << "Invalid surface: " << aName << endl ; } } else { - cerr << "Invalid surface: " << aName << endl ; - } + cerr << "Unable to open test file " << aName << endl ; + } } - else + catch ( exception const& x ) { - cerr << "Unable to open test file " << aName << endl ; - } + cerr << "Exception caught: " << x.what() << endl ; + } + return rSucceeded ; } @@ -306,7 +189,7 @@ int main( int argc, char** argv ) unsigned lOK = 0 ; for ( vector::const_iterator it = lCases.begin(); it != lCases.end() ; ++ it ) { - if ( Test(*it, sMethod, sCache) ) + if ( Test(*it) ) ++ lOK ; } diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/check_audit_edge_collapse_visitor.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/check_audit_edge_collapse_visitor.cpp new file mode 100644 index 00000000000..b00956fadea --- /dev/null +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/check_audit_edge_collapse_visitor.cpp @@ -0,0 +1,166 @@ +#include +#include +#include + +class Visitor +{ +private : + + struct Data + { + Data ( bool isf ) : is_fixed(isf) {} + + bool is_fixed ; + bool is_collapsable ; + size_t order ; + optional cost ; + optional placement ; + } ; + typedef shared_ptr Data_ptr ; + + typedef map Table ; + +private : + + typedef char_separator Separator ; + typedef tokenizer Tokenizer ; + + void ReadAudit( istream& in ) + { + size_t order = 0 ; + string line ; + while ( getline(in,line) ) + { + if ( line.length() > 1 ) + { + Tokenizer tk(line,Separator(" ")); + vector tokens(tk.begin(),tk.end()); + CHECK( tokens.size() > 1 ) ; + char c = tokens[0][0] ; + switch ( c ) + { + case 'I' : + { + CHECK( tokens.size() > 2 ) ; + size_t id = lexical_cast(tokens[1]); + bool is_fixed = lexical_cast (tokens[2]); + CHECK(audit_table.find(id)==audit_table.end()); + audit_table.insert(make_pair(id, Data_ptr( new Data(is_fixed) ) ) ) ; + } + break ; + + case 'S' : + { + size_t id = lexical_cast(tokens[1]); + Data_ptr data = audit_table[id]; + CHECK(data); + + optional cost ; + if ( tokens.size() > 2 ) + cost = lexical_cast(tokens[2]); + + data->cost = cost ; + data->order = order++; + } + break ; + + case 'C' : + { + size_t id = lexical_cast(tokens[1]); + Data_ptr data = audit_table[id]; + CHECK(data); + + optional placement ; + if ( tokens.size() > 4 ) + { + double x = lexical_cast(tokens[2]); + double y = lexical_cast(tokens[3]); + double z = lexical_cast(tokens[4]); + placement = Point(x,y,z); + } + + data->is_collapsable = true ; + data->placement = placement ; + } + break ; + + case 'N' : + { + size_t id = lexical_cast(tokens[1]); + Data_ptr data = audit_table[id]; + CHECK(data); + + data->is_collapsable = false ; + } + break ; + + default : + ERROR("Invalid audit line: " << line ); + } + } + } + } + +public : + + Visitor ( string audit_name ) + { + ifstream in(audit_name.c_str()); + if ( in ) + ReadAudit(in); + else ERROR("Unable to open audit file: " << audit_name); + } + + void OnStarted( Surface& ) { order = 0 ; } + + void OnFinished ( Surface& ) + { + CHECK( audit_table.size() == actual_table.size() ); + + for ( size_t i = 0, ei = audit_table.size() ; i != ei ; ++ i ) + { + size_t idx = i * 2 ; + Data_ptr audit_data = audit_table[idx]; + Data_ptr actual_data = actual_table[idx]; + CHECK(audit_data); + CHECK(actual_data); + CHECK_EQUAL(audit_data->order ,actual_data->order); + CHECK_EQUAL(audit_data->is_fixed ,actual_data->is_fixed); + CHECK_EQUAL(audit_data->is_collapsable ,actual_data->is_collapsable); + CHECK_EQUAL(!audit_data->cost ,!actual_data->cost); + CHECK_EQUAL(!audit_data->placement ,!actual_data->placement); + } + } + + void OnStopConditionReached( Surface& ) + { + } + + void OnCollected( Halfedge_handle const& aEdge, bool aIsFixed, Surface& ) + { + actual_table.insert(make_pair(aEdge->id(), Data_ptr( new Data(aIsFixed) ) ) ) ; + } + + void OnSelected( Halfedge_handle const& aEdge, Surface&, optional const& aCost, size_t, size_t ) + { + actual_table[aEdge->id()]->cost = aCost ; + actual_table[aEdge->id()]->order = order ++ ; + } + + void OnCollapsing(Halfedge_handle const& aEdge, Surface&, optional const& aPlacement ) + { + actual_table[aEdge->id()]->placement = aPlacement ; + actual_table[aEdge->id()]->is_collapsable = true ; + } + + void OnNonCollapsable(Halfedge_handle const& aEdge, Surface& ) + { + actual_table[aEdge->id()]->is_collapsable = false ; + } + +private : + + Table audit_table ; + Table actual_table ; + size_t order ; +} ; diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_LT.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_LT.cpp index d7c4412b11e..8307cb9740b 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_LT.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_LT.cpp @@ -1,4 +1,5 @@ -#define VISITOR "create_audit_edge_collapse_visitor.cpp" -#define STRATEGY "LT_no_cache_strategy.cpp" +#define VISITOR "create_audit_edge_collapse_visitor.cpp" +#define STRATEGY_ACRN "LT" +#define STRATEGY_POLICIES "LT_no_cache_strategy.cpp" #include "aux_edge_collapse_test_Polyhedron_3.cpp" diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_MP.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_MP.cpp new file mode 100644 index 00000000000..ef12deefb7c --- /dev/null +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_MP.cpp @@ -0,0 +1,5 @@ +#define VISITOR "create_audit_edge_collapse_visitor.cpp" +#define STRATEGY_ACRN "MP" +#define STRATEGY_POLICIES "MP_no_cache_strategy.cpp" + +#include "aux_edge_collapse_test_Polyhedron_3.cpp" diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_visitor.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_visitor.cpp index 93da03ec9a2..422e5e82bf8 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_visitor.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_visitor.cpp @@ -1,6 +1,11 @@ struct Visitor { - Visitor ( ostream& o ) : mOut(&o) {} + Visitor ( string audit_name ) + : + mOut( new ofstream(audit_name.c_str(), ios::trunc ) ) + { + CHECK_MSG(!out(), "Unable to open audit file: " << audit_name); + } void OnStarted( Surface& ) {} @@ -10,12 +15,12 @@ struct Visitor void OnCollected( Halfedge_handle const& aEdge, bool aIsFixed, Surface& ) { - out() << "P" << aEdge->id() << " " << aIsFixed << endl ; + out() << "I " << aEdge->id() << " " << aIsFixed << endl ; } void OnSelected( Halfedge_handle const& aEdge, Surface&, optional const& aCost, size_t, size_t ) { - out() << "S" << aEdge->id() << " " ; + out() << "S " << aEdge->id() << " " ; if ( aCost ) out() << *aCost ; out() << endl ; @@ -23,18 +28,18 @@ struct Visitor void OnCollapsing(Halfedge_handle const& aEdge, Surface&, optional const& aPlacement ) { - out() << "C" << aEdge->id() << " " ; + out() << "C " << aEdge->id() << " " ; if ( aPlacement ) - out() << aPlacement->x() << " " << aPlacement->y() ; + out() << aPlacement->x() << " " << aPlacement->y() << " " << aPlacement->z() ; out() << endl ; } void OnNonCollapsable(Halfedge_handle const& aEdge, Surface& ) { - out() << "N" << aEdge->id() << endl ; + out() << "N " << aEdge->id() << endl ; } ostream& out() { return *mOut; } - ostream* mOut ; + shared_ptr mOut ; } ; diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_test.kdevelop b/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_test.kdevelop index f071231ae68..572c635e6a4 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_test.kdevelop +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_test.kdevelop @@ -9,14 +9,14 @@ . false - + create_audit_edge_collapse_Polyhedron_3_LT build / - + false true @@ -26,8 +26,8 @@ 1 0 false - - + + CGAL_MAKEFILE=/home/fcacciola/Programming/CGAL/make/makefile_i686_Linux-2.6_g++-4.0.2 default @@ -38,17 +38,17 @@ make - + - + data/tetra.off - - - - + + + + true false false @@ -128,7 +128,7 @@ 250 - + set m_,_ theValue @@ -154,8 +154,8 @@ VisualBoyAdvance - - + + false false -f0 diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/makefile b/Surface_mesh_simplification/test/Surface_mesh_simplification/makefile index c200a5535c0..c20e53c357b 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/makefile +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/makefile @@ -35,12 +35,20 @@ LDFLAGS = \ # target entries #---------------------------------------------------------------------# -all: create_audit_edge_collapse_Polyhedron_3_LT +all: create_audit_edge_collapse_Polyhedron_3_LT \ + create_audit_edge_collapse_Polyhedron_3_MP \ + test_edge_collapse_Polyhedron_3_LT \ create_audit_edge_collapse_Polyhedron_3_LT$(EXE_EXT): create_audit_edge_collapse_Polyhedron_3_LT$(OBJ_EXT) $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)create_audit_edge_collapse_Polyhedron_3_LT create_audit_edge_collapse_Polyhedron_3_LT$(OBJ_EXT) $(LDFLAGS) -clean: create_audit_edge_collapse_Polyhedron_3_LT.clean + +test_edge_collapse_Polyhedron_3_LT$(EXE_EXT): test_edge_collapse_Polyhedron_3_LT$(OBJ_EXT) + $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)test_edge_collapse_Polyhedron_3_LT test_edge_collapse_Polyhedron_3_LT$(OBJ_EXT) $(LDFLAGS) + +clean: create_audit_edge_collapse_Polyhedron_3_LT.clean \ + create_audit_edge_collapse_Polyhedron_3_MP.clean \ + test_edge_collapse_Polyhedron_3_LT.clean \ #---------------------------------------------------------------------# # suffix rules diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_LT_no_cache.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_LT_no_cache.cpp new file mode 100644 index 00000000000..686f2ee27ad --- /dev/null +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_LT_no_cache.cpp @@ -0,0 +1,5 @@ +#define VISITOR "check_audit_edge_collapse_visitor.cpp" +#define STRATEGY_ACRN "LT" +#define STRATEGY_POLICIES "LT_no_cache_strategy.cpp" + +#include "aux_edge_collapse_test_Polyhedron_3.cpp"