diff --git a/patchfile.patch b/patchfile.patch deleted file mode 100644 index 1b899fcd15e6d3a5135af1c190d337fe52dd0f59..0000000000000000000000000000000000000000 --- a/patchfile.patch +++ /dev/null @@ -1,453 +0,0 @@ -From a7e955501f487a0fcd2556c234c474eabc30a12e Mon Sep 17 00:00:00 2001 -From: Andrew Wilson <andx_roo@live.com> -Date: Sun, 22 Mar 2020 01:23:25 -0400 -Subject: [PATCH 1/2] REFAC: defaultDt should be used instead of dt for pbd, - changed cloth topology - ---- - Examples/MultipleScenes/multipleScenes.cpp | 2 +- - Examples/PBD/PBDCloth/pbdClothExample.cpp | 24 +++++++++++--- - .../PBDCollisionMultipleObjectsExample.cpp | 2 +- - .../PBDCollisionOneObjectExample.cpp | 2 +- - Examples/PBD/PBDFluids/PBDFluidsExample.cpp | 2 +- - Examples/PBD/PBDString/pbdStringExample.cpp | 32 +++++++++---------- - 6 files changed, 39 insertions(+), 25 deletions(-) - -diff --git a/Examples/MultipleScenes/multipleScenes.cpp b/Examples/MultipleScenes/multipleScenes.cpp -index 1087ddb0..abeee6b1 100644 ---- a/Examples/MultipleScenes/multipleScenes.cpp -+++ b/Examples/MultipleScenes/multipleScenes.cpp -@@ -159,7 +159,7 @@ createClothScene(std::shared_ptr<SimulationManager> simManager, const char* scen - // Other parameters - pbdParams->m_uniformMassValue = 1.0; - pbdParams->m_gravity = Vec3d(0, -9.8, 0); -- pbdParams->m_dt = 0.03; -+ pbdParams->m_DefaultDt = 0.03; - pbdParams->m_maxIter = 5; - - // Set the parameters -diff --git a/Examples/PBD/PBDCloth/pbdClothExample.cpp b/Examples/PBD/PBDCloth/pbdClothExample.cpp -index 08cc288f..a6241dcd 100644 ---- a/Examples/PBD/PBDCloth/pbdClothExample.cpp -+++ b/Examples/PBD/PBDCloth/pbdClothExample.cpp -@@ -42,8 +42,8 @@ main() - StdVectorOfVec3d vertList; - const double width = 10.0; - const double height = 10.0; -- const int nRows = 11; -- const int nCols = 11; -+ const int nRows = 16; -+ const int nCols = 16; - vertList.resize(nRows * nCols); - const double dy = width / (double)(nCols - 1); - const double dx = height / (double)(nRows - 1); -@@ -64,8 +64,22 @@ main() - for (std::size_t j = 0; j < nCols - 1; j++) - { - SurfaceMesh::TriangleArray tri[2]; -- tri[0] = { { i* nCols + j, (i + 1) * nCols + j, i* nCols + j + 1 } }; -- tri[1] = { { (i + 1) * nCols + j + 1, i* nCols + j + 1, (i + 1) * nCols + j } }; -+ const size_t index1 = i * nCols + j; -+ const size_t index2 = index1 + nCols; -+ const size_t index3 = index1 + 1; -+ const size_t index4 = index2 + 1; -+ -+ // Interleave [/][\] -+ if (i % 2 ^ j % 2) -+ { -+ tri[0] = { { index1, index2, index3 } }; -+ tri[1] = { { index4, index3, index2 } }; -+ } -+ else -+ { -+ tri[0] = { { index2, index4, index1 } }; -+ tri[1] = { { index4, index3, index1 } }; -+ } - triangles.push_back(tri[0]); - triangles.push_back(tri[1]); - } -@@ -94,7 +108,7 @@ main() - // Other parameters - pbdParams->m_uniformMassValue = 1.0; - pbdParams->m_gravity = Vec3d(0, -9.8, 0); -- pbdParams->m_dt = 0.03; -+ pbdParams->m_DefaultDt = 0.005; - pbdParams->m_maxIter = 5; - - // Set the parameters -diff --git a/Examples/PBD/PBDCollisionMultipleObjects/PBDCollisionMultipleObjectsExample.cpp b/Examples/PBD/PBDCollisionMultipleObjects/PBDCollisionMultipleObjectsExample.cpp -index 79d8892d..aa670f72 100644 ---- a/Examples/PBD/PBDCollisionMultipleObjects/PBDCollisionMultipleObjectsExample.cpp -+++ b/Examples/PBD/PBDCollisionMultipleObjects/PBDCollisionMultipleObjectsExample.cpp -@@ -125,7 +125,7 @@ generateDragon(const std::shared_ptr<imstk::Scene>& scene, - // Other parameters - pbdParams->m_uniformMassValue = 5.0; - pbdParams->m_gravity = Vec3d(0, -1.0, 0); -- pbdParams->m_dt = 0.01; -+ pbdParams->m_DefaultDt = 0.01; - pbdParams->m_maxIter = 20; - pbdParams->m_proximity = 0.5; - pbdParams->m_contactStiffness = 0.1; -diff --git a/Examples/PBD/PBDCollisionOneObject/PBDCollisionOneObjectExample.cpp b/Examples/PBD/PBDCollisionOneObject/PBDCollisionOneObjectExample.cpp -index 3f4d3bfb..9b814028 100644 ---- a/Examples/PBD/PBDCollisionOneObject/PBDCollisionOneObjectExample.cpp -+++ b/Examples/PBD/PBDCollisionOneObject/PBDCollisionOneObjectExample.cpp -@@ -85,7 +85,7 @@ main() - // Other parameters - pbdParams->m_uniformMassValue = 1.0; - pbdParams->m_gravity = Vec3d(0, -10.0, 0); -- pbdParams->m_dt = 0.02; -+ pbdParams->m_DefaultDt = 0.01; - pbdParams->m_maxIter = 5; - pbdParams->m_proximity = 0.3; - pbdParams->m_contactStiffness = 0.1; -diff --git a/Examples/PBD/PBDFluids/PBDFluidsExample.cpp b/Examples/PBD/PBDFluids/PBDFluidsExample.cpp -index 90e24704..6ad21b5c 100644 ---- a/Examples/PBD/PBDFluids/PBDFluidsExample.cpp -+++ b/Examples/PBD/PBDFluids/PBDFluidsExample.cpp -@@ -72,7 +72,7 @@ main() - // Other parameters - pbdParams->m_uniformMassValue = 1.0; - pbdParams->m_gravity = Vec3d(0, -9.8, 0); -- pbdParams->m_dt = 0.05; -+ pbdParams->m_DefaultDt = 0.01; - pbdParams->m_maxIter = 2; - pbdParams->m_proximity = 0.01; - pbdParams->m_contactStiffness = 0.2; -diff --git a/Examples/PBD/PBDString/pbdStringExample.cpp b/Examples/PBD/PBDString/pbdStringExample.cpp -index 2596f314..c94f3cde 100644 ---- a/Examples/PBD/PBDString/pbdStringExample.cpp -+++ b/Examples/PBD/PBDString/pbdStringExample.cpp -@@ -36,15 +36,15 @@ int - main() - { - auto simManager = std::make_shared<SimulationManager>(); -- auto scene = simManager->createNewScene("PBDString"); -+ auto scene = simManager->createNewScene("PBDString"); - - // Setup N separate string simulations with varying bend stiffnesses -- const unsigned int numStrings = 8; -- const unsigned int numVerts = 30; -- const double stringSpacing = 2.0; // How far each string is apart -- const double stringLength = 10.0; // Total length of string -- const Color startColor = Color::Red; // Color of first string -- const Color endColor = Color::Green; // Color of last string -+ const unsigned int numStrings = 8; -+ const unsigned int numVerts = 30; -+ const double stringSpacing = 2.0; // How far each string is apart -+ const double stringLength = 10.0; // Total length of string -+ const Color startColor = Color::Red; // Color of first string -+ const Color endColor = Color::Green; // Color of last string - - struct PbdSim - { -@@ -92,10 +92,10 @@ main() - sims[i].params = std::make_shared<PBDModelConfig>(); - sims[i].params->enableConstraint(PbdConstraint::Type::Distance, 0.001); - sims[i].params->enableConstraint(PbdConstraint::Type::Bend, static_cast<double>(i) * 0.1 / numStrings + 0.001); -- sims[i].params->m_fixedNodeIds = { 0 }; // Fix the first node in each string -+ sims[i].params->m_fixedNodeIds = { 0 }; - sims[i].params->m_uniformMassValue = 5.0; - sims[i].params->m_gravity = Vec3d(0, -9.8, 0); -- sims[i].params->m_dt = 0.0005; -+ sims[i].params->m_DefaultDt = 0.0005; - sims[i].params->m_maxIter = 5; - - // Set the parameters -@@ -125,10 +125,10 @@ main() - scene->getCamera()->setPosition(0.0, 0.0, 15.0); - - // Move the points every frame -- double t = 0.0; -- const double dt = 0.0005; -- const double radius = 1.5; -- auto movePoints = -+ double t = 0.0; -+ const double dt = 0.0005; -+ const double radius = 1.5; -+ auto movePoints = - [&sims, &t, dt, radius](Module* module) - { - for (unsigned int i = 0; i < sims.size(); i++) -@@ -136,9 +136,9 @@ main() - Vec3d pos = sims[i].model->getCurrentState()->getVertexPosition(0); - // Move in circle, derivatives of parametric eq of circle - sims[i].model->getCurrentState()->setVertexPosition(0, imstk::Vec3d( -- pos.x() + -std::sin(t) * radius * dt, -- pos.y(), -- pos.z() + std::cos(t) * radius * dt)); -+ pos.x() + -std::sin(t) * radius * dt, -+ pos.y(), -+ pos.z() + std::cos(t) * radius * dt)); - } - t += dt; - }; --- -2.20.1.windows.1 - - -From d7cdacf090dd9cd881ad37c668968b9463be228d Mon Sep 17 00:00:00 2001 -From: Andrew Wilson <andx_roo@live.com> -Date: Sun, 22 Mar 2020 01:28:48 -0400 -Subject: [PATCH 2/2] STYLE: Uncrustify - ---- - Examples/MultipleScenes/multipleScenes.cpp | 4 +-- - Examples/PBD/PBDCloth/pbdClothExample.cpp | 12 ++++---- - Examples/PBD/PBDString/pbdStringExample.cpp | 28 +++++++++---------- - .../imstkMeshToMeshBruteForceCD.cpp | 2 +- - .../imstkTetraToTetraCD.cpp | 4 +-- - .../imstkFEMDeformableBodyModel.cpp | 4 +-- - .../ObjectModels/imstkRigidBodyModel.h | 2 +- - .../ObjectModels/imstkRigidBodyWorld.h | 3 +- - .../Geometry/Particles/imstkRenderParticles.h | 4 +-- - Source/Rendering/GUIOverlay/imstkGUIWidget.h | 2 +- - Source/Rendering/imstkRenderer.cpp | 2 +- - Source/Solvers/imstkIterativeLinearSolver.cpp | 1 - - 12 files changed, 32 insertions(+), 36 deletions(-) - -diff --git a/Examples/MultipleScenes/multipleScenes.cpp b/Examples/MultipleScenes/multipleScenes.cpp -index abeee6b1..7da6cc39 100644 ---- a/Examples/MultipleScenes/multipleScenes.cpp -+++ b/Examples/MultipleScenes/multipleScenes.cpp -@@ -158,9 +158,9 @@ createClothScene(std::shared_ptr<SimulationManager> simManager, const char* scen - - // Other parameters - pbdParams->m_uniformMassValue = 1.0; -- pbdParams->m_gravity = Vec3d(0, -9.8, 0); -+ pbdParams->m_gravity = Vec3d(0, -9.8, 0); - pbdParams->m_DefaultDt = 0.03; -- pbdParams->m_maxIter = 5; -+ pbdParams->m_maxIter = 5; - - // Set the parameters - pbdModel->configure(pbdParams); -diff --git a/Examples/PBD/PBDCloth/pbdClothExample.cpp b/Examples/PBD/PBDCloth/pbdClothExample.cpp -index a6241dcd..a544d87f 100644 ---- a/Examples/PBD/PBDCloth/pbdClothExample.cpp -+++ b/Examples/PBD/PBDCloth/pbdClothExample.cpp -@@ -64,10 +64,10 @@ main() - for (std::size_t j = 0; j < nCols - 1; j++) - { - SurfaceMesh::TriangleArray tri[2]; -- const size_t index1 = i * nCols + j; -- const size_t index2 = index1 + nCols; -- const size_t index3 = index1 + 1; -- const size_t index4 = index2 + 1; -+ const size_t index1 = i * nCols + j; -+ const size_t index2 = index1 + nCols; -+ const size_t index3 = index1 + 1; -+ const size_t index4 = index2 + 1; - - // Interleave [/][\] - if (i % 2 ^ j % 2) -@@ -107,9 +107,9 @@ main() - - // Other parameters - pbdParams->m_uniformMassValue = 1.0; -- pbdParams->m_gravity = Vec3d(0, -9.8, 0); -+ pbdParams->m_gravity = Vec3d(0, -9.8, 0); - pbdParams->m_DefaultDt = 0.005; -- pbdParams->m_maxIter = 5; -+ pbdParams->m_maxIter = 5; - - // Set the parameters - pbdModel->configure(pbdParams); -diff --git a/Examples/PBD/PBDString/pbdStringExample.cpp b/Examples/PBD/PBDString/pbdStringExample.cpp -index c94f3cde..3a02c7d3 100644 ---- a/Examples/PBD/PBDString/pbdStringExample.cpp -+++ b/Examples/PBD/PBDString/pbdStringExample.cpp -@@ -36,15 +36,15 @@ int - main() - { - auto simManager = std::make_shared<SimulationManager>(); -- auto scene = simManager->createNewScene("PBDString"); -+ auto scene = simManager->createNewScene("PBDString"); - - // Setup N separate string simulations with varying bend stiffnesses -- const unsigned int numStrings = 8; -- const unsigned int numVerts = 30; -- const double stringSpacing = 2.0; // How far each string is apart -- const double stringLength = 10.0; // Total length of string -- const Color startColor = Color::Red; // Color of first string -- const Color endColor = Color::Green; // Color of last string -+ const unsigned int numStrings = 8; -+ const unsigned int numVerts = 30; -+ const double stringSpacing = 2.0; // How far each string is apart -+ const double stringLength = 10.0; // Total length of string -+ const Color startColor = Color::Red; // Color of first string -+ const Color endColor = Color::Green; // Color of last string - - struct PbdSim - { -@@ -92,11 +92,11 @@ main() - sims[i].params = std::make_shared<PBDModelConfig>(); - sims[i].params->enableConstraint(PbdConstraint::Type::Distance, 0.001); - sims[i].params->enableConstraint(PbdConstraint::Type::Bend, static_cast<double>(i) * 0.1 / numStrings + 0.001); -- sims[i].params->m_fixedNodeIds = { 0 }; -+ sims[i].params->m_fixedNodeIds = { 0 }; - sims[i].params->m_uniformMassValue = 5.0; -- sims[i].params->m_gravity = Vec3d(0, -9.8, 0); -+ sims[i].params->m_gravity = Vec3d(0, -9.8, 0); - sims[i].params->m_DefaultDt = 0.0005; -- sims[i].params->m_maxIter = 5; -+ sims[i].params->m_maxIter = 5; - - // Set the parameters - sims[i].model->configure(sims[i].params); -@@ -125,10 +125,10 @@ main() - scene->getCamera()->setPosition(0.0, 0.0, 15.0); - - // Move the points every frame -- double t = 0.0; -- const double dt = 0.0005; -- const double radius = 1.5; -- auto movePoints = -+ double t = 0.0; -+ const double dt = 0.0005; -+ const double radius = 1.5; -+ auto movePoints = - [&sims, &t, dt, radius](Module* module) - { - for (unsigned int i = 0; i < sims.size(); i++) -diff --git a/Source/Collision/CollisionDetection/imstkMeshToMeshBruteForceCD.cpp b/Source/Collision/CollisionDetection/imstkMeshToMeshBruteForceCD.cpp -index 3a04e5b6..2503edf2 100644 ---- a/Source/Collision/CollisionDetection/imstkMeshToMeshBruteForceCD.cpp -+++ b/Source/Collision/CollisionDetection/imstkMeshToMeshBruteForceCD.cpp -@@ -42,7 +42,7 @@ MeshToMeshBruteForceCD::MeshToMeshBruteForceCD(std::shared_ptr<Geometry> ob - { - } - --// The above error is caused by the -+// The above error is caused by the - void - MeshToMeshBruteForceCD::computeCollisionData() - { -diff --git a/Source/Collision/CollisionDetection/imstkTetraToTetraCD.cpp b/Source/Collision/CollisionDetection/imstkTetraToTetraCD.cpp -index d394fe0e..a5db77b2 100644 ---- a/Source/Collision/CollisionDetection/imstkTetraToTetraCD.cpp -+++ b/Source/Collision/CollisionDetection/imstkTetraToTetraCD.cpp -@@ -43,8 +43,8 @@ TetraToTetraCD::TetraToTetraCD(std::shared_ptr<TetrahedralMesh> meshA, - void - TetraToTetraCD::findCollisionsForMeshWithinHashTable(const std::shared_ptr<TetrahedralMesh> mesh, size_t idOffset) - { -- constexpr const auto eps = VERY_SMALL_EPSILON; -- const double eps2 = 1e-10; -+ constexpr const auto eps = VERY_SMALL_EPSILON; -+ const double eps2 = 1e-10; - - //tetrahedron belonging part of penetration type does not change - auto cType = static_cast<PointTetrahedronCollisionDataElement::CollisionType>(idOffset > 0); -diff --git a/Source/DynamicalModels/ObjectModels/imstkFEMDeformableBodyModel.cpp b/Source/DynamicalModels/ObjectModels/imstkFEMDeformableBodyModel.cpp -index 7e7eb229..e4c5e963 100644 ---- a/Source/DynamicalModels/ObjectModels/imstkFEMDeformableBodyModel.cpp -+++ b/Source/DynamicalModels/ObjectModels/imstkFEMDeformableBodyModel.cpp -@@ -519,14 +519,12 @@ FEMDeformableBodyModel::computeImplicitSystemLHS(const kinematicState& stateAtT, - kinematicState& newState, - const StateUpdateType updateType) - { -- -- - const double dT = m_timeIntegrator->getTimestepSize(); - - switch (updateType) - { - case StateUpdateType::deltaVelocity: -- -+ - stateAtT;// supress warning (state is not used in this update type hence can be ignored) - - this->updateMassMatrix(); -diff --git a/Source/DynamicalModels/ObjectModels/imstkRigidBodyModel.h b/Source/DynamicalModels/ObjectModels/imstkRigidBodyModel.h -index d849241e..cc3b5bcd 100644 ---- a/Source/DynamicalModels/ObjectModels/imstkRigidBodyModel.h -+++ b/Source/DynamicalModels/ObjectModels/imstkRigidBodyModel.h -@@ -116,7 +116,7 @@ public: - void setTimeStep(const double timeStep) - { - if (m_rigidBodyWorld) -- { -+ { - m_rigidBodyWorld->setTimeStep((float)timeStep); - } - } -diff --git a/Source/DynamicalModels/ObjectModels/imstkRigidBodyWorld.h b/Source/DynamicalModels/ObjectModels/imstkRigidBodyWorld.h -index 30f4e882..f822c55c 100644 ---- a/Source/DynamicalModels/ObjectModels/imstkRigidBodyWorld.h -+++ b/Source/DynamicalModels/ObjectModels/imstkRigidBodyWorld.h -@@ -87,7 +87,7 @@ public: - /// \brief Set the time step for the entire physX scene - /// - void setTimeStep(const float dT) { m_timeStep = dT; }; -- -+ - /// - /// \brief Return the time step size - /// -@@ -97,7 +97,6 @@ protected: - float m_timeStep = 1.f / 300.f; - private: - -- - static RigidBodyWorld* m_rigidBodyWorldInstance; - - /// -diff --git a/Source/Geometry/Particles/imstkRenderParticles.h b/Source/Geometry/Particles/imstkRenderParticles.h -index 6f4b6980..504380e7 100644 ---- a/Source/Geometry/Particles/imstkRenderParticles.h -+++ b/Source/Geometry/Particles/imstkRenderParticles.h -@@ -129,11 +129,11 @@ protected: - - #pragma warning( push ) - #pragma warning( disable : 4100 ) -- void applyTranslation(const Vec3d t) override { LOG(WARNING) << "applyTranslation Not implemented!";} -+ void applyTranslation(const Vec3d t) override { LOG(WARNING) << "applyTranslation Not implemented!"; } - void applyRotation(const Mat3d r) override { LOG(WARNING) << "applyRotation Not implemented!"; } - void applyScaling(const double s) override { LOG(WARNING) << "applyScaling Not implemented!"; } - #pragma warning( pop ) -- -+ - virtual void updatePostTransformData() const override {} - }; - } -diff --git a/Source/Rendering/GUIOverlay/imstkGUIWidget.h b/Source/Rendering/GUIOverlay/imstkGUIWidget.h -index 75f425a5..c7a73a8a 100644 ---- a/Source/Rendering/GUIOverlay/imstkGUIWidget.h -+++ b/Source/Rendering/GUIOverlay/imstkGUIWidget.h -@@ -98,7 +98,7 @@ public: - /// - /// \brief Render - /// -- virtual void render(const bool inWindow = false)=0; -+ virtual void render(const bool inWindow = false) = 0; - - protected: - Widget() = delete; -diff --git a/Source/Rendering/imstkRenderer.cpp b/Source/Rendering/imstkRenderer.cpp -index 1a21d84b..92afd991 100644 ---- a/Source/Rendering/imstkRenderer.cpp -+++ b/Source/Rendering/imstkRenderer.cpp -@@ -26,7 +26,7 @@ namespace imstk - void - Renderer::setMode(const Renderer::Mode mode, const bool enableVR) - { -- m_VrEnabled = enableVR; -+ m_VrEnabled = enableVR; - m_currentMode = mode; - } - -diff --git a/Source/Solvers/imstkIterativeLinearSolver.cpp b/Source/Solvers/imstkIterativeLinearSolver.cpp -index ab6f3bec..d8da2627 100644 ---- a/Source/Solvers/imstkIterativeLinearSolver.cpp -+++ b/Source/Solvers/imstkIterativeLinearSolver.cpp -@@ -64,7 +64,6 @@ IterativeLinearSolver::print() const - LOG(INFO) << "Solver type (direct/iterative): Iterative"; - } - -- - void - IterativeLinearSolver::solve(Vectord& x) - { --- -2.20.1.windows.1 -