Commit 279b47b7 authored by Sylvain Thery's avatar Sylvain Thery

bug GMap + bug traversor2EEaF

parent db712eaf
...@@ -30,6 +30,12 @@ QT4_WRAP_CPP(tilings_moc tilings.h) ...@@ -30,6 +30,12 @@ QT4_WRAP_CPP(tilings_moc tilings.h)
add_executable(tilings tilings.cpp ${tilings_moc}) add_executable(tilings tilings.cpp ${tilings_moc})
target_link_libraries(tilings ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS}) target_link_libraries(tilings ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS})
QT4_WRAP_UI( test_traversor2_ui test_traversor2.ui )
QT4_WRAP_CPP(test_traversor2_moc test_traversor2.h)
add_executable(test_traversor2 test_traversor2.cpp ${test_traversor2_ui} ${test_traversor2_moc})
target_link_libraries(test_traversor2 ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS})
# Example with Qt # Example with Qt
# #
#QT4_WRAP_CPP(tuto1_moc tuto1.h) #QT4_WRAP_CPP(tuto1_moc tuto1.h)
......
...@@ -151,8 +151,15 @@ IF(WIN32) ...@@ -151,8 +151,15 @@ IF(WIN32)
# set(CMAKE_CONFIGURATION_TYPES "Release Debug" CACHE STRING "Only Release or Debug" FORCE) # set(CMAKE_CONFIGURATION_TYPES "Release Debug" CACHE STRING "Only Release or Debug" FORCE)
ELSE(WIN32) ELSE(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fPIC") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fPIC")
# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wclobbered -Wempty-body -Wignored-qualifiers -Wmissing-field-initializers -Wsign-compare -Wtype-limits -Wuninitialized -fPIC")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Woverride-init -fPIC") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Woverride-init -fPIC")
# remove the 60000+ "no unused local typedefs" warnings with GCC4.8+
if(CMAKE_COMPILER_IS_GNUCXX)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-local-typedefs")
endif(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
endif(CMAKE_COMPILER_IS_GNUCXX)
add_subdirectory(Release) add_subdirectory(Release)
add_subdirectory(Debug) add_subdirectory(Debug)
add_subdirectory(${CGoGN_ROOT_DIR}/Apps Apps) add_subdirectory(${CGoGN_ROOT_DIR}/Apps Apps)
......
...@@ -414,7 +414,8 @@ Dart Traversor2EEaV<MAP>::next() ...@@ -414,7 +414,8 @@ Dart Traversor2EEaV<MAP>::next()
// Traversor2EEaF // Traversor2EEaF
template <typename MAP> template <typename MAP>
Traversor2EEaF<MAP>::Traversor2EEaF(const MAP& map, Dart dart) : m(map),m_QLT(NULL) Traversor2EEaF<MAP>::Traversor2EEaF(const MAP& map, Dart dart) :
m(map),m_QLT(NULL)
{ {
const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<EDGE,FACE>() ; const AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<EDGE,FACE>() ;
if (quickTraversal != NULL) if (quickTraversal != NULL)
...@@ -423,9 +424,12 @@ Traversor2EEaF<MAP>::Traversor2EEaF(const MAP& map, Dart dart) : m(map),m_QLT(NU ...@@ -423,9 +424,12 @@ Traversor2EEaF<MAP>::Traversor2EEaF(const MAP& map, Dart dart) : m(map),m_QLT(NU
} }
else else
{ {
start = m.phi1(dart) ; if (m.isBoundaryMarked2(dart))
stop1 = dart ; stop1 = m.phi2(dart);
stop2 = m.phi2(dart) ; else
stop1 = dart;
stop2 = m.phi2(stop1) ;
start = m.phi1(stop1);
} }
} }
...@@ -458,10 +462,16 @@ Dart Traversor2EEaF<MAP>::next() ...@@ -458,10 +462,16 @@ Dart Traversor2EEaF<MAP>::next()
if(current != NIL) if(current != NIL)
{ {
current = m.phi1(current) ; current = m.phi1(current) ;
if(current == stop1) if (current == stop1)
current = m.phi1(stop2) ; {
else if(current == stop2) if (!m.isBoundaryMarked2(stop2))
current = m.phi1(stop2) ;
else
current=NIL;
}
else if (current == stop2)
current = NIL ; current = NIL ;
} }
return current ; return current ;
} }
......
...@@ -57,19 +57,20 @@ Dart EmbeddedGMap2::newFace(unsigned int nbEdges, bool withBoundary) ...@@ -57,19 +57,20 @@ Dart EmbeddedGMap2::newFace(unsigned int nbEdges, bool withBoundary)
initOrbitEmbeddingNewCell<FACE>(phi2(d)) ; initOrbitEmbeddingNewCell<FACE>(phi2(d)) ;
} }
} }
else
{
if (isOrbitEmbedded<VERTEX>())
{
Traversor2FV<EmbeddedGMap2> t(*this, d);
for(Dart it = t.begin(); it != t.end(); it = t.next())
initOrbitEmbeddingNewCell<VERTEX>(it) ;
}
if(isOrbitEmbedded<FACE>()) // else
initOrbitEmbeddingNewCell<FACE>(d) ; // {
// if (isOrbitEmbedded<VERTEX>())
// {
// Traversor2FV<EmbeddedGMap2> t(*this, d);
// for(Dart it = t.begin(); it != t.end(); it = t.next())
// initOrbitEmbeddingNewCell<VERTEX>(it) ;
// }
} // if(isOrbitEmbedded<FACE>())
// initOrbitEmbeddingNewCell<FACE>(d) ;
// }
return d ; return d ;
} }
......
Markdown is supported
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