diff --git a/cmake/3rd.cmake b/cmake/3rd.cmake index d2fcec7..5eacaf5 100644 --- a/cmake/3rd.cmake +++ b/cmake/3rd.cmake @@ -82,6 +82,8 @@ CPMAddPackage( ) # https://github.com/g-truc/glm +set(gRPC_INSTALL ON CACHE BOOL "") +set(gRPC_BUILD_TESTS OFF CACHE BOOL "") CPMAddPackage( NAME glm GITHUB_REPOSITORY g-truc/glm diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 18bdb7b..7de03ea 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,6 +4,91 @@ # # CMakeLists.txt for Simple-XX/SimplePhysicsEngine. -add_subdirectory(engine) -add_subdirectory(demo2d) -add_subdirectory(demo3d) +add_library(${PROJECT_NAME}-static STATIC + dtk/dtk.cpp + dtk/dtkAssert.cpp + dtk/dtkCollisionDetectBasic.cpp + dtk/dtkCollisionDetectHierarchy.cpp + dtk/dtkCollisionDetectHierarchyKDOPS.cpp + dtk/dtkCollisionDetectNode.cpp + dtk/dtkCollisionDetectNodeKDOPS.cpp + dtk/dtkCollisionDetectPrimitive.cpp + dtk/dtkCollisionDetectStage.cpp + # dtk/dtkCollisionDetectStage.cpp.bak + dtk/dtkErrorManager.cpp + dtk/dtkGraphicsKernel.cpp + # dtk/dtkGraphicsKernel.h.bak + dtk/dtkIntersectTest.cpp + dtk/dtkPhysCore.cpp + # dtk/dtkPhysCore.cpp.bak + dtk/dtkPhysKnotPlanner.cpp + dtk/dtkPhysMassPoint.cpp + dtk/dtkPhysMassSpring.cpp + # dtk/dtkPhysMassSpring.h.bak + dtk/dtkPhysMassSpringCollisionResponse.cpp + dtk/dtkPhysMassSpringThread.cpp + dtk/dtkPhysMassSpringThreadCollisionResponse.cpp + dtk/dtkPhysParticle.cpp + dtk/dtkPhysParticleSystem.cpp + dtk/dtkPhysSpring.cpp + dtk/dtkPhysTetraMassSpring.cpp + dtk/dtkPointsReader.cpp + dtk/dtkPointsWriter.cpp + dtk/dtkScene.cpp + dtk/dtkSign.cpp + dtk/dtkStaticMeshEliminator.cpp + dtk/dtkStaticTetraMesh.cpp + dtk/dtkStaticTetraMeshReader.cpp + dtk/dtkStaticTetraMeshWriter.cpp + dtk/dtkStaticTriangleMesh.cpp + dtk/dtkStaticTriangleMeshReader.cpp + dtk/dtkStaticTriangleMeshWriter.cpp + + math/dtkMatrixOp.cpp + math/dtkMatrixOP.h + + physics/dtkJoint.cpp + physics/dtkRigidBody.cpp +) + +target_include_directories(${PROJECT_NAME}-static PRIVATE + $ + + $ + +) + +target_link_libraries(${PROJECT_NAME}-static PRIVATE + Boost::headers + CGAL + glfw + glm::glm +) + +# 打包 +# @todo 导出静态库与动态库 +packageProject( + # 要导出的 target + NAME ${PROJECT_NAME}-static + # 版本 + VERSION ${PROJECT_VERSION} + # 生成文件目录 + BINARY_DIR ${PROJECT_BINARY_DIR} + # 头文件路径 + INCLUDE_DIR ${PROJECT_SOURCE_DIR}/src + # 与 target 的 INSTALL_INTERFACE 一致 + INCLUDE_DESTINATION include/${PROJECT_NAME}-${PROJECT_VERSION} + # 头文件过滤 + INCLUDE_HEADER_PATTERN "*.h" + # namespace 名称,不能包含 '::' + NAMESPACE ${PROJECT_NAMESPACE} + # (optional) option to disable the versioning of install destinations + DISABLE_VERSION_SUFFIX YES + ARCH_INDEPENDENT YES + # 生成 CPack 变量 + CPACK YES +) diff --git a/src/engine/dtk/dtk.cpp b/src/dtk/dtk.cpp similarity index 100% rename from src/engine/dtk/dtk.cpp rename to src/dtk/dtk.cpp diff --git a/src/engine/dtk/dtk.h b/src/dtk/dtk.h similarity index 100% rename from src/engine/dtk/dtk.h rename to src/dtk/dtk.h diff --git a/src/engine/dtk/dtkArray.h b/src/dtk/dtkArray.h similarity index 100% rename from src/engine/dtk/dtkArray.h rename to src/dtk/dtkArray.h diff --git a/src/engine/dtk/dtkAssert.cpp b/src/dtk/dtkAssert.cpp similarity index 100% rename from src/engine/dtk/dtkAssert.cpp rename to src/dtk/dtkAssert.cpp diff --git a/src/engine/dtk/dtkAssert.h b/src/dtk/dtkAssert.h similarity index 100% rename from src/engine/dtk/dtkAssert.h rename to src/dtk/dtkAssert.h diff --git a/src/engine/dtk/dtkCollisionDetectBasic.cpp b/src/dtk/dtkCollisionDetectBasic.cpp similarity index 100% rename from src/engine/dtk/dtkCollisionDetectBasic.cpp rename to src/dtk/dtkCollisionDetectBasic.cpp diff --git a/src/engine/dtk/dtkCollisionDetectBasic.h b/src/dtk/dtkCollisionDetectBasic.h similarity index 100% rename from src/engine/dtk/dtkCollisionDetectBasic.h rename to src/dtk/dtkCollisionDetectBasic.h diff --git a/src/engine/dtk/dtkCollisionDetectHierarchy.cpp b/src/dtk/dtkCollisionDetectHierarchy.cpp similarity index 100% rename from src/engine/dtk/dtkCollisionDetectHierarchy.cpp rename to src/dtk/dtkCollisionDetectHierarchy.cpp diff --git a/src/engine/dtk/dtkCollisionDetectHierarchy.h b/src/dtk/dtkCollisionDetectHierarchy.h similarity index 100% rename from src/engine/dtk/dtkCollisionDetectHierarchy.h rename to src/dtk/dtkCollisionDetectHierarchy.h diff --git a/src/engine/dtk/dtkCollisionDetectHierarchyKDOPS.cpp b/src/dtk/dtkCollisionDetectHierarchyKDOPS.cpp similarity index 100% rename from src/engine/dtk/dtkCollisionDetectHierarchyKDOPS.cpp rename to src/dtk/dtkCollisionDetectHierarchyKDOPS.cpp diff --git a/src/engine/dtk/dtkCollisionDetectHierarchyKDOPS.h b/src/dtk/dtkCollisionDetectHierarchyKDOPS.h similarity index 100% rename from src/engine/dtk/dtkCollisionDetectHierarchyKDOPS.h rename to src/dtk/dtkCollisionDetectHierarchyKDOPS.h diff --git a/src/engine/dtk/dtkCollisionDetectNode.cpp b/src/dtk/dtkCollisionDetectNode.cpp similarity index 100% rename from src/engine/dtk/dtkCollisionDetectNode.cpp rename to src/dtk/dtkCollisionDetectNode.cpp diff --git a/src/engine/dtk/dtkCollisionDetectNode.h b/src/dtk/dtkCollisionDetectNode.h similarity index 100% rename from src/engine/dtk/dtkCollisionDetectNode.h rename to src/dtk/dtkCollisionDetectNode.h diff --git a/src/engine/dtk/dtkCollisionDetectNodeKDOPS.cpp b/src/dtk/dtkCollisionDetectNodeKDOPS.cpp similarity index 100% rename from src/engine/dtk/dtkCollisionDetectNodeKDOPS.cpp rename to src/dtk/dtkCollisionDetectNodeKDOPS.cpp diff --git a/src/engine/dtk/dtkCollisionDetectNodeKDOPS.h b/src/dtk/dtkCollisionDetectNodeKDOPS.h similarity index 100% rename from src/engine/dtk/dtkCollisionDetectNodeKDOPS.h rename to src/dtk/dtkCollisionDetectNodeKDOPS.h diff --git a/src/engine/dtk/dtkCollisionDetectPrimitive.cpp b/src/dtk/dtkCollisionDetectPrimitive.cpp similarity index 100% rename from src/engine/dtk/dtkCollisionDetectPrimitive.cpp rename to src/dtk/dtkCollisionDetectPrimitive.cpp diff --git a/src/engine/dtk/dtkCollisionDetectPrimitive.h b/src/dtk/dtkCollisionDetectPrimitive.h similarity index 100% rename from src/engine/dtk/dtkCollisionDetectPrimitive.h rename to src/dtk/dtkCollisionDetectPrimitive.h diff --git a/src/engine/dtk/dtkCollisionDetectStage.cpp b/src/dtk/dtkCollisionDetectStage.cpp similarity index 100% rename from src/engine/dtk/dtkCollisionDetectStage.cpp rename to src/dtk/dtkCollisionDetectStage.cpp diff --git a/src/engine/dtk/dtkCollisionDetectStage.cpp.bak b/src/dtk/dtkCollisionDetectStage.cpp.bak similarity index 100% rename from src/engine/dtk/dtkCollisionDetectStage.cpp.bak rename to src/dtk/dtkCollisionDetectStage.cpp.bak diff --git a/src/engine/dtk/dtkCollisionDetectStage.h b/src/dtk/dtkCollisionDetectStage.h similarity index 100% rename from src/engine/dtk/dtkCollisionDetectStage.h rename to src/dtk/dtkCollisionDetectStage.h diff --git a/src/engine/dtk/dtkConfig.h b/src/dtk/dtkConfig.h similarity index 100% rename from src/engine/dtk/dtkConfig.h rename to src/dtk/dtkConfig.h diff --git a/src/engine/dtk/dtkError.h b/src/dtk/dtkError.h similarity index 100% rename from src/engine/dtk/dtkError.h rename to src/dtk/dtkError.h diff --git a/src/engine/dtk/dtkErrorManager.cpp b/src/dtk/dtkErrorManager.cpp similarity index 100% rename from src/engine/dtk/dtkErrorManager.cpp rename to src/dtk/dtkErrorManager.cpp diff --git a/src/engine/dtk/dtkErrorManager.h b/src/dtk/dtkErrorManager.h similarity index 100% rename from src/engine/dtk/dtkErrorManager.h rename to src/dtk/dtkErrorManager.h diff --git a/src/engine/dtk/dtkExports.h b/src/dtk/dtkExports.h similarity index 100% rename from src/engine/dtk/dtkExports.h rename to src/dtk/dtkExports.h diff --git a/src/engine/dtk/dtkGraphics.h b/src/dtk/dtkGraphics.h similarity index 100% rename from src/engine/dtk/dtkGraphics.h rename to src/dtk/dtkGraphics.h diff --git a/src/engine/dtk/dtkGraphicsKernel.cpp b/src/dtk/dtkGraphicsKernel.cpp similarity index 100% rename from src/engine/dtk/dtkGraphicsKernel.cpp rename to src/dtk/dtkGraphicsKernel.cpp diff --git a/src/engine/dtk/dtkGraphicsKernel.h b/src/dtk/dtkGraphicsKernel.h similarity index 100% rename from src/engine/dtk/dtkGraphicsKernel.h rename to src/dtk/dtkGraphicsKernel.h diff --git a/src/engine/dtk/dtkGraphicsKernel.h.bak b/src/dtk/dtkGraphicsKernel.h.bak similarity index 100% rename from src/engine/dtk/dtkGraphicsKernel.h.bak rename to src/dtk/dtkGraphicsKernel.h.bak diff --git a/src/engine/dtk/dtkGraphicsTools.h b/src/dtk/dtkGraphicsTools.h similarity index 100% rename from src/engine/dtk/dtkGraphicsTools.h rename to src/dtk/dtkGraphicsTools.h diff --git a/src/engine/dtk/dtkIDTypes.h b/src/dtk/dtkIDTypes.h similarity index 100% rename from src/engine/dtk/dtkIDTypes.h rename to src/dtk/dtkIDTypes.h diff --git a/src/engine/dtk/dtkIO.h b/src/dtk/dtkIO.h similarity index 100% rename from src/engine/dtk/dtkIO.h rename to src/dtk/dtkIO.h diff --git a/src/engine/dtk/dtkImports.h b/src/dtk/dtkImports.h similarity index 100% rename from src/engine/dtk/dtkImports.h rename to src/dtk/dtkImports.h diff --git a/src/engine/dtk/dtkInit.h b/src/dtk/dtkInit.h similarity index 100% rename from src/engine/dtk/dtkInit.h rename to src/dtk/dtkInit.h diff --git a/src/engine/dtk/dtkIntersectTest.cpp b/src/dtk/dtkIntersectTest.cpp similarity index 100% rename from src/engine/dtk/dtkIntersectTest.cpp rename to src/dtk/dtkIntersectTest.cpp diff --git a/src/engine/dtk/dtkIntersectTest.h b/src/dtk/dtkIntersectTest.h similarity index 100% rename from src/engine/dtk/dtkIntersectTest.h rename to src/dtk/dtkIntersectTest.h diff --git a/src/engine/dtk/dtkMatrixAlgorithm.h b/src/dtk/dtkMatrixAlgorithm.h similarity index 100% rename from src/engine/dtk/dtkMatrixAlgorithm.h rename to src/dtk/dtkMatrixAlgorithm.h diff --git a/src/engine/dtk/dtkPhysCore.cpp b/src/dtk/dtkPhysCore.cpp similarity index 100% rename from src/engine/dtk/dtkPhysCore.cpp rename to src/dtk/dtkPhysCore.cpp diff --git a/src/engine/dtk/dtkPhysCore.cpp.bak b/src/dtk/dtkPhysCore.cpp.bak similarity index 100% rename from src/engine/dtk/dtkPhysCore.cpp.bak rename to src/dtk/dtkPhysCore.cpp.bak diff --git a/src/engine/dtk/dtkPhysCore.h b/src/dtk/dtkPhysCore.h similarity index 100% rename from src/engine/dtk/dtkPhysCore.h rename to src/dtk/dtkPhysCore.h diff --git a/src/engine/dtk/dtkPhysKnotPlanner.cpp b/src/dtk/dtkPhysKnotPlanner.cpp similarity index 100% rename from src/engine/dtk/dtkPhysKnotPlanner.cpp rename to src/dtk/dtkPhysKnotPlanner.cpp diff --git a/src/engine/dtk/dtkPhysKnotPlanner.h b/src/dtk/dtkPhysKnotPlanner.h similarity index 100% rename from src/engine/dtk/dtkPhysKnotPlanner.h rename to src/dtk/dtkPhysKnotPlanner.h diff --git a/src/engine/dtk/dtkPhysMassPoint.cpp b/src/dtk/dtkPhysMassPoint.cpp similarity index 100% rename from src/engine/dtk/dtkPhysMassPoint.cpp rename to src/dtk/dtkPhysMassPoint.cpp diff --git a/src/engine/dtk/dtkPhysMassPoint.h b/src/dtk/dtkPhysMassPoint.h similarity index 100% rename from src/engine/dtk/dtkPhysMassPoint.h rename to src/dtk/dtkPhysMassPoint.h diff --git a/src/engine/dtk/dtkPhysMassSpring.cpp b/src/dtk/dtkPhysMassSpring.cpp similarity index 100% rename from src/engine/dtk/dtkPhysMassSpring.cpp rename to src/dtk/dtkPhysMassSpring.cpp diff --git a/src/engine/dtk/dtkPhysMassSpring.h b/src/dtk/dtkPhysMassSpring.h similarity index 100% rename from src/engine/dtk/dtkPhysMassSpring.h rename to src/dtk/dtkPhysMassSpring.h diff --git a/src/engine/dtk/dtkPhysMassSpring.h.bak b/src/dtk/dtkPhysMassSpring.h.bak similarity index 100% rename from src/engine/dtk/dtkPhysMassSpring.h.bak rename to src/dtk/dtkPhysMassSpring.h.bak diff --git a/src/engine/dtk/dtkPhysMassSpringCollisionResponse.cpp b/src/dtk/dtkPhysMassSpringCollisionResponse.cpp similarity index 100% rename from src/engine/dtk/dtkPhysMassSpringCollisionResponse.cpp rename to src/dtk/dtkPhysMassSpringCollisionResponse.cpp diff --git a/src/engine/dtk/dtkPhysMassSpringCollisionResponse.h b/src/dtk/dtkPhysMassSpringCollisionResponse.h similarity index 100% rename from src/engine/dtk/dtkPhysMassSpringCollisionResponse.h rename to src/dtk/dtkPhysMassSpringCollisionResponse.h diff --git a/src/engine/dtk/dtkPhysMassSpringThread.cpp b/src/dtk/dtkPhysMassSpringThread.cpp similarity index 100% rename from src/engine/dtk/dtkPhysMassSpringThread.cpp rename to src/dtk/dtkPhysMassSpringThread.cpp diff --git a/src/engine/dtk/dtkPhysMassSpringThread.h b/src/dtk/dtkPhysMassSpringThread.h similarity index 100% rename from src/engine/dtk/dtkPhysMassSpringThread.h rename to src/dtk/dtkPhysMassSpringThread.h diff --git a/src/engine/dtk/dtkPhysMassSpringThreadCollisionResponse.cpp b/src/dtk/dtkPhysMassSpringThreadCollisionResponse.cpp similarity index 100% rename from src/engine/dtk/dtkPhysMassSpringThreadCollisionResponse.cpp rename to src/dtk/dtkPhysMassSpringThreadCollisionResponse.cpp diff --git a/src/engine/dtk/dtkPhysMassSpringThreadCollisionResponse.h b/src/dtk/dtkPhysMassSpringThreadCollisionResponse.h similarity index 100% rename from src/engine/dtk/dtkPhysMassSpringThreadCollisionResponse.h rename to src/dtk/dtkPhysMassSpringThreadCollisionResponse.h diff --git a/src/engine/dtk/dtkPhysParticle.cpp b/src/dtk/dtkPhysParticle.cpp similarity index 100% rename from src/engine/dtk/dtkPhysParticle.cpp rename to src/dtk/dtkPhysParticle.cpp diff --git a/src/engine/dtk/dtkPhysParticle.h b/src/dtk/dtkPhysParticle.h similarity index 100% rename from src/engine/dtk/dtkPhysParticle.h rename to src/dtk/dtkPhysParticle.h diff --git a/src/engine/dtk/dtkPhysParticleSystem.cpp b/src/dtk/dtkPhysParticleSystem.cpp similarity index 100% rename from src/engine/dtk/dtkPhysParticleSystem.cpp rename to src/dtk/dtkPhysParticleSystem.cpp diff --git a/src/engine/dtk/dtkPhysParticleSystem.h b/src/dtk/dtkPhysParticleSystem.h similarity index 100% rename from src/engine/dtk/dtkPhysParticleSystem.h rename to src/dtk/dtkPhysParticleSystem.h diff --git a/src/engine/dtk/dtkPhysSpring.cpp b/src/dtk/dtkPhysSpring.cpp similarity index 100% rename from src/engine/dtk/dtkPhysSpring.cpp rename to src/dtk/dtkPhysSpring.cpp diff --git a/src/engine/dtk/dtkPhysSpring.h b/src/dtk/dtkPhysSpring.h similarity index 100% rename from src/engine/dtk/dtkPhysSpring.h rename to src/dtk/dtkPhysSpring.h diff --git a/src/engine/dtk/dtkPhysTetraMassSpring.cpp b/src/dtk/dtkPhysTetraMassSpring.cpp similarity index 100% rename from src/engine/dtk/dtkPhysTetraMassSpring.cpp rename to src/dtk/dtkPhysTetraMassSpring.cpp diff --git a/src/engine/dtk/dtkPhysTetraMassSpring.h b/src/dtk/dtkPhysTetraMassSpring.h similarity index 100% rename from src/engine/dtk/dtkPhysTetraMassSpring.h rename to src/dtk/dtkPhysTetraMassSpring.h diff --git a/src/engine/dtk/dtkPoints.h b/src/dtk/dtkPoints.h similarity index 100% rename from src/engine/dtk/dtkPoints.h rename to src/dtk/dtkPoints.h diff --git a/src/engine/dtk/dtkPointsReader.cpp b/src/dtk/dtkPointsReader.cpp similarity index 100% rename from src/engine/dtk/dtkPointsReader.cpp rename to src/dtk/dtkPointsReader.cpp diff --git a/src/engine/dtk/dtkPointsReader.h b/src/dtk/dtkPointsReader.h similarity index 100% rename from src/engine/dtk/dtkPointsReader.h rename to src/dtk/dtkPointsReader.h diff --git a/src/engine/dtk/dtkPointsVector.h b/src/dtk/dtkPointsVector.h similarity index 100% rename from src/engine/dtk/dtkPointsVector.h rename to src/dtk/dtkPointsVector.h diff --git a/src/engine/dtk/dtkPointsWriter.cpp b/src/dtk/dtkPointsWriter.cpp similarity index 100% rename from src/engine/dtk/dtkPointsWriter.cpp rename to src/dtk/dtkPointsWriter.cpp diff --git a/src/engine/dtk/dtkPointsWriter.h b/src/dtk/dtkPointsWriter.h similarity index 100% rename from src/engine/dtk/dtkPointsWriter.h rename to src/dtk/dtkPointsWriter.h diff --git a/src/engine/dtk/dtkProperty.h b/src/dtk/dtkProperty.h similarity index 100% rename from src/engine/dtk/dtkProperty.h rename to src/dtk/dtkProperty.h diff --git a/src/engine/dtk/dtkRandom.h b/src/dtk/dtkRandom.h similarity index 100% rename from src/engine/dtk/dtkRandom.h rename to src/dtk/dtkRandom.h diff --git a/src/engine/dtk/dtkScene.cpp b/src/dtk/dtkScene.cpp similarity index 100% rename from src/engine/dtk/dtkScene.cpp rename to src/dtk/dtkScene.cpp diff --git a/src/engine/dtk/dtkScene.h b/src/dtk/dtkScene.h similarity index 100% rename from src/engine/dtk/dtkScene.h rename to src/dtk/dtkScene.h diff --git a/src/engine/dtk/dtkSign.cpp b/src/dtk/dtkSign.cpp similarity index 100% rename from src/engine/dtk/dtkSign.cpp rename to src/dtk/dtkSign.cpp diff --git a/src/engine/dtk/dtkSign.h b/src/dtk/dtkSign.h similarity index 100% rename from src/engine/dtk/dtkSign.h rename to src/dtk/dtkSign.h diff --git a/src/engine/dtk/dtkStaticMeshEliminator.cpp b/src/dtk/dtkStaticMeshEliminator.cpp similarity index 100% rename from src/engine/dtk/dtkStaticMeshEliminator.cpp rename to src/dtk/dtkStaticMeshEliminator.cpp diff --git a/src/engine/dtk/dtkStaticMeshEliminator.h b/src/dtk/dtkStaticMeshEliminator.h similarity index 100% rename from src/engine/dtk/dtkStaticMeshEliminator.h rename to src/dtk/dtkStaticMeshEliminator.h diff --git a/src/engine/dtk/dtkStaticTetraMesh.cpp b/src/dtk/dtkStaticTetraMesh.cpp similarity index 100% rename from src/engine/dtk/dtkStaticTetraMesh.cpp rename to src/dtk/dtkStaticTetraMesh.cpp diff --git a/src/engine/dtk/dtkStaticTetraMesh.h b/src/dtk/dtkStaticTetraMesh.h similarity index 100% rename from src/engine/dtk/dtkStaticTetraMesh.h rename to src/dtk/dtkStaticTetraMesh.h diff --git a/src/engine/dtk/dtkStaticTetraMeshReader.cpp b/src/dtk/dtkStaticTetraMeshReader.cpp similarity index 100% rename from src/engine/dtk/dtkStaticTetraMeshReader.cpp rename to src/dtk/dtkStaticTetraMeshReader.cpp diff --git a/src/engine/dtk/dtkStaticTetraMeshReader.h b/src/dtk/dtkStaticTetraMeshReader.h similarity index 100% rename from src/engine/dtk/dtkStaticTetraMeshReader.h rename to src/dtk/dtkStaticTetraMeshReader.h diff --git a/src/engine/dtk/dtkStaticTetraMeshWriter.cpp b/src/dtk/dtkStaticTetraMeshWriter.cpp similarity index 100% rename from src/engine/dtk/dtkStaticTetraMeshWriter.cpp rename to src/dtk/dtkStaticTetraMeshWriter.cpp diff --git a/src/engine/dtk/dtkStaticTetraMeshWriter.h b/src/dtk/dtkStaticTetraMeshWriter.h similarity index 100% rename from src/engine/dtk/dtkStaticTetraMeshWriter.h rename to src/dtk/dtkStaticTetraMeshWriter.h diff --git a/src/engine/dtk/dtkStaticTriangleMesh.cpp b/src/dtk/dtkStaticTriangleMesh.cpp similarity index 100% rename from src/engine/dtk/dtkStaticTriangleMesh.cpp rename to src/dtk/dtkStaticTriangleMesh.cpp diff --git a/src/engine/dtk/dtkStaticTriangleMesh.h b/src/dtk/dtkStaticTriangleMesh.h similarity index 100% rename from src/engine/dtk/dtkStaticTriangleMesh.h rename to src/dtk/dtkStaticTriangleMesh.h diff --git a/src/engine/dtk/dtkStaticTriangleMeshReader.cpp b/src/dtk/dtkStaticTriangleMeshReader.cpp similarity index 100% rename from src/engine/dtk/dtkStaticTriangleMeshReader.cpp rename to src/dtk/dtkStaticTriangleMeshReader.cpp diff --git a/src/engine/dtk/dtkStaticTriangleMeshReader.h b/src/dtk/dtkStaticTriangleMeshReader.h similarity index 100% rename from src/engine/dtk/dtkStaticTriangleMeshReader.h rename to src/dtk/dtkStaticTriangleMeshReader.h diff --git a/src/engine/dtk/dtkStaticTriangleMeshWriter.cpp b/src/dtk/dtkStaticTriangleMeshWriter.cpp similarity index 100% rename from src/engine/dtk/dtkStaticTriangleMeshWriter.cpp rename to src/dtk/dtkStaticTriangleMeshWriter.cpp diff --git a/src/engine/dtk/dtkStaticTriangleMeshWriter.h b/src/dtk/dtkStaticTriangleMeshWriter.h similarity index 100% rename from src/engine/dtk/dtkStaticTriangleMeshWriter.h rename to src/dtk/dtkStaticTriangleMeshWriter.h diff --git a/src/engine/dtk/dtkTime.h b/src/dtk/dtkTime.h similarity index 100% rename from src/engine/dtk/dtkTime.h rename to src/dtk/dtkTime.h diff --git a/src/engine/dtk/dtkUtility.h b/src/dtk/dtkUtility.h similarity index 100% rename from src/engine/dtk/dtkUtility.h rename to src/dtk/dtkUtility.h diff --git a/src/engine/CMakeLists.txt b/src/engine/CMakeLists.txt deleted file mode 100644 index 37bc62f..0000000 --- a/src/engine/CMakeLists.txt +++ /dev/null @@ -1,181 +0,0 @@ - -# This file is a part of Simple-XX/SimplePhysicsEngine -# (https://github.com/Simple-XX/SimplePhysicsEngine). -# -# CMakeLists.txt for Simple-XX/SimplePhysicsEngine. - -project(dtk) - -option(GROUP_BY_EXPLORER ON) - -# aux_source_directory(. dir_source) -file(GLOB_RECURSE dir_source *.cpp) -file(GLOB_RECURSE dir_headers *.h) - -set(all_files ${dir_source} ${dir_headers}) - -foreach (fileItem ${all_files}) - # Get the directory of the source file - get_filename_component(PARENT_DIR "${fileItem}" DIRECTORY) - # Remove common directory prefix to make the group - string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}" "" GROUP "${PARENT_DIR}") - # Make sure we are using windows slashes - string(REPLACE "/" "\\" GROUP "${GROUP}") - # Group into "Source Files" and "Header Files" - set(GROUP "${GROUP}") - source_group("${GROUP}" FILES "${fileItem}") -endforeach () - -add_library(dtk STATIC - dtk/dtk.cpp - dtk/dtk.h - dtk/dtkArray.h - dtk/dtkAssert.cpp - dtk/dtkAssert.h - dtk/dtkCollisionDetectBasic.cpp - dtk/dtkCollisionDetectBasic.h - dtk/dtkCollisionDetectHierarchy.cpp - dtk/dtkCollisionDetectHierarchy.h - dtk/dtkCollisionDetectHierarchyKDOPS.cpp - dtk/dtkCollisionDetectHierarchyKDOPS.h - dtk/dtkCollisionDetectNode.cpp - dtk/dtkCollisionDetectNode.h - dtk/dtkCollisionDetectNodeKDOPS.cpp - dtk/dtkCollisionDetectNodeKDOPS.h - dtk/dtkCollisionDetectPrimitive.cpp - dtk/dtkCollisionDetectPrimitive.h - dtk/dtkCollisionDetectStage.cpp - # dtk/dtkCollisionDetectStage.cpp.bak - dtk/dtkCollisionDetectStage.h - dtk/dtkConfig.h - dtk/dtkError.h - dtk/dtkErrorManager.cpp - dtk/dtkErrorManager.h - dtk/dtkExports.h - dtk/dtkGraphics.h - dtk/dtkGraphicsKernel.cpp - dtk/dtkGraphicsKernel.h - # dtk/dtkGraphicsKernel.h.bak - dtk/dtkGraphicsTools.h - dtk/dtkIDTypes.h - dtk/dtkImports.h - dtk/dtkInit.h - dtk/dtkIntersectTest.cpp - dtk/dtkIntersectTest.h - dtk/dtkIO.h - dtk/dtkMatrixAlgorithm.h - dtk/dtkPhysCore.cpp - # dtk/dtkPhysCore.cpp.bak - dtk/dtkPhysCore.h - dtk/dtkPhysKnotPlanner.cpp - dtk/dtkPhysKnotPlanner.h - dtk/dtkPhysMassPoint.cpp - dtk/dtkPhysMassPoint.h - dtk/dtkPhysMassSpring.cpp - dtk/dtkPhysMassSpring.h - # dtk/dtkPhysMassSpring.h.bak - dtk/dtkPhysMassSpringCollisionResponse.cpp - dtk/dtkPhysMassSpringCollisionResponse.h - dtk/dtkPhysMassSpringThread.cpp - dtk/dtkPhysMassSpringThread.h - dtk/dtkPhysMassSpringThreadCollisionResponse.cpp - dtk/dtkPhysMassSpringThreadCollisionResponse.h - dtk/dtkPhysParticle.cpp - dtk/dtkPhysParticle.h - dtk/dtkPhysParticleSystem.cpp - dtk/dtkPhysParticleSystem.h - dtk/dtkPhysSpring.cpp - dtk/dtkPhysSpring.h - dtk/dtkPhysTetraMassSpring.cpp - dtk/dtkPhysTetraMassSpring.h - dtk/dtkPoints.h - dtk/dtkPointsReader.cpp - dtk/dtkPointsReader.h - dtk/dtkPointsVector.h - dtk/dtkPointsWriter.cpp - dtk/dtkPointsWriter.h - dtk/dtkProperty.h - dtk/dtkRandom.h - dtk/dtkScene.cpp - dtk/dtkScene.h - dtk/dtkSign.cpp - dtk/dtkSign.h - dtk/dtkStaticMeshEliminator.cpp - dtk/dtkStaticMeshEliminator.h - dtk/dtkStaticTetraMesh.cpp - dtk/dtkStaticTetraMesh.h - dtk/dtkStaticTetraMeshReader.cpp - dtk/dtkStaticTetraMeshReader.h - dtk/dtkStaticTetraMeshWriter.cpp - dtk/dtkStaticTetraMeshWriter.h - dtk/dtkStaticTriangleMesh.cpp - dtk/dtkStaticTriangleMesh.h - dtk/dtkStaticTriangleMeshReader.cpp - dtk/dtkStaticTriangleMeshReader.h - dtk/dtkStaticTriangleMeshWriter.cpp - dtk/dtkStaticTriangleMeshWriter.h - dtk/dtkTime.h - dtk/dtkUtility.h - - math/dtkMatrix.h - math/dtkMatrixOp.cpp - math/dtkMatrixOP.h - math/dtkTx.h - math/dtkTxIO.h - math/dtkTxOP.h - - physics/dtkJoint.cpp - physics/dtkJoint.h - physics/dtkRigidBody.cpp - physics/dtkRigidBody.h - - ${all_files} -) - -target_include_directories(dtk PRIVATE - dtk - math - physics -) - -target_link_libraries(dtk PRIVATE - Boost::headers - CGAL - glfw - glm -) - -#[[install( - TARGETS dtk - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib - RUNTIME DESTINATION bin -) - -# install -install(TARGETS dtk DESTINATION ${DTK_INSTALL_LIBDIR}) -install(FILES ${dir_headers} DESTINATION ${DTK_INSTALL_INCLUDEDIR})]] - -# # 打包 -# # @todo 导出静态库与动态库 -# packageProject( -# # 要导出的 target -# NAME dtk -# # 版本 -# VERSION ${PROJECT_VERSION} -# # 生成文件目录 -# BINARY_DIR ${PROJECT_BINARY_DIR} -# # 头文件路径 -# INCLUDE_DIR ${PROJECT_SOURCE_DIR}/src/include -# # 与 target 的 INSTALL_INTERFACE 一致 -# INCLUDE_DESTINATION include/${PROJECT_NAME}-${PROJECT_VERSION} -# # 头文件过滤 -# INCLUDE_HEADER_PATTERN "*.h" -# # namespace 名称,不能包含 '::' -# NAMESPACE ${PROJECT_NAMESPACE} -# # (optional) option to disable the versioning of install destinations -# DISABLE_VERSION_SUFFIX YES -# ARCH_INDEPENDENT YES -# # 生成 CPack 变量 -# CPACK YES -# ) diff --git a/src/engine/math/dtkMatrix.h b/src/math/dtkMatrix.h similarity index 100% rename from src/engine/math/dtkMatrix.h rename to src/math/dtkMatrix.h diff --git a/src/engine/math/dtkMatrixOP.h b/src/math/dtkMatrixOP.h similarity index 100% rename from src/engine/math/dtkMatrixOP.h rename to src/math/dtkMatrixOP.h diff --git a/src/engine/math/dtkMatrixOp.cpp b/src/math/dtkMatrixOp.cpp similarity index 100% rename from src/engine/math/dtkMatrixOp.cpp rename to src/math/dtkMatrixOp.cpp diff --git a/src/engine/math/dtkTx.h b/src/math/dtkTx.h similarity index 100% rename from src/engine/math/dtkTx.h rename to src/math/dtkTx.h diff --git a/src/engine/math/dtkTxIO.h b/src/math/dtkTxIO.h similarity index 100% rename from src/engine/math/dtkTxIO.h rename to src/math/dtkTxIO.h diff --git a/src/engine/math/dtkTxOP.h b/src/math/dtkTxOP.h similarity index 100% rename from src/engine/math/dtkTxOP.h rename to src/math/dtkTxOP.h diff --git a/src/engine/physics/dtkJoint.cpp b/src/physics/dtkJoint.cpp similarity index 100% rename from src/engine/physics/dtkJoint.cpp rename to src/physics/dtkJoint.cpp diff --git a/src/engine/physics/dtkJoint.h b/src/physics/dtkJoint.h similarity index 100% rename from src/engine/physics/dtkJoint.h rename to src/physics/dtkJoint.h diff --git a/src/engine/physics/dtkRigidBody.cpp b/src/physics/dtkRigidBody.cpp similarity index 100% rename from src/engine/physics/dtkRigidBody.cpp rename to src/physics/dtkRigidBody.cpp diff --git a/src/engine/physics/dtkRigidBody.h b/src/physics/dtkRigidBody.h similarity index 100% rename from src/engine/physics/dtkRigidBody.h rename to src/physics/dtkRigidBody.h diff --git a/src/viewer/opengl/camera.h b/src/viewer_will_del/opengl/camera.h similarity index 100% rename from src/viewer/opengl/camera.h rename to src/viewer_will_del/opengl/camera.h diff --git a/src/viewer/opengl/dtkGUIOpenGLbyFreeGLUT.h b/src/viewer_will_del/opengl/dtkGUIOpenGLbyFreeGLUT.h similarity index 100% rename from src/viewer/opengl/dtkGUIOpenGLbyFreeGLUT.h rename to src/viewer_will_del/opengl/dtkGUIOpenGLbyFreeGLUT.h diff --git a/src/viewer/opengl/dtkGUIOpenGLbyGLAD.h b/src/viewer_will_del/opengl/dtkGUIOpenGLbyGLAD.h similarity index 100% rename from src/viewer/opengl/dtkGUIOpenGLbyGLAD.h rename to src/viewer_will_del/opengl/dtkGUIOpenGLbyGLAD.h diff --git a/src/viewer/opengl/shader.cpp b/src/viewer_will_del/opengl/shader.cpp similarity index 100% rename from src/viewer/opengl/shader.cpp rename to src/viewer_will_del/opengl/shader.cpp diff --git a/src/viewer/opengl/shader.h b/src/viewer_will_del/opengl/shader.h similarity index 100% rename from src/viewer/opengl/shader.h rename to src/viewer_will_del/opengl/shader.h diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 9e981c2..b5d1c29 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -38,9 +38,9 @@ link_libraries( SimplePhysicsEngine-static ) -#add_subdirectory(unit_test) +add_subdirectory(unit_test) #add_subdirectory(integration_test) -#add_subdirectory(system_test) +add_subdirectory(system_test) add_coverage_target( DEPENDS unit_test diff --git a/test/system_test/CMakeLists.txt b/test/system_test/CMakeLists.txt index aa8ae74..d45911a 100644 --- a/test/system_test/CMakeLists.txt +++ b/test/system_test/CMakeLists.txt @@ -12,15 +12,19 @@ project( enable_language(CXX) -add_executable(system_test - main.cpp - display.cpp -) +# add_executable(system_test +# main.cpp +# display.cpp +# ) -target_compile_options(system_test PRIVATE - ${DEFAULT_TEST_COMPILE_OPTIONS} -) +# target_compile_options(system_test PRIVATE +# ${DEFAULT_TEST_COMPILE_OPTIONS} +# ) -target_link_options(system_test PRIVATE - ${DEFAULT_TEST_LINK_OPTIONS} -) +# target_link_options(system_test PRIVATE +# ${DEFAULT_TEST_LINK_OPTIONS} +# ) + +add_subdirectory(demo2d) +# add_subdirectory(demo3d) +# add_subdirectory(demo_old) diff --git a/src/demo2d/CMakeLists.txt b/test/system_test/demo2d/CMakeLists.txt similarity index 91% rename from src/demo2d/CMakeLists.txt rename to test/system_test/demo2d/CMakeLists.txt index 2a15596..f49870e 100644 --- a/src/demo2d/CMakeLists.txt +++ b/test/system_test/demo2d/CMakeLists.txt @@ -29,9 +29,12 @@ target_link_libraries(${PROJECT_NAME} PRIVATE Boost::dynamic_linking CGAL Eigen + glut GLUT::GLUT glfw glm OpenGL::GL OpenGL::GLU ) + +message("GLUT_glut_LIBRARY: ${GLUT_glut_LIBRARY}") diff --git a/src/demo2d/include/Constants.h b/test/system_test/demo2d/include/Constants.h similarity index 100% rename from src/demo2d/include/Constants.h rename to test/system_test/demo2d/include/Constants.h diff --git a/src/demo2d/include/Grid.h b/test/system_test/demo2d/include/Grid.h similarity index 100% rename from src/demo2d/include/Grid.h rename to test/system_test/demo2d/include/Grid.h diff --git a/src/demo2d/include/Particle.h b/test/system_test/demo2d/include/Particle.h similarity index 100% rename from src/demo2d/include/Particle.h rename to test/system_test/demo2d/include/Particle.h diff --git a/src/demo2d/include/SPHSolver.h b/test/system_test/demo2d/include/SPHSolver.h similarity index 100% rename from src/demo2d/include/SPHSolver.h rename to test/system_test/demo2d/include/SPHSolver.h diff --git a/src/demo2d/include/dtkCollisionPair.h b/test/system_test/demo2d/include/dtkCollisionPair.h similarity index 100% rename from src/demo2d/include/dtkCollisionPair.h rename to test/system_test/demo2d/include/dtkCollisionPair.h diff --git a/src/demo2d/include/dtkFemSimulation.h b/test/system_test/demo2d/include/dtkFemSimulation.h similarity index 98% rename from src/demo2d/include/dtkFemSimulation.h rename to test/system_test/demo2d/include/dtkFemSimulation.h index ec9fb34..9e51fd6 100644 --- a/src/demo2d/include/dtkFemSimulation.h +++ b/test/system_test/demo2d/include/dtkFemSimulation.h @@ -6,7 +6,14 @@ */ -#include +#include +#include +#include +#include + +#include + +#include #include "dtkScene.h" #include "dtkMesh.h" @@ -15,12 +22,6 @@ #include "Constants.h" #include "SPHSolver.h" -#include -#include -#include -#include -#include - using namespace std; using namespace Eigen; diff --git a/src/demo2d/include/dtkMesh.h b/test/system_test/demo2d/include/dtkMesh.h similarity index 100% rename from src/demo2d/include/dtkMesh.h rename to test/system_test/demo2d/include/dtkMesh.h diff --git a/src/demo2d/include/dtkObject.h b/test/system_test/demo2d/include/dtkObject.h similarity index 100% rename from src/demo2d/include/dtkObject.h rename to test/system_test/demo2d/include/dtkObject.h diff --git a/src/demo2d/include/dtkScene.h b/test/system_test/demo2d/include/dtkScene.h similarity index 100% rename from src/demo2d/include/dtkScene.h rename to test/system_test/demo2d/include/dtkScene.h diff --git a/src/demo2d/src/Constants.cpp b/test/system_test/demo2d/src/Constants.cpp similarity index 100% rename from src/demo2d/src/Constants.cpp rename to test/system_test/demo2d/src/Constants.cpp diff --git a/src/demo2d/src/Grid.cpp b/test/system_test/demo2d/src/Grid.cpp similarity index 100% rename from src/demo2d/src/Grid.cpp rename to test/system_test/demo2d/src/Grid.cpp diff --git a/src/demo2d/src/Main.cpp b/test/system_test/demo2d/src/Main.cpp similarity index 100% rename from src/demo2d/src/Main.cpp rename to test/system_test/demo2d/src/Main.cpp diff --git a/src/demo2d/src/Particle.cpp b/test/system_test/demo2d/src/Particle.cpp similarity index 100% rename from src/demo2d/src/Particle.cpp rename to test/system_test/demo2d/src/Particle.cpp diff --git a/src/demo2d/src/SPHSolver.cpp b/test/system_test/demo2d/src/SPHSolver.cpp similarity index 100% rename from src/demo2d/src/SPHSolver.cpp rename to test/system_test/demo2d/src/SPHSolver.cpp diff --git a/src/demo2d/src/dtkCollisionPair.cpp b/test/system_test/demo2d/src/dtkCollisionPair.cpp similarity index 100% rename from src/demo2d/src/dtkCollisionPair.cpp rename to test/system_test/demo2d/src/dtkCollisionPair.cpp diff --git a/src/demo2d/src/dtkFemSimulation.cpp b/test/system_test/demo2d/src/dtkFemSimulation.cpp similarity index 100% rename from src/demo2d/src/dtkFemSimulation.cpp rename to test/system_test/demo2d/src/dtkFemSimulation.cpp diff --git a/src/demo2d/src/dtkMesh.cpp b/test/system_test/demo2d/src/dtkMesh.cpp similarity index 100% rename from src/demo2d/src/dtkMesh.cpp rename to test/system_test/demo2d/src/dtkMesh.cpp diff --git a/src/demo2d/src/dtkObject.cpp b/test/system_test/demo2d/src/dtkObject.cpp similarity index 100% rename from src/demo2d/src/dtkObject.cpp rename to test/system_test/demo2d/src/dtkObject.cpp diff --git a/src/demo2d/src/dtkScene.cpp b/test/system_test/demo2d/src/dtkScene.cpp similarity index 100% rename from src/demo2d/src/dtkScene.cpp rename to test/system_test/demo2d/src/dtkScene.cpp diff --git a/src/demo3d/CMakeLists.txt b/test/system_test/demo3d/CMakeLists.txt similarity index 100% rename from src/demo3d/CMakeLists.txt rename to test/system_test/demo3d/CMakeLists.txt diff --git a/src/demo3d/README.md b/test/system_test/demo3d/README.md similarity index 100% rename from src/demo3d/README.md rename to test/system_test/demo3d/README.md diff --git a/src/demo3d/dtkFemSimulation.cpp b/test/system_test/demo3d/dtkFemSimulation.cpp similarity index 100% rename from src/demo3d/dtkFemSimulation.cpp rename to test/system_test/demo3d/dtkFemSimulation.cpp diff --git a/src/demo3d/dtkFemSimulation.h b/test/system_test/demo3d/dtkFemSimulation.h similarity index 100% rename from src/demo3d/dtkFemSimulation.h rename to test/system_test/demo3d/dtkFemSimulation.h diff --git a/src/demo3d/dtkScene.cpp b/test/system_test/demo3d/dtkScene.cpp similarity index 100% rename from src/demo3d/dtkScene.cpp rename to test/system_test/demo3d/dtkScene.cpp diff --git a/src/demo3d/dtkScene.h b/test/system_test/demo3d/dtkScene.h similarity index 100% rename from src/demo3d/dtkScene.h rename to test/system_test/demo3d/dtkScene.h diff --git a/src/demo3d/main.cpp b/test/system_test/demo3d/main.cpp similarity index 100% rename from src/demo3d/main.cpp rename to test/system_test/demo3d/main.cpp diff --git a/src/demo_old/FEMsimulation/CMakeLists.txt b/test/system_test/demo_old/FEMsimulation/CMakeLists.txt similarity index 100% rename from src/demo_old/FEMsimulation/CMakeLists.txt rename to test/system_test/demo_old/FEMsimulation/CMakeLists.txt diff --git a/src/demo_old/FEMsimulation/README.md b/test/system_test/demo_old/FEMsimulation/README.md similarity index 100% rename from src/demo_old/FEMsimulation/README.md rename to test/system_test/demo_old/FEMsimulation/README.md diff --git a/src/demo_old/FEMsimulation/dtkFemSimulation.cpp b/test/system_test/demo_old/FEMsimulation/dtkFemSimulation.cpp similarity index 100% rename from src/demo_old/FEMsimulation/dtkFemSimulation.cpp rename to test/system_test/demo_old/FEMsimulation/dtkFemSimulation.cpp diff --git a/src/demo_old/FEMsimulation/dtkFemSimulation.h b/test/system_test/demo_old/FEMsimulation/dtkFemSimulation.h similarity index 100% rename from src/demo_old/FEMsimulation/dtkFemSimulation.h rename to test/system_test/demo_old/FEMsimulation/dtkFemSimulation.h diff --git a/src/demo_old/FEMsimulation/dtkScene.cpp b/test/system_test/demo_old/FEMsimulation/dtkScene.cpp similarity index 100% rename from src/demo_old/FEMsimulation/dtkScene.cpp rename to test/system_test/demo_old/FEMsimulation/dtkScene.cpp diff --git a/src/demo_old/FEMsimulation/dtkScene.h b/test/system_test/demo_old/FEMsimulation/dtkScene.h similarity index 100% rename from src/demo_old/FEMsimulation/dtkScene.h rename to test/system_test/demo_old/FEMsimulation/dtkScene.h diff --git a/src/demo_old/FEMsimulation/main.cpp b/test/system_test/demo_old/FEMsimulation/main.cpp similarity index 100% rename from src/demo_old/FEMsimulation/main.cpp rename to test/system_test/demo_old/FEMsimulation/main.cpp diff --git a/src/demo_old/RigidBodySimulation/CMakeLists.txt b/test/system_test/demo_old/RigidBodySimulation/CMakeLists.txt similarity index 100% rename from src/demo_old/RigidBodySimulation/CMakeLists.txt rename to test/system_test/demo_old/RigidBodySimulation/CMakeLists.txt diff --git a/src/demo_old/RigidBodySimulation/README.md b/test/system_test/demo_old/RigidBodySimulation/README.md similarity index 100% rename from src/demo_old/RigidBodySimulation/README.md rename to test/system_test/demo_old/RigidBodySimulation/README.md diff --git a/src/demo_old/RigidBodySimulation/cbody.cpp b/test/system_test/demo_old/RigidBodySimulation/cbody.cpp similarity index 100% rename from src/demo_old/RigidBodySimulation/cbody.cpp rename to test/system_test/demo_old/RigidBodySimulation/cbody.cpp diff --git a/src/demo_old/RigidBodySimulation/cbody.h b/test/system_test/demo_old/RigidBodySimulation/cbody.h similarity index 100% rename from src/demo_old/RigidBodySimulation/cbody.h rename to test/system_test/demo_old/RigidBodySimulation/cbody.h diff --git a/src/demo_old/RigidBodySimulation/cjoint.cpp b/test/system_test/demo_old/RigidBodySimulation/cjoint.cpp similarity index 100% rename from src/demo_old/RigidBodySimulation/cjoint.cpp rename to test/system_test/demo_old/RigidBodySimulation/cjoint.cpp diff --git a/src/demo_old/RigidBodySimulation/cjoint.h b/test/system_test/demo_old/RigidBodySimulation/cjoint.h similarity index 100% rename from src/demo_old/RigidBodySimulation/cjoint.h rename to test/system_test/demo_old/RigidBodySimulation/cjoint.h diff --git a/src/demo_old/RigidBodySimulation/cpair.cpp b/test/system_test/demo_old/RigidBodySimulation/cpair.cpp similarity index 100% rename from src/demo_old/RigidBodySimulation/cpair.cpp rename to test/system_test/demo_old/RigidBodySimulation/cpair.cpp diff --git a/src/demo_old/RigidBodySimulation/cpair.h b/test/system_test/demo_old/RigidBodySimulation/cpair.h similarity index 100% rename from src/demo_old/RigidBodySimulation/cpair.h rename to test/system_test/demo_old/RigidBodySimulation/cpair.h diff --git a/src/demo_old/RigidBodySimulation/ctypes.cpp b/test/system_test/demo_old/RigidBodySimulation/ctypes.cpp similarity index 100% rename from src/demo_old/RigidBodySimulation/ctypes.cpp rename to test/system_test/demo_old/RigidBodySimulation/ctypes.cpp diff --git a/src/demo_old/RigidBodySimulation/ctypes.h b/test/system_test/demo_old/RigidBodySimulation/ctypes.h similarity index 100% rename from src/demo_old/RigidBodySimulation/ctypes.h rename to test/system_test/demo_old/RigidBodySimulation/ctypes.h diff --git a/src/demo_old/RigidBodySimulation/cworld.cpp b/test/system_test/demo_old/RigidBodySimulation/cworld.cpp similarity index 100% rename from src/demo_old/RigidBodySimulation/cworld.cpp rename to test/system_test/demo_old/RigidBodySimulation/cworld.cpp diff --git a/src/demo_old/RigidBodySimulation/cworld.h b/test/system_test/demo_old/RigidBodySimulation/cworld.h similarity index 100% rename from src/demo_old/RigidBodySimulation/cworld.h rename to test/system_test/demo_old/RigidBodySimulation/cworld.h diff --git a/src/demo_old/RigidBodySimulation/main.cpp b/test/system_test/demo_old/RigidBodySimulation/main.cpp similarity index 100% rename from src/demo_old/RigidBodySimulation/main.cpp rename to test/system_test/demo_old/RigidBodySimulation/main.cpp diff --git a/src/demo_old/SPHSimulation/README.md b/test/system_test/demo_old/SPHSimulation/README.md similarity index 100% rename from src/demo_old/SPHSimulation/README.md rename to test/system_test/demo_old/SPHSimulation/README.md diff --git a/src/demo_old/SPHSimulation/dtkSPHsolver.cpp b/test/system_test/demo_old/SPHSimulation/dtkSPHsolver.cpp similarity index 100% rename from src/demo_old/SPHSimulation/dtkSPHsolver.cpp rename to test/system_test/demo_old/SPHSimulation/dtkSPHsolver.cpp diff --git a/src/demo_old/SPHSimulation/dtkSPHsolver.h b/test/system_test/demo_old/SPHSimulation/dtkSPHsolver.h similarity index 100% rename from src/demo_old/SPHSimulation/dtkSPHsolver.h rename to test/system_test/demo_old/SPHSimulation/dtkSPHsolver.h diff --git a/src/demo_old/guideWireSimulation/.editorconfig b/test/system_test/demo_old/guideWireSimulation/.editorconfig similarity index 100% rename from src/demo_old/guideWireSimulation/.editorconfig rename to test/system_test/demo_old/guideWireSimulation/.editorconfig diff --git a/src/demo_old/guideWireSimulation/CMakeLists.txt b/test/system_test/demo_old/guideWireSimulation/CMakeLists.txt similarity index 100% rename from src/demo_old/guideWireSimulation/CMakeLists.txt rename to test/system_test/demo_old/guideWireSimulation/CMakeLists.txt diff --git a/src/demo_old/guideWireSimulation/README.md b/test/system_test/demo_old/guideWireSimulation/README.md similarity index 100% rename from src/demo_old/guideWireSimulation/README.md rename to test/system_test/demo_old/guideWireSimulation/README.md diff --git a/src/demo_old/guideWireSimulation/Resources/center.png b/test/system_test/demo_old/guideWireSimulation/Resources/center.png similarity index 100% rename from src/demo_old/guideWireSimulation/Resources/center.png rename to test/system_test/demo_old/guideWireSimulation/Resources/center.png diff --git a/src/demo_old/guideWireSimulation/Resources/igst.jpg b/test/system_test/demo_old/guideWireSimulation/Resources/igst.jpg similarity index 100% rename from src/demo_old/guideWireSimulation/Resources/igst.jpg rename to test/system_test/demo_old/guideWireSimulation/Resources/igst.jpg diff --git a/src/demo_old/guideWireSimulation/Resources/load_vascular.png b/test/system_test/demo_old/guideWireSimulation/Resources/load_vascular.png similarity index 100% rename from src/demo_old/guideWireSimulation/Resources/load_vascular.png rename to test/system_test/demo_old/guideWireSimulation/Resources/load_vascular.png diff --git a/src/demo_old/guideWireSimulation/Resources/pause.png b/test/system_test/demo_old/guideWireSimulation/Resources/pause.png similarity index 100% rename from src/demo_old/guideWireSimulation/Resources/pause.png rename to test/system_test/demo_old/guideWireSimulation/Resources/pause.png diff --git a/src/demo_old/guideWireSimulation/Resources/question.jpg b/test/system_test/demo_old/guideWireSimulation/Resources/question.jpg similarity index 100% rename from src/demo_old/guideWireSimulation/Resources/question.jpg rename to test/system_test/demo_old/guideWireSimulation/Resources/question.jpg diff --git a/src/demo_old/guideWireSimulation/Resources/quit.png b/test/system_test/demo_old/guideWireSimulation/Resources/quit.png similarity index 100% rename from src/demo_old/guideWireSimulation/Resources/quit.png rename to test/system_test/demo_old/guideWireSimulation/Resources/quit.png diff --git a/src/demo_old/guideWireSimulation/Resources/start.png b/test/system_test/demo_old/guideWireSimulation/Resources/start.png similarity index 100% rename from src/demo_old/guideWireSimulation/Resources/start.png rename to test/system_test/demo_old/guideWireSimulation/Resources/start.png diff --git a/src/demo_old/guideWireSimulation/Resources/zoom-in.png b/test/system_test/demo_old/guideWireSimulation/Resources/zoom-in.png similarity index 100% rename from src/demo_old/guideWireSimulation/Resources/zoom-in.png rename to test/system_test/demo_old/guideWireSimulation/Resources/zoom-in.png diff --git a/src/demo_old/guideWireSimulation/Resources/zoom-out.png b/test/system_test/demo_old/guideWireSimulation/Resources/zoom-out.png similarity index 100% rename from src/demo_old/guideWireSimulation/Resources/zoom-out.png rename to test/system_test/demo_old/guideWireSimulation/Resources/zoom-out.png diff --git a/src/demo_old/guideWireSimulation/bak/DevicePhantomOmni.cpp b/test/system_test/demo_old/guideWireSimulation/bak/DevicePhantomOmni.cpp similarity index 100% rename from src/demo_old/guideWireSimulation/bak/DevicePhantomOmni.cpp rename to test/system_test/demo_old/guideWireSimulation/bak/DevicePhantomOmni.cpp diff --git a/src/demo_old/guideWireSimulation/bak/DevicePhantomOmni.h b/test/system_test/demo_old/guideWireSimulation/bak/DevicePhantomOmni.h similarity index 100% rename from src/demo_old/guideWireSimulation/bak/DevicePhantomOmni.h rename to test/system_test/demo_old/guideWireSimulation/bak/DevicePhantomOmni.h diff --git a/src/demo_old/guideWireSimulation/bak/guideWireSimulation.cpp b/test/system_test/demo_old/guideWireSimulation/bak/guideWireSimulation.cpp similarity index 100% rename from src/demo_old/guideWireSimulation/bak/guideWireSimulation.cpp rename to test/system_test/demo_old/guideWireSimulation/bak/guideWireSimulation.cpp diff --git a/src/demo_old/guideWireSimulation/bak/guideWireSimulation.h b/test/system_test/demo_old/guideWireSimulation/bak/guideWireSimulation.h similarity index 100% rename from src/demo_old/guideWireSimulation/bak/guideWireSimulation.h rename to test/system_test/demo_old/guideWireSimulation/bak/guideWireSimulation.h diff --git a/src/demo_old/guideWireSimulation/collisionResponse.cpp b/test/system_test/demo_old/guideWireSimulation/collisionResponse.cpp similarity index 100% rename from src/demo_old/guideWireSimulation/collisionResponse.cpp rename to test/system_test/demo_old/guideWireSimulation/collisionResponse.cpp diff --git a/src/demo_old/guideWireSimulation/collisionResponse.h b/test/system_test/demo_old/guideWireSimulation/collisionResponse.h similarity index 100% rename from src/demo_old/guideWireSimulation/collisionResponse.h rename to test/system_test/demo_old/guideWireSimulation/collisionResponse.h diff --git a/src/demo_old/guideWireSimulation/controlCore.cpp b/test/system_test/demo_old/guideWireSimulation/controlCore.cpp similarity index 100% rename from src/demo_old/guideWireSimulation/controlCore.cpp rename to test/system_test/demo_old/guideWireSimulation/controlCore.cpp diff --git a/src/demo_old/guideWireSimulation/controlCore.h b/test/system_test/demo_old/guideWireSimulation/controlCore.h similarity index 100% rename from src/demo_old/guideWireSimulation/controlCore.h rename to test/system_test/demo_old/guideWireSimulation/controlCore.h diff --git a/src/demo_old/guideWireSimulation/cutHead.cpp b/test/system_test/demo_old/guideWireSimulation/cutHead.cpp similarity index 100% rename from src/demo_old/guideWireSimulation/cutHead.cpp rename to test/system_test/demo_old/guideWireSimulation/cutHead.cpp diff --git a/src/demo_old/guideWireSimulation/cutHead.h b/test/system_test/demo_old/guideWireSimulation/cutHead.h similarity index 100% rename from src/demo_old/guideWireSimulation/cutHead.h rename to test/system_test/demo_old/guideWireSimulation/cutHead.h diff --git a/src/demo_old/guideWireSimulation/data/.svn/entries b/test/system_test/demo_old/guideWireSimulation/data/.svn/entries similarity index 100% rename from src/demo_old/guideWireSimulation/data/.svn/entries rename to test/system_test/demo_old/guideWireSimulation/data/.svn/entries diff --git a/src/demo_old/guideWireSimulation/data/.svn/text-base/cholecyst_moderate.s4m.svn-base b/test/system_test/demo_old/guideWireSimulation/data/.svn/text-base/cholecyst_moderate.s4m.svn-base similarity index 100% rename from src/demo_old/guideWireSimulation/data/.svn/text-base/cholecyst_moderate.s4m.svn-base rename to test/system_test/demo_old/guideWireSimulation/data/.svn/text-base/cholecyst_moderate.s4m.svn-base diff --git a/src/demo_old/guideWireSimulation/data/.svn/text-base/gallbladder01.s4m.svn-base b/test/system_test/demo_old/guideWireSimulation/data/.svn/text-base/gallbladder01.s4m.svn-base similarity index 100% rename from src/demo_old/guideWireSimulation/data/.svn/text-base/gallbladder01.s4m.svn-base rename to test/system_test/demo_old/guideWireSimulation/data/.svn/text-base/gallbladder01.s4m.svn-base diff --git a/src/demo_old/guideWireSimulation/data/.svn/text-base/gwdata.txt.svn-base b/test/system_test/demo_old/guideWireSimulation/data/.svn/text-base/gwdata.txt.svn-base similarity index 100% rename from src/demo_old/guideWireSimulation/data/.svn/text-base/gwdata.txt.svn-base rename to test/system_test/demo_old/guideWireSimulation/data/.svn/text-base/gwdata.txt.svn-base diff --git a/src/demo_old/guideWireSimulation/data/.svn/text-base/pipe_1_moderate.s4m.svn-base b/test/system_test/demo_old/guideWireSimulation/data/.svn/text-base/pipe_1_moderate.s4m.svn-base similarity index 100% rename from src/demo_old/guideWireSimulation/data/.svn/text-base/pipe_1_moderate.s4m.svn-base rename to test/system_test/demo_old/guideWireSimulation/data/.svn/text-base/pipe_1_moderate.s4m.svn-base diff --git a/src/demo_old/guideWireSimulation/data/.svn/text-base/quaternionsCurvatures.txt.svn-base b/test/system_test/demo_old/guideWireSimulation/data/.svn/text-base/quaternionsCurvatures.txt.svn-base similarity index 100% rename from src/demo_old/guideWireSimulation/data/.svn/text-base/quaternionsCurvatures.txt.svn-base rename to test/system_test/demo_old/guideWireSimulation/data/.svn/text-base/quaternionsCurvatures.txt.svn-base diff --git a/src/demo_old/guideWireSimulation/data/.svn/text-base/triangleID.txt.svn-base b/test/system_test/demo_old/guideWireSimulation/data/.svn/text-base/triangleID.txt.svn-base similarity index 100% rename from src/demo_old/guideWireSimulation/data/.svn/text-base/triangleID.txt.svn-base rename to test/system_test/demo_old/guideWireSimulation/data/.svn/text-base/triangleID.txt.svn-base diff --git a/src/demo_old/guideWireSimulation/data/.svn/text-base/vascular.txt.svn-base b/test/system_test/demo_old/guideWireSimulation/data/.svn/text-base/vascular.txt.svn-base similarity index 100% rename from src/demo_old/guideWireSimulation/data/.svn/text-base/vascular.txt.svn-base rename to test/system_test/demo_old/guideWireSimulation/data/.svn/text-base/vascular.txt.svn-base diff --git a/src/demo_old/guideWireSimulation/data/avoidPoint.txt b/test/system_test/demo_old/guideWireSimulation/data/avoidPoint.txt similarity index 100% rename from src/demo_old/guideWireSimulation/data/avoidPoint.txt rename to test/system_test/demo_old/guideWireSimulation/data/avoidPoint.txt diff --git a/src/demo_old/guideWireSimulation/data/avoidPoint1.txt b/test/system_test/demo_old/guideWireSimulation/data/avoidPoint1.txt similarity index 100% rename from src/demo_old/guideWireSimulation/data/avoidPoint1.txt rename to test/system_test/demo_old/guideWireSimulation/data/avoidPoint1.txt diff --git a/src/demo_old/guideWireSimulation/data/avoidPoint2.txt b/test/system_test/demo_old/guideWireSimulation/data/avoidPoint2.txt similarity index 100% rename from src/demo_old/guideWireSimulation/data/avoidPoint2.txt rename to test/system_test/demo_old/guideWireSimulation/data/avoidPoint2.txt diff --git a/src/demo_old/guideWireSimulation/data/cholecyst_moderate.s4m b/test/system_test/demo_old/guideWireSimulation/data/cholecyst_moderate.s4m similarity index 100% rename from src/demo_old/guideWireSimulation/data/cholecyst_moderate.s4m rename to test/system_test/demo_old/guideWireSimulation/data/cholecyst_moderate.s4m diff --git a/src/demo_old/guideWireSimulation/data/gallbladder01.s4m b/test/system_test/demo_old/guideWireSimulation/data/gallbladder01.s4m similarity index 100% rename from src/demo_old/guideWireSimulation/data/gallbladder01.s4m rename to test/system_test/demo_old/guideWireSimulation/data/gallbladder01.s4m diff --git a/src/demo_old/guideWireSimulation/data/gwdata.txt b/test/system_test/demo_old/guideWireSimulation/data/gwdata.txt similarity index 100% rename from src/demo_old/guideWireSimulation/data/gwdata.txt rename to test/system_test/demo_old/guideWireSimulation/data/gwdata.txt diff --git a/src/demo_old/guideWireSimulation/data/pipe_1_moderate.s4m b/test/system_test/demo_old/guideWireSimulation/data/pipe_1_moderate.s4m similarity index 100% rename from src/demo_old/guideWireSimulation/data/pipe_1_moderate.s4m rename to test/system_test/demo_old/guideWireSimulation/data/pipe_1_moderate.s4m diff --git a/src/demo_old/guideWireSimulation/data/quaternionsCurvatures.txt b/test/system_test/demo_old/guideWireSimulation/data/quaternionsCurvatures.txt similarity index 100% rename from src/demo_old/guideWireSimulation/data/quaternionsCurvatures.txt rename to test/system_test/demo_old/guideWireSimulation/data/quaternionsCurvatures.txt diff --git a/src/demo_old/guideWireSimulation/data/triangleID.txt b/test/system_test/demo_old/guideWireSimulation/data/triangleID.txt similarity index 100% rename from src/demo_old/guideWireSimulation/data/triangleID.txt rename to test/system_test/demo_old/guideWireSimulation/data/triangleID.txt diff --git a/src/demo_old/guideWireSimulation/data/triangleWirter.s3m b/test/system_test/demo_old/guideWireSimulation/data/triangleWirter.s3m similarity index 100% rename from src/demo_old/guideWireSimulation/data/triangleWirter.s3m rename to test/system_test/demo_old/guideWireSimulation/data/triangleWirter.s3m diff --git a/src/demo_old/guideWireSimulation/data/vein final version.s4m b/test/system_test/demo_old/guideWireSimulation/data/vein final version.s4m similarity index 100% rename from src/demo_old/guideWireSimulation/data/vein final version.s4m rename to test/system_test/demo_old/guideWireSimulation/data/vein final version.s4m diff --git a/src/demo_old/guideWireSimulation/data/vein final version1.s3m b/test/system_test/demo_old/guideWireSimulation/data/vein final version1.s3m similarity index 100% rename from src/demo_old/guideWireSimulation/data/vein final version1.s3m rename to test/system_test/demo_old/guideWireSimulation/data/vein final version1.s3m diff --git a/src/demo_old/guideWireSimulation/data/vein final version1.s4m b/test/system_test/demo_old/guideWireSimulation/data/vein final version1.s4m similarity index 100% rename from src/demo_old/guideWireSimulation/data/vein final version1.s4m rename to test/system_test/demo_old/guideWireSimulation/data/vein final version1.s4m diff --git a/src/demo_old/guideWireSimulation/data/vein0806version7.s3m b/test/system_test/demo_old/guideWireSimulation/data/vein0806version7.s3m similarity index 100% rename from src/demo_old/guideWireSimulation/data/vein0806version7.s3m rename to test/system_test/demo_old/guideWireSimulation/data/vein0806version7.s3m diff --git a/src/demo_old/guideWireSimulation/data/vein0806version7.s4m b/test/system_test/demo_old/guideWireSimulation/data/vein0806version7.s4m similarity index 100% rename from src/demo_old/guideWireSimulation/data/vein0806version7.s4m rename to test/system_test/demo_old/guideWireSimulation/data/vein0806version7.s4m diff --git a/src/demo_old/guideWireSimulation/data/vein0806version8.s3m b/test/system_test/demo_old/guideWireSimulation/data/vein0806version8.s3m similarity index 100% rename from src/demo_old/guideWireSimulation/data/vein0806version8.s3m rename to test/system_test/demo_old/guideWireSimulation/data/vein0806version8.s3m diff --git a/src/demo_old/guideWireSimulation/data/vein0806version8.s4m b/test/system_test/demo_old/guideWireSimulation/data/vein0806version8.s4m similarity index 100% rename from src/demo_old/guideWireSimulation/data/vein0806version8.s4m rename to test/system_test/demo_old/guideWireSimulation/data/vein0806version8.s4m diff --git a/src/demo_old/guideWireSimulation/glDrawer.cpp b/test/system_test/demo_old/guideWireSimulation/glDrawer.cpp similarity index 100% rename from src/demo_old/guideWireSimulation/glDrawer.cpp rename to test/system_test/demo_old/guideWireSimulation/glDrawer.cpp diff --git a/src/demo_old/guideWireSimulation/glDrawer.h b/test/system_test/demo_old/guideWireSimulation/glDrawer.h similarity index 100% rename from src/demo_old/guideWireSimulation/glDrawer.h rename to test/system_test/demo_old/guideWireSimulation/glDrawer.h diff --git a/src/demo_old/guideWireSimulation/glThread.cpp b/test/system_test/demo_old/guideWireSimulation/glThread.cpp similarity index 100% rename from src/demo_old/guideWireSimulation/glThread.cpp rename to test/system_test/demo_old/guideWireSimulation/glThread.cpp diff --git a/src/demo_old/guideWireSimulation/glThread.h b/test/system_test/demo_old/guideWireSimulation/glThread.h similarity index 100% rename from src/demo_old/guideWireSimulation/glThread.h rename to test/system_test/demo_old/guideWireSimulation/glThread.h diff --git a/src/demo_old/guideWireSimulation/guideWire.cpp b/test/system_test/demo_old/guideWireSimulation/guideWire.cpp similarity index 100% rename from src/demo_old/guideWireSimulation/guideWire.cpp rename to test/system_test/demo_old/guideWireSimulation/guideWire.cpp diff --git a/src/demo_old/guideWireSimulation/guideWire.h b/test/system_test/demo_old/guideWireSimulation/guideWire.h similarity index 100% rename from src/demo_old/guideWireSimulation/guideWire.h rename to test/system_test/demo_old/guideWireSimulation/guideWire.h diff --git a/src/demo_old/guideWireSimulation/guideWireInternalResponse.cpp b/test/system_test/demo_old/guideWireSimulation/guideWireInternalResponse.cpp similarity index 100% rename from src/demo_old/guideWireSimulation/guideWireInternalResponse.cpp rename to test/system_test/demo_old/guideWireSimulation/guideWireInternalResponse.cpp diff --git a/src/demo_old/guideWireSimulation/guideWireInternalResponse.h b/test/system_test/demo_old/guideWireSimulation/guideWireInternalResponse.h similarity index 100% rename from src/demo_old/guideWireSimulation/guideWireInternalResponse.h rename to test/system_test/demo_old/guideWireSimulation/guideWireInternalResponse.h diff --git a/src/demo_old/guideWireSimulation/guideWireOpenGLRender.cpp b/test/system_test/demo_old/guideWireSimulation/guideWireOpenGLRender.cpp similarity index 100% rename from src/demo_old/guideWireSimulation/guideWireOpenGLRender.cpp rename to test/system_test/demo_old/guideWireSimulation/guideWireOpenGLRender.cpp diff --git a/src/demo_old/guideWireSimulation/guideWireOpenGLRender.h b/test/system_test/demo_old/guideWireSimulation/guideWireOpenGLRender.h similarity index 100% rename from src/demo_old/guideWireSimulation/guideWireOpenGLRender.h rename to test/system_test/demo_old/guideWireSimulation/guideWireOpenGLRender.h diff --git a/src/demo_old/guideWireSimulation/guideWireSimulation.cpp b/test/system_test/demo_old/guideWireSimulation/guideWireSimulation.cpp similarity index 100% rename from src/demo_old/guideWireSimulation/guideWireSimulation.cpp rename to test/system_test/demo_old/guideWireSimulation/guideWireSimulation.cpp diff --git a/src/demo_old/guideWireSimulation/guideWireSimulation.h b/test/system_test/demo_old/guideWireSimulation/guideWireSimulation.h similarity index 100% rename from src/demo_old/guideWireSimulation/guideWireSimulation.h rename to test/system_test/demo_old/guideWireSimulation/guideWireSimulation.h diff --git a/src/demo_old/guideWireSimulation/guideWireSimulation.qrc b/test/system_test/demo_old/guideWireSimulation/guideWireSimulation.qrc similarity index 100% rename from src/demo_old/guideWireSimulation/guideWireSimulation.qrc rename to test/system_test/demo_old/guideWireSimulation/guideWireSimulation.qrc diff --git a/src/demo_old/guideWireSimulation/guideWireSimulation.rc b/test/system_test/demo_old/guideWireSimulation/guideWireSimulation.rc similarity index 100% rename from src/demo_old/guideWireSimulation/guideWireSimulation.rc rename to test/system_test/demo_old/guideWireSimulation/guideWireSimulation.rc diff --git a/src/demo_old/guideWireSimulation/guideWireSimulation.ui b/test/system_test/demo_old/guideWireSimulation/guideWireSimulation.ui similarity index 100% rename from src/demo_old/guideWireSimulation/guideWireSimulation.ui rename to test/system_test/demo_old/guideWireSimulation/guideWireSimulation.ui diff --git a/src/demo_old/guideWireSimulation/main.cpp b/test/system_test/demo_old/guideWireSimulation/main.cpp similarity index 100% rename from src/demo_old/guideWireSimulation/main.cpp rename to test/system_test/demo_old/guideWireSimulation/main.cpp diff --git a/src/demo_old/guideWireSimulation/resource.h b/test/system_test/demo_old/guideWireSimulation/resource.h similarity index 100% rename from src/demo_old/guideWireSimulation/resource.h rename to test/system_test/demo_old/guideWireSimulation/resource.h diff --git a/src/demo_old/guideWireSimulation/simulationParameters.ui b/test/system_test/demo_old/guideWireSimulation/simulationParameters.ui similarity index 100% rename from src/demo_old/guideWireSimulation/simulationParameters.ui rename to test/system_test/demo_old/guideWireSimulation/simulationParameters.ui diff --git a/src/demo_old/guideWireSimulation/vascularOpenGLRender.cpp b/test/system_test/demo_old/guideWireSimulation/vascularOpenGLRender.cpp similarity index 100% rename from src/demo_old/guideWireSimulation/vascularOpenGLRender.cpp rename to test/system_test/demo_old/guideWireSimulation/vascularOpenGLRender.cpp diff --git a/src/demo_old/guideWireSimulation/vascularOpenGLRender.h b/test/system_test/demo_old/guideWireSimulation/vascularOpenGLRender.h similarity index 100% rename from src/demo_old/guideWireSimulation/vascularOpenGLRender.h rename to test/system_test/demo_old/guideWireSimulation/vascularOpenGLRender.h diff --git a/src/demo_old/img/3dFEM.gif b/test/system_test/demo_old/img/3dFEM.gif similarity index 100% rename from src/demo_old/img/3dFEM.gif rename to test/system_test/demo_old/img/3dFEM.gif diff --git a/src/demo_old/img/DFSPH.gif b/test/system_test/demo_old/img/DFSPH.gif similarity index 100% rename from src/demo_old/img/DFSPH.gif rename to test/system_test/demo_old/img/DFSPH.gif diff --git a/src/demo_old/img/PCISPH.gif b/test/system_test/demo_old/img/PCISPH.gif similarity index 100% rename from src/demo_old/img/PCISPH.gif rename to test/system_test/demo_old/img/PCISPH.gif diff --git a/src/demo_old/img/WCSPH.gif b/test/system_test/demo_old/img/WCSPH.gif similarity index 100% rename from src/demo_old/img/WCSPH.gif rename to test/system_test/demo_old/img/WCSPH.gif diff --git a/src/demo_old/img/dtkFemSimulation.gif b/test/system_test/demo_old/img/dtkFemSimulation.gif similarity index 100% rename from src/demo_old/img/dtkFemSimulation.gif rename to test/system_test/demo_old/img/dtkFemSimulation.gif diff --git a/src/demo_old/img/dtkRigidBodySimulation.gif b/test/system_test/demo_old/img/dtkRigidBodySimulation.gif similarity index 100% rename from src/demo_old/img/dtkRigidBodySimulation.gif rename to test/system_test/demo_old/img/dtkRigidBodySimulation.gif diff --git a/src/demo_old/img/guideWire.jpg b/test/system_test/demo_old/img/guideWire.jpg similarity index 100% rename from src/demo_old/img/guideWire.jpg rename to test/system_test/demo_old/img/guideWire.jpg diff --git a/test/system_test/display.cpp b/test/system_test/display.cpp deleted file mode 100644 index d52184f..0000000 --- a/test/system_test/display.cpp +++ /dev/null @@ -1,183 +0,0 @@ - -/** - * @file display.cpp - * @brief 显示 - * @author Zone.N (Zone.Niuzh@hotmail.com) - * @version 1.0 - * @date 2022-09-05 - * @copyright MIT LICENSE - * https://github.com/Simple-XX/SimpleRenderer - * @par change log: - * - *
DateAuthorDescription - *
2022-09-05Zone.N创建文件 - *
- */ - -#include -#include - -#include "config.h" -#include "display.h" -#include "exception.hpp" -#include "log.h" -#include "status.h" - -namespace SimpleRenderer { - -/// @todo -display_t::display_t( - const std::shared_ptr &_state, - const std::vector> &_framebuffers) - : state(_state), framebuffers(_framebuffers), width(WIDTH), height(HEIGHT) { - // 初始化 sdl - - auto ret = SDL_Init(SDL_INIT_VIDEO); - if (ret != 0) { - throw SimpleRenderer::exception(SDL_GetError()); - } - // 创建窗口,居中,可见 - sdl_window = - SDL_CreateWindow(WINDOW_TITLE, SDL_WINDOWPOS_CENTERED, - SDL_WINDOWPOS_CENTERED, static_cast(width), - static_cast(height), SDL_WINDOW_SHOWN); - if (sdl_window == nullptr) { - SDL_Quit(); - throw SimpleRenderer::exception(SDL_GetError()); - } - - // 创建渲染器 - sdl_renderer = SDL_CreateRenderer(sdl_window, -1, SDL_RENDERER_SOFTWARE); - if (sdl_renderer == nullptr) { - SDL_DestroyWindow(sdl_window); - SDL_Quit(); - throw SimpleRenderer::exception(SDL_GetError()); - } - // 设置 alpha 通道有效 - SDL_SetRenderDrawBlendMode(sdl_renderer, SDL_BLENDMODE_BLEND); - - // 创建 texture - sdl_texture = SDL_CreateTexture( - sdl_renderer, SDL_PIXELFORMAT_RGBA32, SDL_TEXTUREACCESS_STREAMING, - static_cast(width), static_cast(height)); - if (sdl_texture == nullptr) { - SDL_DestroyRenderer(sdl_renderer); - SDL_DestroyWindow(sdl_window); - SDL_Quit(); - throw SimpleRenderer::exception(SDL_GetError()); - } -} - -display_t::~display_t() { - // 回收资源 - SDL_DestroyTexture(sdl_texture); - SDL_DestroyRenderer(sdl_renderer); - SDL_DestroyWindow(sdl_window); - SDL_Quit(); -} - -void display_t::fill(const std::shared_ptr &_framebuffer) { - // 更新 texture - auto res = SDL_UpdateTexture(sdl_texture, nullptr, - _framebuffer->get_color_buffer().data(), - static_cast(width * color_t::bpp())); - if (res != 0) { - throw SimpleRenderer::exception(SDL_GetError()); - } - - // 复制到渲染器 - res = SDL_RenderCopy(sdl_renderer, sdl_texture, nullptr, nullptr); - if (res != 0) { - throw SimpleRenderer::exception(SDL_GetError()); - } - - // 刷新 - SDL_RenderPresent(sdl_renderer); -} - -/// @todo 验证 std::condition_variable 的正确性 -/// @todo 保证时序正确 -auto display_t::loop() -> state_t::status_t { - while (state->status.load() != state_t::STOP) { - SDL_Event event = SDL_Event(); - bool is_mouse_down = false; - - while (SDL_PollEvent(&event) != 0) { - if (event.type == SDL_QUIT) { - state->status.store(state_t::STOP); - } - switch (event.type) { - // 键盘事件 - case SDL_KEYDOWN: { - switch (event.key.keysym.sym) { - case SDLK_SPACE: { - break; - } - case SDLK_TAB: { - state->obj_index++; - SPDLOG_LOGGER_INFO(SRLOG, "obj_index: {}", state->obj_index); - break; - } - case SDLK_1: { - state->draw_line = !state->draw_line; - SPDLOG_LOGGER_INFO(SRLOG, "draw_line: {}", state->draw_line); - break; - } - case SDLK_2: { - state->draw_triangle = !state->draw_triangle; - SPDLOG_LOGGER_INFO(SRLOG, "draw_triangle: {}", state->draw_triangle); - break; - } - default: { - // 输出按键名 - SPDLOG_LOGGER_INFO(SRLOG, "key {} down!", - SDL_GetKeyName(event.key.keysym.sym)); - break; - } - } - break; - } - // 鼠标移动 - case SDL_MOUSEMOTION: { - // 鼠标拖动 - if (is_mouse_down) { - SPDLOG_LOGGER_INFO(SRLOG, "鼠标拖动 {} {}", event.motion.xrel, - event.motion.yrel); - } - SPDLOG_LOGGER_DEBUG(SRLOG, "鼠标移动 {} {}", event.motion.xrel, - event.motion.yrel); - break; - } - // 鼠标按下 - case SDL_MOUSEBUTTONDOWN: { - is_mouse_down = true; - SPDLOG_LOGGER_DEBUG(SRLOG, "鼠标点击 {} {}", event.button.x, - event.button.y); - break; - } - // 鼠标释放 - case SDL_MOUSEBUTTONUP: { - is_mouse_down = false; - break; - } - } - } - - // 等待获取锁 - for (const auto &i : framebuffers) { - while (!i->displayable.load()) { - ; - } - // 填充窗口 - fill(i); - i->displayable = false; - } - } - return state_t::STOP; -} - -auto display_t::run() -> std::future { - return std::async(std::launch::async, &display_t::loop, this); -} - -} // namespace SimpleRenderer diff --git a/test/system_test/display.h b/test/system_test/display.h deleted file mode 100644 index 03daae2..0000000 --- a/test/system_test/display.h +++ /dev/null @@ -1,100 +0,0 @@ - -/** - * @file display.h - * @brief 显示 - * @author Zone.N (Zone.Niuzh@hotmail.com) - * @version 1.0 - * @date 2022-09-04 - * @copyright MIT LICENSE - * https://github.com/Simple-XX/SimpleRenderer - * @par change log: - * - *
DateAuthorDescription - *
2022-09-04Zone.N创建文件 - *
- */ - -#ifndef SIMPLERENDER_DISPLAY_H -#define SIMPLERENDER_DISPLAY_H - -#include -#include - -#include - -#include "config.h" -#include "framebuffer.h" -#include "status.h" - -namespace SimpleRenderer { - -/** - * 显示抽象 - */ -class display_t { -public: - /** - * 构造函数 - * @param _state 运行状态 - * @param _framebuffers 缓冲区 - */ - explicit display_t( - const std::shared_ptr &_state, - const std::vector> &_framebuffers); - - /** - * 析构函数 - */ - ~display_t(); - - /// @name 默认构造/析构函数 - /// @{ - display_t() = delete; - display_t(const display_t &_display) = default; - display_t(display_t &&_display) = default; - auto operator=(const display_t &_display) -> display_t & = default; - auto operator=(display_t &&_display) -> display_t & = default; - /// @} - - /** - * 将 framebuffer 中的数据绘制到屏幕上 - * @param _framebuffer 要绘制的 framebuffer - */ - void fill(const std::shared_ptr &_framebuffer); - - /** - * 运行 - */ - auto run() -> std::future; - -private: - /// 窗口标题 - static constexpr const char *WINDOW_TITLE = (char *)"SimpleRenderer"; - /// 默认字体大小 - static constexpr const int32_t DEFAULT_FONT_SIZE = 32; - - /// 状态 - std::shared_ptr state; - /// 缓冲 - std::vector> framebuffers; - /// 窗口宽度 - size_t width; - /// 窗口高度 - size_t height; - - /// sdl 窗口 - SDL_Window *sdl_window; - /// sdl 渲染器 - SDL_Renderer *sdl_renderer; - /// sdl 纹理 - SDL_Texture *sdl_texture; - - /** - * 显示循环 - */ - auto loop() -> state_t::status_t; -}; - -} // namespace SimpleRenderer - -#endif /* SIMPLERENDER_DISPLAY_H */ diff --git a/test/system_test/main.cpp b/test/system_test/main.cpp deleted file mode 100644 index e713b73..0000000 --- a/test/system_test/main.cpp +++ /dev/null @@ -1,75 +0,0 @@ - -/** - * @file main.cpp - * @brief 入口 - * @author Zone.N (Zone.Niuzh@hotmail.com) - * @version 1.0 - * @date 2022-06-06 - * @copyright MIT LICENSE - * https://github.com/Simple-XX/SimpleRenderer - * @par change log: - * - *
DateAuthorDescription - *
2022-06-06Zone.N迁移到 doxygen - *
- */ - -#include -#include -#include -#include - -#include "config.h" -#include "exception.hpp" -#include "framebuffer.h" -#include "model.hpp" -#include "render.h" -#include "scene.h" -#include "status.h" - -// @todo 不应该出现明确的类型,应该使用模板 -auto main(int, char **) -> int { - log_init(); - // obj 路径 - std::vector objs; - objs.emplace_back(OBJ_FILE_PATH + "cube.obj"); - objs.emplace_back(OBJ_FILE_PATH + "cube2.obj"); - objs.emplace_back(OBJ_FILE_PATH + "cube3.obj"); - objs.emplace_back(OBJ_FILE_PATH + "cornell_box.obj"); - objs.emplace_back(OBJ_FILE_PATH + "helmet.obj"); - objs.emplace_back(OBJ_FILE_PATH + "african_head.obj"); - objs.emplace_back(OBJ_FILE_PATH + "utah-teapot/utah-teapot.obj"); - - auto scene = std::make_shared(); - // 读取模型与材质 - for (auto &obj : objs) { - // 添加到场景中 - auto model = model_t(obj); - scene->add_model(model); - } - // 设置光照 - scene->set_light(light_t()); - - auto state = std::make_shared(); - std::vector> framebuffers; - framebuffers.emplace_back(std::make_shared(WIDTH, HEIGHT)); - framebuffers.emplace_back(std::make_shared(WIDTH, HEIGHT)); - framebuffers.emplace_back(std::make_shared(WIDTH, HEIGHT)); - auto render = - render_t(std::ref(state), std::ref(scene), std::ref(framebuffers)); - auto display = display_t(std::ref(state), std::ref(framebuffers)); - - // 计算线程 - auto render_ret = render.run(); - // 显示线程 - auto display_ret = display.run(); - - if (render_ret.get() != state_t::STOP) { - throw SimpleRenderer::exception("render thread exit with error"); - } - if (display_ret.get() != state_t::STOP) { - throw SimpleRenderer::exception("display thread exit with error"); - } - - return 0; -} diff --git a/test/unit_test/CMakeLists.txt b/test/unit_test/CMakeLists.txt index d9e9907..cc89c7e 100644 --- a/test/unit_test/CMakeLists.txt +++ b/test/unit_test/CMakeLists.txt @@ -13,8 +13,7 @@ project( enable_language(CXX) add_executable(unit_test - buffer_base_test.cpp - matrix_test.cpp + example.cpp ) target_compile_options(unit_test PRIVATE diff --git a/test/unit_test/buffer_base_test.cpp b/test/unit_test/buffer_base_test.cpp deleted file mode 100644 index dd94886..0000000 --- a/test/unit_test/buffer_base_test.cpp +++ /dev/null @@ -1,62 +0,0 @@ - -/** - * @file buffer_base_test.cpp - * @brief buffer_base.hpp 测试 - * @author Zone.N (Zone.Niuzh@hotmail.com) - * @version 1.0 - * @date 2022-09-03 - * @copyright MIT LICENSE - * https://github.com/Simple-XX/SimpleRenderer - * @par change log: - * - *
DateAuthorDescription - *
2022-09-03Zone.N创建文件 - *
- */ - -#include "gtest/gtest.h" - -#include "buffer_base.hpp" - -TEST(buffer_base_t, 空构造) { - buffer_base_t buffer_base0; - EXPECT_EQ(buffer_base0.get_width(), 0); - EXPECT_EQ(buffer_base0.get_height(), 0); - EXPECT_EQ(buffer_base0.length(), 0); - EXPECT_EQ(buffer_base0.data(), nullptr); -} - -TEST(buffer_base_t, 拷贝构造) { - buffer_base_t buffer_base0((uint32_t)100, 200, 0); - EXPECT_EQ(buffer_base0.get_width(), 100); - EXPECT_EQ(buffer_base0.get_height(), 200); - EXPECT_EQ(buffer_base0.BPP, sizeof(uint32_t)); - EXPECT_EQ(buffer_base0.length(), 100 * sizeof(uint32_t) * 200); - EXPECT_NE(buffer_base0.data(), nullptr); - - buffer_base_t buffer_base1; - buffer_base1 = buffer_base0; - EXPECT_EQ(buffer_base1.get_width(), 100); - EXPECT_EQ(buffer_base1.get_height(), 200); - EXPECT_EQ(buffer_base1.BPP, sizeof(uint32_t)); - EXPECT_EQ(buffer_base1.length(), 100 * sizeof(uint32_t) * 200); - EXPECT_NE(buffer_base1.data(), nullptr); -} - -TEST(buffer_base_t, clear) { - buffer_base_t buffer_base0((uint32_t)100, 200, 0); - EXPECT_EQ(buffer_base0.get_width(), 100); - EXPECT_EQ(buffer_base0.get_height(), 200); - EXPECT_EQ(buffer_base0.BPP, sizeof(uint32_t)); - EXPECT_EQ(buffer_base0.length(), 100 * sizeof(uint32_t) * 200); - EXPECT_NE(buffer_base0.data(), nullptr); - EXPECT_EQ(buffer_base0.data()[0], 0); - buffer_base0.clear(std::numeric_limits::lowest()); - EXPECT_EQ(buffer_base0.data()[0], std::numeric_limits::lowest()); -} - -TEST(buffer_base_t, 不同大小的buffer赋值) { - buffer_base_t buffer_base; - EXPECT_TRUE(buffer_base.get_height() == 0); - EXPECT_TRUE(buffer_base.get_width() == 0); -} diff --git a/test/unit_test/example.cpp b/test/unit_test/example.cpp new file mode 100644 index 0000000..2fa2f82 --- /dev/null +++ b/test/unit_test/example.cpp @@ -0,0 +1,23 @@ + +/** + * @file example.cpp + * @brief 测试示例 + * @author Zone.N (Zone.Niuzh@hotmail.com) + * @version 1.0 + * @date 2023-10-31 + * @copyright MIT LICENSE + * https://github.com/Simple-XX/SimplePhysicsEngine + * @par change log: + * + *
DateAuthorDescription + *
2023-10-31Zone.N创建文件 + *
+ */ + +#include "gtest/gtest.h" + +TEST(example, 示例) { + EXPECT_EQ(1, 1); + EXPECT_TRUE(true == true); + +} diff --git a/test/unit_test/matrix_test.cpp b/test/unit_test/matrix_test.cpp deleted file mode 100644 index 43ec849..0000000 --- a/test/unit_test/matrix_test.cpp +++ /dev/null @@ -1,50 +0,0 @@ - - -/** - * @file matrix_test.cpp - * @brief matrix.hpp 测试 - * @author Zone.N (Zone.Niuzh@hotmail.com) - * @version 1.0 - * @date 2022-09-03 - * @copyright MIT LICENSE - * https://github.com/Simple-XX/SimpleRenderer - * @par change log: - * - *
DateAuthorDescription - *
2022-09-03Zone.N创建文件 - *
- */ - -#include "gtest/gtest.h" - -#include "matrix.hpp" - -TEST(model_t_scale_half, 函数测试) { - auto delta_xyz_max = 1.983879f; - - // 缩放倍数 - auto multi = 540; - // 归一化并乘倍数 - auto scale = multi / delta_xyz_max; - EXPECT_FLOAT_EQ(scale, 272.19403); - - // 缩放 - auto scale_mat = matrix4f_t(); - scale_mat.setIdentity(); - scale_mat.diagonal()[0] = scale; - scale_mat.diagonal()[1] = scale; - scale_mat.diagonal()[2] = scale; - std::cout << scale_mat << std::endl; - - // 从左上角移动到指定位置 - auto translate_mat = matrix4f_t(); - translate_mat.setIdentity(); - translate_mat(0, 3) = WIDTH / 2; - translate_mat(1, 3) = HEIGHT / 2; - translate_mat(2, 3) = 0; - std::cout << translate_mat << std::endl; - - auto matrix = translate_mat * scale_mat; - - std::cout << matrix << std::endl; -}