diff --git a/CMakeLists.txt b/CMakeLists.txt index 8229d8fd392eaadb8dc66921ce91e783af73e75a..3f5645a5d7e6301926e3ee89498fc6a3ee642986 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,6 +143,7 @@ if(MSVC) add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-D_CRT_SECURE_NO_DEPRECATE) add_definitions(-D_SCL_SECURE_NO_DEPRECATE) + add_definitions(-D_USE_MATH_DEFINES) add_definitions(-DWIN32_LEAN_AND_MEAN) add_definitions(-DWINDOWS_EXTRA_LEAN) endif() @@ -232,7 +233,7 @@ set(SimMedTK_exports Mesh Rendering Simulators - Tools + VirtualTools Event) if(SimMedTK_USE_OCULUS) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 96c9771d9f4e61d78e7c1eb4350aae81493d415f..7020e00427e95f062e7dfc4bb2758a2aa41803e1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -8,6 +8,6 @@ add_subdirectory(Mesh) add_subdirectory(Rendering) add_subdirectory(RenderDelegates) add_subdirectory(Simulators) -add_subdirectory(Tools) +add_subdirectory(VirtualTools) add_subdirectory(Event) add_subdirectory(Geometry) diff --git a/src/Collision/SpatialHashCollision.cpp b/src/Collision/SpatialHashCollision.cpp index 7a3421d0717aafdf964ea4921c2feb4f91015899..1507ec6ba3a6c18b54dfcce1144f7a2401102c44 100644 --- a/src/Collision/SpatialHashCollision.cpp +++ b/src/Collision/SpatialHashCollision.cpp @@ -23,9 +23,6 @@ #include "SpatialHashCollision.h" -// STL includes -#include <cmath> - // SimMedTK includes #include "Core/CollisionConfig.h" #include "Collision/SurfaceTree.h" diff --git a/src/Core/CollisionPair.cpp b/src/Core/CollisionPair.cpp index 14612776c9d41589c751a59f6fdc9b394c032ed3..a03203368508fb3f13a1f3eaf17a394daf8fcea0 100644 --- a/src/Core/CollisionPair.cpp +++ b/src/Core/CollisionPair.cpp @@ -84,7 +84,7 @@ const std::vector< std::shared_ptr< Contact > >& CollisionPair::getContacts() co void CollisionPair::printCollisionPairs() { std::cout << "# Contacts: " << this->contacts.size() << std::endl; - for (int i = 0; i < this->contacts.size(); i++) + for (size_t i = 0; i < this->contacts.size(); i++) { std::cout << "Contact no: " << i << std::endl; this->contacts[0]->printInfo(); diff --git a/src/Core/Light.cpp b/src/Core/Light.cpp index 0ad07b9913da6dd0bdeed55c809148419546e088..845b1c946c44f379707e9ad84799ffa68e722f06 100644 --- a/src/Core/Light.cpp +++ b/src/Core/Light.cpp @@ -21,9 +21,6 @@ // Contact: //--------------------------------------------------------------------------- -// STD includes -#include <cmath> - // SimMedTK includes #include "Light.h" #include "Quaternion.h" diff --git a/src/External/moller.h b/src/External/moller.h index 1f6c7d521c41ce98db18ed8f1d1d1a7bdd43d272..3778c7bc300103033306bb53247c007e11ed9ebb 100644 --- a/src/External/moller.h +++ b/src/External/moller.h @@ -26,8 +26,6 @@ * isectpt1, isectpt2 are the endpoints of the line of intersection */ -#include <cmath> - //#define std::fabs(x) ((double)fabs(x)) /* implement as is fastest on your machine */ // #define std::fabs(x) (x>=0?x:-x) /* implement as is fastest on your machine */ diff --git a/src/Mesh/VegaSceneObject.cpp b/src/Mesh/VegaSceneObject.cpp index 5cbb279c04911018ed50aabefdd0f84016d15a7d..b14778aec149024cb70dba085ad7b69fdaa26cc9 100644 --- a/src/Mesh/VegaSceneObject.cpp +++ b/src/Mesh/VegaSceneObject.cpp @@ -1,4 +1,4 @@ -#include <math.h> + #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/src/Mesh/VegaSceneObjectDeformable.cpp b/src/Mesh/VegaSceneObjectDeformable.cpp index 67d42bc13337bb8b2ef7e4f60cfbffe2320b7012..de71abc5a2c5564663107d14fb460ad20a6c2be7 100644 --- a/src/Mesh/VegaSceneObjectDeformable.cpp +++ b/src/Mesh/VegaSceneObjectDeformable.cpp @@ -1,4 +1,4 @@ -#include <math.h> + #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/src/RenderDelegates/Config.h b/src/RenderDelegates/Config.h index 5703ab6b3c543ff4b06daf07bd1ca757177fec6d..0d08484b9a224bc4d5af22b8afb8c3fca1c5fa16 100644 --- a/src/RenderDelegates/Config.h +++ b/src/RenderDelegates/Config.h @@ -6,7 +6,6 @@ #define SIMMEDTK_REGISTER_RENDER_DELEGATES() \ SIMMEDTK_RUN_LOADER(register_rendering_viewer); \ SIMMEDTK_RUN_LOADER(register_aabb_render_delegate); \ - SIMMEDTK_RUN_LOADER(register_lattice_render_delegate); \ SIMMEDTK_RUN_LOADER(register_mesh_render_delegate); \ SIMMEDTK_RUN_LOADER(register_plane_render_delegate); \ SIMMEDTK_RUN_LOADER(register_scene_object_deformable_render_delegate); \ diff --git a/src/Rendering/ConfigRendering.h b/src/Rendering/ConfigRendering.h index acce80dc95af3f386d7e5b3d5468747627f38a69..91d00876584859da878c3203e10f52ab28621a9e 100644 --- a/src/Rendering/ConfigRendering.h +++ b/src/Rendering/ConfigRendering.h @@ -24,8 +24,6 @@ #ifndef SMCONFIGRENDERING_H #define SMCONFIGRENDERING_H -// STL includes -#include <cmath> #include <memory> #include <vector> diff --git a/src/Tools/CMakeLists.txt b/src/VirtualTools/CMakeLists.txt similarity index 64% rename from src/Tools/CMakeLists.txt rename to src/VirtualTools/CMakeLists.txt index f3c195dc19bbd82cf342ea1722884eb0969721dd..12f58b29cd165a1412c46bcf4ee88034a706bfca 100644 --- a/src/Tools/CMakeLists.txt +++ b/src/VirtualTools/CMakeLists.txt @@ -1,12 +1,12 @@ -simmedtk_add_library(Tools +simmedtk_add_library(VirtualTools SOURCES curvedGrasper.cpp PUBLIC_HEADERS curvedGrasper.h ) -target_link_libraries(Tools +target_link_libraries(VirtualTools PRIVATE Core Mesh diff --git a/src/Tools/curvedGrasper.cpp b/src/VirtualTools/curvedGrasper.cpp similarity index 100% rename from src/Tools/curvedGrasper.cpp rename to src/VirtualTools/curvedGrasper.cpp diff --git a/src/Tools/curvedGrasper.h b/src/VirtualTools/curvedGrasper.h similarity index 100% rename from src/Tools/curvedGrasper.h rename to src/VirtualTools/curvedGrasper.h