diff --git a/Apps/CMakeLists.txt b/Apps/CMakeLists.txt index a02d900f4db3891460e272caf4959146940ff922..014543320627470e2401b158d071f6b09e569f5e 100644 --- a/Apps/CMakeLists.txt +++ b/Apps/CMakeLists.txt @@ -9,7 +9,8 @@ ELSE(WIN32) add_subdirectory(Examples/Release) add_subdirectory(Examples/Debug) add_subdirectory(Examples/Tests) - add_subdirectory(Examples/SocialAgents) + add_subdirectory(Examples/SocialAgents/Release) + add_subdirectory(Examples/SocialAgents/Debug) add_subdirectory(Tuto) ENDIF(WIN32) diff --git a/Apps/Examples/SocialAgents/Makefile b/Apps/Examples/SocialAgents/Makefile deleted file mode 100644 index 4adf03ff17a6c72a2b4d17d5a477989fd42e7118..0000000000000000000000000000000000000000 --- a/Apps/Examples/SocialAgents/Makefile +++ /dev/null @@ -1,270 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 2.6 - -# Default target executed when no arguments are given to make. -default_target: all -.PHONY : default_target - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canoncical targets will work. -.SUFFIXES: - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - -# A target that is always out of date. -cmake_force: -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /usr/bin/cmake - -# The command to remove a file. -RM = /usr/bin/cmake -E remove -f - -# The program to use to edit the cache. -CMAKE_EDIT_COMMAND = /usr/bin/ccmake - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = /home/jund/Desktop/code/miniCGoGN/Apps/SocialAgents - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = /home/jund/Desktop/code/miniCGoGN/Apps/SocialAgents - -#============================================================================= -# Targets provided globally by CMake. - -# Special rule for the target edit_cache -edit_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." - /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : edit_cache - -# Special rule for the target edit_cache -edit_cache/fast: edit_cache -.PHONY : edit_cache/fast - -# Special rule for the target rebuild_cache -rebuild_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." - /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : rebuild_cache - -# Special rule for the target rebuild_cache -rebuild_cache/fast: rebuild_cache -.PHONY : rebuild_cache/fast - -# The main all target -all: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start /home/jund/Desktop/code/miniCGoGN/Apps/SocialAgents/CMakeFiles /home/jund/Desktop/code/miniCGoGN/Apps/SocialAgents/CMakeFiles/progress.make - $(MAKE) -f CMakeFiles/Makefile2 all - $(CMAKE_COMMAND) -E cmake_progress_start /home/jund/Desktop/code/miniCGoGN/Apps/SocialAgents/CMakeFiles 0 -.PHONY : all - -# The main clean target -clean: - $(MAKE) -f CMakeFiles/Makefile2 clean -.PHONY : clean - -# The main clean target -clean/fast: clean -.PHONY : clean/fast - -# Prepare targets for installation. -preinstall: all - $(MAKE) -f CMakeFiles/Makefile2 preinstall -.PHONY : preinstall - -# Prepare targets for installation. -preinstall/fast: - $(MAKE) -f CMakeFiles/Makefile2 preinstall -.PHONY : preinstall/fast - -# clear depends -depend: - $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 -.PHONY : depend - -#============================================================================= -# Target rules for targets named socialAgents - -# Build rule for target. -socialAgents: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 socialAgents -.PHONY : socialAgents - -# fast build rule for target. -socialAgents/fast: - $(MAKE) -f CMakeFiles/socialAgents.dir/build.make CMakeFiles/socialAgents.dir/build -.PHONY : socialAgents/fast - -#============================================================================= -# Target rules for targets named socialAgentsD - -# Build rule for target. -socialAgentsD: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 socialAgentsD -.PHONY : socialAgentsD - -# fast build rule for target. -socialAgentsD/fast: - $(MAKE) -f CMakeFiles/socialAgentsD.dir/build.make CMakeFiles/socialAgentsD.dir/build -.PHONY : socialAgentsD/fast - -src/agent.o: src/agent.cpp.o -.PHONY : src/agent.o - -# target to build an object file -src/agent.cpp.o: - $(MAKE) -f CMakeFiles/socialAgents.dir/build.make CMakeFiles/socialAgents.dir/src/agent.cpp.o - $(MAKE) -f CMakeFiles/socialAgentsD.dir/build.make CMakeFiles/socialAgentsD.dir/src/agent.cpp.o -.PHONY : src/agent.cpp.o - -src/agent.i: src/agent.cpp.i -.PHONY : src/agent.i - -# target to preprocess a source file -src/agent.cpp.i: - $(MAKE) -f CMakeFiles/socialAgents.dir/build.make CMakeFiles/socialAgents.dir/src/agent.cpp.i - $(MAKE) -f CMakeFiles/socialAgentsD.dir/build.make CMakeFiles/socialAgentsD.dir/src/agent.cpp.i -.PHONY : src/agent.cpp.i - -src/agent.s: src/agent.cpp.s -.PHONY : src/agent.s - -# target to generate assembly for a file -src/agent.cpp.s: - $(MAKE) -f CMakeFiles/socialAgents.dir/build.make CMakeFiles/socialAgents.dir/src/agent.cpp.s - $(MAKE) -f CMakeFiles/socialAgentsD.dir/build.make CMakeFiles/socialAgentsD.dir/src/agent.cpp.s -.PHONY : src/agent.cpp.s - -src/env_map.o: src/env_map.cpp.o -.PHONY : src/env_map.o - -# target to build an object file -src/env_map.cpp.o: - $(MAKE) -f CMakeFiles/socialAgents.dir/build.make CMakeFiles/socialAgents.dir/src/env_map.cpp.o - $(MAKE) -f CMakeFiles/socialAgentsD.dir/build.make CMakeFiles/socialAgentsD.dir/src/env_map.cpp.o -.PHONY : src/env_map.cpp.o - -src/env_map.i: src/env_map.cpp.i -.PHONY : src/env_map.i - -# target to preprocess a source file -src/env_map.cpp.i: - $(MAKE) -f CMakeFiles/socialAgents.dir/build.make CMakeFiles/socialAgents.dir/src/env_map.cpp.i - $(MAKE) -f CMakeFiles/socialAgentsD.dir/build.make CMakeFiles/socialAgentsD.dir/src/env_map.cpp.i -.PHONY : src/env_map.cpp.i - -src/env_map.s: src/env_map.cpp.s -.PHONY : src/env_map.s - -# target to generate assembly for a file -src/env_map.cpp.s: - $(MAKE) -f CMakeFiles/socialAgents.dir/build.make CMakeFiles/socialAgents.dir/src/env_map.cpp.s - $(MAKE) -f CMakeFiles/socialAgentsD.dir/build.make CMakeFiles/socialAgentsD.dir/src/env_map.cpp.s -.PHONY : src/env_map.cpp.s - -src/simulator.o: src/simulator.cpp.o -.PHONY : src/simulator.o - -# target to build an object file -src/simulator.cpp.o: - $(MAKE) -f CMakeFiles/socialAgents.dir/build.make CMakeFiles/socialAgents.dir/src/simulator.cpp.o - $(MAKE) -f CMakeFiles/socialAgentsD.dir/build.make CMakeFiles/socialAgentsD.dir/src/simulator.cpp.o -.PHONY : src/simulator.cpp.o - -src/simulator.i: src/simulator.cpp.i -.PHONY : src/simulator.i - -# target to preprocess a source file -src/simulator.cpp.i: - $(MAKE) -f CMakeFiles/socialAgents.dir/build.make CMakeFiles/socialAgents.dir/src/simulator.cpp.i - $(MAKE) -f CMakeFiles/socialAgentsD.dir/build.make CMakeFiles/socialAgentsD.dir/src/simulator.cpp.i -.PHONY : src/simulator.cpp.i - -src/simulator.s: src/simulator.cpp.s -.PHONY : src/simulator.s - -# target to generate assembly for a file -src/simulator.cpp.s: - $(MAKE) -f CMakeFiles/socialAgents.dir/build.make CMakeFiles/socialAgents.dir/src/simulator.cpp.s - $(MAKE) -f CMakeFiles/socialAgentsD.dir/build.make CMakeFiles/socialAgentsD.dir/src/simulator.cpp.s -.PHONY : src/simulator.cpp.s - -src/viewer.o: src/viewer.cpp.o -.PHONY : src/viewer.o - -# target to build an object file -src/viewer.cpp.o: - $(MAKE) -f CMakeFiles/socialAgents.dir/build.make CMakeFiles/socialAgents.dir/src/viewer.cpp.o - $(MAKE) -f CMakeFiles/socialAgentsD.dir/build.make CMakeFiles/socialAgentsD.dir/src/viewer.cpp.o -.PHONY : src/viewer.cpp.o - -src/viewer.i: src/viewer.cpp.i -.PHONY : src/viewer.i - -# target to preprocess a source file -src/viewer.cpp.i: - $(MAKE) -f CMakeFiles/socialAgents.dir/build.make CMakeFiles/socialAgents.dir/src/viewer.cpp.i - $(MAKE) -f CMakeFiles/socialAgentsD.dir/build.make CMakeFiles/socialAgentsD.dir/src/viewer.cpp.i -.PHONY : src/viewer.cpp.i - -src/viewer.s: src/viewer.cpp.s -.PHONY : src/viewer.s - -# target to generate assembly for a file -src/viewer.cpp.s: - $(MAKE) -f CMakeFiles/socialAgents.dir/build.make CMakeFiles/socialAgents.dir/src/viewer.cpp.s - $(MAKE) -f CMakeFiles/socialAgentsD.dir/build.make CMakeFiles/socialAgentsD.dir/src/viewer.cpp.s -.PHONY : src/viewer.cpp.s - -# Help Target -help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... clean" - @echo "... depend" - @echo "... edit_cache" - @echo "... rebuild_cache" - @echo "... socialAgents" - @echo "... socialAgentsD" - @echo "... src/agent.o" - @echo "... src/agent.i" - @echo "... src/agent.s" - @echo "... src/env_map.o" - @echo "... src/env_map.i" - @echo "... src/env_map.s" - @echo "... src/simulator.o" - @echo "... src/simulator.i" - @echo "... src/simulator.s" - @echo "... src/viewer.o" - @echo "... src/viewer.i" - @echo "... src/viewer.s" -.PHONY : help - - - -#============================================================================= -# Special targets to cleanup operation of make. - -# Special rule to run CMake to check the build system integrity. -# No rule that depends on this can have commands that come from listfiles -# because they might be regenerated. -cmake_check_build_system: - $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 -.PHONY : cmake_check_build_system - diff --git a/Apps/Examples/SocialAgents/CMakeLists.txt b/Apps/Examples/SocialAgents/Release/CMakeLists.txt similarity index 58% rename from Apps/Examples/SocialAgents/CMakeLists.txt rename to Apps/Examples/SocialAgents/Release/CMakeLists.txt index 0b8ca105cb41e9f922978d719d1a37c05ed4e42e..19a98ad5f2b71f20af9f6ad895d6179149429d3c 100644 --- a/Apps/Examples/SocialAgents/CMakeLists.txt +++ b/Apps/Examples/SocialAgents/Release/CMakeLists.txt @@ -2,11 +2,11 @@ cmake_minimum_required(VERSION 2.6) project(SocialAgents) -SET(CMAKE_BUILD_TYPE Debug) +SET(CMAKE_BUILD_TYPE Release) link_directories( - ${CGoGN_ROOT_DIR}/lib/Debug/ - ${CGoGN_ROOT_DIR}/lib/Release/) + ${CGoGN_ROOT_DIR}/lib/Release/ +) # define includes path include_directories( @@ -21,8 +21,5 @@ include_directories( ) #define exec to compile -add_executable(socialAgents ./src/viewer.cpp ./src/env_map.cpp ./src/agent.cpp ./src/simulator.cpp ) +add_executable(socialAgents ../src/viewer.cpp ../src/env_map.cpp ../src/agent.cpp ../src/simulator.cpp ) target_link_libraries( socialAgents container topology utils algo ${COMMON_LIBS} ) - -add_executable(socialAgentsD ./src/viewer.cpp ./src/env_map.cpp ./src/agent.cpp ./src/simulator.cpp ) -target_link_libraries( socialAgentsD containerD topologyD utilsD algoD ${COMMON_LIBS} ) diff --git a/Apps/Examples/SocialAgents/include/env_generator.hpp b/Apps/Examples/SocialAgents/include/env_generator.hpp index 8de2327c8b450b77c00afa8ec2683c895d467344..4bea14eb9480963613e8649137baabb996c83ca0 100644 --- a/Apps/Examples/SocialAgents/include/env_generator.hpp +++ b/Apps/Examples/SocialAgents/include/env_generator.hpp @@ -148,7 +148,7 @@ void generateSmallCity(typename PFP::MAP& map, EMBV& position, DartMarker& close // sideSize *= 0.2f; unsigned int nbBuilding=1000; float height = sideSize/2.0f; - unsigned int side = 18; + unsigned int side = 20; generateGrid(map,position,side,side,sideSize,closeMark); Dart dEnd = map.end(); diff --git a/Apps/Examples/SocialAgents/src/env_map.cpp b/Apps/Examples/SocialAgents/src/env_map.cpp index 68e0e0d7126e347add9b7d1b9322710d5047e34a..971751c7ed1ea9759199956546c7ad14669fad77 100644 --- a/Apps/Examples/SocialAgents/src/env_map.cpp +++ b/Apps/Examples/SocialAgents/src/env_map.cpp @@ -350,7 +350,14 @@ void EnvMap::updateMap() for(std::vector::iterator it = agents.begin(); it != agents.end(); ++it) { if(!map.sameFace(d, (*it)->part->d)) + { std::cout << "aaaaaaaaaaaaaaaaaaa" << std::endl ; + std::cout << (*it)->part->state << std::endl ; + if(map.sameFace(map.phi2(d), (*it)->part->d)) + { + std::cout << "saucisse" << std::endl ; + } + } } } } @@ -367,15 +374,28 @@ void EnvMap::subdivideFaces() if(!m.isMarked(d)) { m.mark(d) ; - if(!closeMark.isMarked(d) && agentvect[d].size() > 8) + if(!closeMark.isMarked(d) && agentvect[d].size() > 5) { if(!map.faceIsSubdivided(d)) { + d = map.faceOldestDart(d) ; + std::vector agents ; agents.swap(agentvect[d]) ; unsigned int cur = map.getCurrentLevel() ; unsigned int fLevel = map.faceLevel(d) ; + +// std::cout << "cur -> " << cur << " / fLevel -> " << fLevel << " :" ; +// Dart fit = d ; +// do +// { +// unsigned int e = map.getDartEmbedding(FACE_ORBIT, fit) ; +// if(e == EMBNULL) std::cout << " -" ; else std::cout << " " << e ; +// fit = map.phi1(fit) ; +// } while(fit != d) ; +// std::cout << std::endl ; + map.setCurrentLevel(fLevel) ; std::vector marked ; Dart fit = d ; @@ -389,16 +409,35 @@ void EnvMap::subdivideFaces() Algo::IHM::subdivideFace(map, d, position) ; map.setCurrentLevel(fLevel + 1) ; + +// Dart cv = map.phi2(map.phi1(d)) ; +// Dart vit = cv ; +// unsigned int i = 1 ; +// do +// { +// std::cout << " face " << i << " -> " ; +// Dart f = vit ; +// do +// { +// unsigned int e = map.getDartEmbedding(FACE_ORBIT, f) ; +// if(e == EMBNULL) std::cout << " -" ; else std::cout << " " << e ; +// f = map.phi1(f) ; +// } while(f != vit) ; +// std::cout << std::endl ; +// vit = map.alpha1(vit) ; +// ++i ; +// } while(vit != cv) ; + for(std::vector::iterator it = marked.begin(); it != marked.end(); ++it) closeMark.mark(map.phi2(*it)) ; + map.setCurrentLevel(cur) ; + for(PFP::AGENTS::iterator it = agents.begin(); it != agents.end(); ++it) { resetAgentInFace(*it) ; agentvect[(*it)->part->d].push_back(*it) ; } - - map.setCurrentLevel(cur) ; } } } diff --git a/Apps/Examples/SocialAgents/src/viewer.cpp b/Apps/Examples/SocialAgents/src/viewer.cpp index 0cdfca686b4a86d54c527bf292432684251ac79c..9ce82671f9e9a326cc556fe2e3a0380a68955e91 100644 --- a/Apps/Examples/SocialAgents/src/viewer.cpp +++ b/Apps/Examples/SocialAgents/src/viewer.cpp @@ -191,18 +191,18 @@ void MyGlutWin::myRedraw() // glColor3f(i%int(2.0f/3.0f*v.size())/(v.size()/3.0f),i%int(1.0f/3.0f*v.size())/(v.size()/3.0f),i/(v.size()/3.0f)); // glCircle3i(v[i][0],v[i][1],1.5f); glPushMatrix(); - Geom::Plane3D pl = Algo::Geometry::trianglePlane(sim->envMap.map,sim->agents_[i]->nearestDart,sim->envMap.position); +// Geom::Plane3D pl = Algo::Geometry::trianglePlane(sim->envMap.map,sim->agents_[i]->nearestDart,sim->envMap.position); VEC3 pBase(sim->agents_[i]->position_); - VEC3 posR; - pl.normal() = -1.0f*pl.normal(); + VEC3 posR = pBase; +// pl.normal() = -1.0f*pl.normal(); // VEC3 v(sim->envMap.position[sim->agents_[i]->nearestDart]-pBase); // float scal = v*pl.normal(); // posR = pBase + scal*pl.normal(); - VEC3 dir(0.0f,0.0f,-1.0f); - pBase[2]=100000.0f; - Geom::intersectPlaneRay >(pl,pBase,dir,posR); +// VEC3 dir(0.0f,0.0f,-1.0f); +// pBase[2]=100000.0f; +// Geom::intersectPlaneRay >(pl,pBase,dir,posR); // VEC3 posR(sim->agents_[i]->position_[0],sim->agents_[i]->position_[1],0); glTranslatef(posR[0],posR[1],posR[2]); diff --git a/ThirdParty/Assimp/code/cmake_install.cmake b/ThirdParty/Assimp/code/cmake_install.cmake index 448f63bef44c765ac68866997f76d62c61e0a4a3..edc90b6fa077e9775bc5e3afd27c4b42f092b09b 100644 --- a/ThirdParty/Assimp/code/cmake_install.cmake +++ b/ThirdParty/Assimp/code/cmake_install.cmake @@ -1,4 +1,4 @@ -# Install script for directory: /home/thery/Downloads/ASS/code +# Install script for directory: /home/kraemer/Dev/CGoGN/ThirdParty/Assimp/code # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) @@ -32,81 +32,3 @@ IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) SET(CMAKE_INSTALL_SO_NO_EXE "1") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") - FOREACH(file - "$ENV{DESTDIR}/usr/local/lib/libassimp.so.1.0.0" - "$ENV{DESTDIR}/usr/local/lib/libassimp.so.1" - "$ENV{DESTDIR}/usr/local/lib/libassimp.so" - ) - IF(EXISTS "${file}" AND - NOT IS_SYMLINK "${file}") - FILE(RPATH_CHECK - FILE "${file}" - RPATH "") - ENDIF() - ENDFOREACH() - FILE(INSTALL DESTINATION "/usr/local/lib" TYPE SHARED_LIBRARY FILES - "/home/thery/Downloads/ASS/lib/libassimp.so.1.0.0" - "/home/thery/Downloads/ASS/lib/libassimp.so.1" - "/home/thery/Downloads/ASS/lib/libassimp.so" - ) - FOREACH(file - "$ENV{DESTDIR}/usr/local/lib/libassimp.so.1.0.0" - "$ENV{DESTDIR}/usr/local/lib/libassimp.so.1" - "$ENV{DESTDIR}/usr/local/lib/libassimp.so" - ) - IF(EXISTS "${file}" AND - NOT IS_SYMLINK "${file}") - IF(CMAKE_INSTALL_DO_STRIP) - EXECUTE_PROCESS(COMMAND "/usr/bin/strip" "${file}") - ENDIF(CMAKE_INSTALL_DO_STRIP) - ENDIF() - ENDFOREACH() -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") - FILE(INSTALL DESTINATION "/usr/local/include/assimp" TYPE FILE FILES - "/home/thery/Downloads/ASS/code/../include/aiAnim.h" - "/home/thery/Downloads/ASS/code/../include/aiAssert.h" - "/home/thery/Downloads/ASS/code/../include/aiCamera.h" - "/home/thery/Downloads/ASS/code/../include/aiColor4D.h" - "/home/thery/Downloads/ASS/code/../include/aiColor4D.inl" - "/home/thery/Downloads/ASS/code/../include/aiConfig.h" - "/home/thery/Downloads/ASS/code/../include/aiDefines.h" - "/home/thery/Downloads/ASS/code/../include/aiFileIO.h" - "/home/thery/Downloads/ASS/code/../include/aiLight.h" - "/home/thery/Downloads/ASS/code/../include/aiMaterial.h" - "/home/thery/Downloads/ASS/code/../include/aiMaterial.inl" - "/home/thery/Downloads/ASS/code/../include/aiMatrix3x3.h" - "/home/thery/Downloads/ASS/code/../include/aiMatrix3x3.inl" - "/home/thery/Downloads/ASS/code/../include/aiMatrix4x4.h" - "/home/thery/Downloads/ASS/code/../include/aiMatrix4x4.inl" - "/home/thery/Downloads/ASS/code/../include/aiMesh.h" - "/home/thery/Downloads/ASS/code/../include/aiPostProcess.h" - "/home/thery/Downloads/ASS/code/../include/aiQuaternion.h" - "/home/thery/Downloads/ASS/code/../include/aiScene.h" - "/home/thery/Downloads/ASS/code/../include/aiTexture.h" - "/home/thery/Downloads/ASS/code/../include/aiTypes.h" - "/home/thery/Downloads/ASS/code/../include/aiVector2D.h" - "/home/thery/Downloads/ASS/code/../include/aiVector3D.h" - "/home/thery/Downloads/ASS/code/../include/aiVector3D.inl" - "/home/thery/Downloads/ASS/code/../include/aiVersion.h" - "/home/thery/Downloads/ASS/code/../include/assimp.h" - "/home/thery/Downloads/ASS/code/../include/assimp.hpp" - "/home/thery/Downloads/ASS/code/../include/DefaultLogger.h" - "/home/thery/Downloads/ASS/code/../include/IOStream.h" - "/home/thery/Downloads/ASS/code/../include/IOSystem.h" - "/home/thery/Downloads/ASS/code/../include/Logger.h" - "/home/thery/Downloads/ASS/code/../include/LogStream.h" - "/home/thery/Downloads/ASS/code/../include/NullLogger.h" - ) -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") - FILE(INSTALL DESTINATION "/usr/local/include/assimp/Compiler" TYPE FILE FILES - "/home/thery/Downloads/ASS/code/../include/Compiler/pushpack1.h" - "/home/thery/Downloads/ASS/code/../include/Compiler/poppack1.h" - "/home/thery/Downloads/ASS/code/pstdint.h" - ) -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") - diff --git a/include/Algo/ImplicitHierarchicalMesh/ihm.h b/include/Algo/ImplicitHierarchicalMesh/ihm.h index d38e4a31f708aa4dd1600e7febb4469a7353162e..817dd5a391550cda429f1b9e44146f60c50f83d3 100644 --- a/include/Algo/ImplicitHierarchicalMesh/ihm.h +++ b/include/Algo/ImplicitHierarchicalMesh/ihm.h @@ -106,6 +106,12 @@ public: virtual bool foreach_dart_of_cc(Dart d, FunctorType& f) ; + /*************************************************** + * MAP MANIPULATION * + ***************************************************/ + + void splitFace(Dart d, Dart e) ; + /*************************************************** * LEVELS MANAGEMENT * ***************************************************/ diff --git a/include/Algo/ImplicitHierarchicalMesh/ihm.hpp b/include/Algo/ImplicitHierarchicalMesh/ihm.hpp index 8214559091baf02c67eb8a25a1777e619938fac8..33104160218e657250f2abbce733d4b28c6a4527 100644 --- a/include/Algo/ImplicitHierarchicalMesh/ihm.hpp +++ b/include/Algo/ImplicitHierarchicalMesh/ihm.hpp @@ -158,7 +158,7 @@ inline void ImplicitHierarchicalMap::next(Dart& d) do { Map2::next(d) ; - } while(m_dartLevel[d] > m_curLevel && d != Map2::end()) ; + } while(d != Map2::end() && m_dartLevel[d] > m_curLevel) ; } inline bool ImplicitHierarchicalMap::foreach_dart_of_vertex(Dart d, FunctorType& f) @@ -248,6 +248,20 @@ inline bool ImplicitHierarchicalMap::foreach_dart_of_cc(Dart d, FunctorType& f) return foreach_dart_of_oriented_volume(d, f) ; } +/*************************************************** + * MAP MANIPULATION * + ***************************************************/ + +inline void ImplicitHierarchicalMap::splitFace(Dart d, Dart e) +{ + EmbeddedMap2::splitFace(d, e) ; + unsigned int cur = m_curLevel ; + m_curLevel = m_maxLevel ; + this->embedOrbit(FACE_ORBIT, d, this->getDartEmbedding(FACE_ORBIT, d)) ; + this->embedOrbit(FACE_ORBIT, e, this->getDartEmbedding(FACE_ORBIT, e)) ; + m_curLevel = cur ; +} + /*************************************************** * LEVELS MANAGEMENT * ***************************************************/