diff --git a/Examples/DeformableBody/DeformableBodyExample.cpp b/Examples/DeformableBody/DeformableBodyExample.cpp index 0308baaed5fb22d2f653d047dbfa66047f19c360..bf98ab13166af558d111c9a6b476dd7adb24bb32 100644 --- a/Examples/DeformableBody/DeformableBodyExample.cpp +++ b/Examples/DeformableBody/DeformableBodyExample.cpp @@ -52,13 +52,13 @@ main() // Load a tetrahedral mesh auto tetMesh = MeshIO::read(iMSTK_DATA_ROOT "/asianDragon/asianDragon.veg"); - CHECK(tetMesh) << "Could not read mesh from file."; + CHECK(tetMesh!=nullptr) << "Could not read mesh from file."; // Extract the surface mesh auto surfMesh = std::make_shared<SurfaceMesh>(); auto volTetMesh = std::dynamic_pointer_cast<TetrahedralMesh>(tetMesh); - CHECK(volTetMesh) << "Dynamic pointer cast from PointSet to TetrahedralMesh failed!"; + CHECK(volTetMesh!=nullptr) << "Dynamic pointer cast from PointSet to TetrahedralMesh failed!"; volTetMesh->extractSurfaceMesh(surfMesh, true); diff --git a/Examples/GeometryTransforms/GeometryTransformsExample.cpp b/Examples/GeometryTransforms/GeometryTransformsExample.cpp index 0734d692e0d52bbd70d31337732470666f8893fb..a6138fd36498fecf58bd52cd15967a70a4e42afe 100644 --- a/Examples/GeometryTransforms/GeometryTransformsExample.cpp +++ b/Examples/GeometryTransforms/GeometryTransformsExample.cpp @@ -40,7 +40,7 @@ main() auto sceneObj = apiutils::createAndAddVisualSceneObject(scene, iMSTK_DATA_ROOT "/asianDragon/asianDragon.obj", "Dragon"); - CHECK(sceneObj) << "ERROR: Unable to create scene object"; + CHECK(sceneObj!=nullptr) << "ERROR: Unable to create scene object"; auto surfaceMesh = sceneObj->getVisualGeometry(); surfaceMesh->scale(5., Geometry::TransformType::ConcatenateToTransform); diff --git a/Examples/RigidBodyDynamics/RigidBodyDynamicsExample.cpp b/Examples/RigidBodyDynamics/RigidBodyDynamicsExample.cpp index a92cd86b6cbe2411004758aa7c9bdd4aea854485..e02a5322b919e139eef146e17d84bbd82ddff741 100644 --- a/Examples/RigidBodyDynamics/RigidBodyDynamicsExample.cpp +++ b/Examples/RigidBodyDynamics/RigidBodyDynamicsExample.cpp @@ -41,13 +41,13 @@ addMeshRigidObject(const std::string& name, std::shared_ptr<Scene> scene, Vec3d // Load a tetrahedral mesh auto tetMesh = imstk::MeshIO::read(iMSTK_DATA_ROOT "/asianDragon/asianDragon.veg"); - CHECK(tetMesh) << "Could not read mesh from file."; + CHECK(tetMesh!=nullptr) << "Could not read mesh from file."; // Extract the surface mesh auto surfMesh = std::make_shared<SurfaceMesh>(); auto volTetMesh = std::dynamic_pointer_cast<TetrahedralMesh>(tetMesh); - CHECK(volTetMesh) << "Dynamic pointer cast from PointSet to TetrahedralMesh failed!"; + CHECK(volTetMesh!=nullptr) << "Dynamic pointer cast from PointSet to TetrahedralMesh failed!"; volTetMesh->scale(15., Geometry::TransformType::ApplyToData); volTetMesh->translate(pos, Geometry::TransformType::ApplyToData); diff --git a/Source/Collision/CollisionHandling/imstkBoneDrillingCH.cpp b/Source/Collision/CollisionHandling/imstkBoneDrillingCH.cpp index 29b12342d43d92681315c2952d57433eea3ce0be..c3f0748363b1b0740bdd69999ac31806f3f6c1b6 100644 --- a/Source/Collision/CollisionHandling/imstkBoneDrillingCH.cpp +++ b/Source/Collision/CollisionHandling/imstkBoneDrillingCH.cpp @@ -42,7 +42,7 @@ BoneDrillingCH::BoneDrillingCH(const Side& side, { auto boneMesh = std::dynamic_pointer_cast<TetrahedralMesh>(m_bone->getCollidingGeometry()); - CHECK(boneMesh) << "BoneDrillingCH::BoneDrillingCH Error:The bone colliding geometry is not a mesh!"; + CHECK(boneMesh!=nullptr) << "BoneDrillingCH::BoneDrillingCH Error:The bone colliding geometry is not a mesh!"; // Initialize bone density values m_nodalDensity.reserve(boneMesh->getNumVertices()); diff --git a/Source/Collision/CollisionHandling/imstkPBDCollisionHandling.cpp b/Source/Collision/CollisionHandling/imstkPBDCollisionHandling.cpp index 20476d29780f4d23cce532c544d3ce350726fe48..3d5dd7018295e6cfedffd51d861a782dbc52fcda 100644 --- a/Source/Collision/CollisionHandling/imstkPBDCollisionHandling.cpp +++ b/Source/Collision/CollisionHandling/imstkPBDCollisionHandling.cpp @@ -75,7 +75,7 @@ PBDCollisionHandling::processCollisionData() }*/ this->generatePBDConstraints(); - CHECK(m_PBDSolver) << "No PbdSolver found to handle the Collision constraints!"; + CHECK(m_PBDSolver!=nullptr) << "No PbdSolver found to handle the Collision constraints!"; m_PBDSolver->addCollisionConstraints(&m_PBDConstraints); } diff --git a/Source/Collision/CollisionHandling/imstkPenaltyCH.cpp b/Source/Collision/CollisionHandling/imstkPenaltyCH.cpp index f36864259f0ecb1ff970c2d88ee8f47239dfd84e..4d31bd32b150aa011e92739befc43613824926be 100644 --- a/Source/Collision/CollisionHandling/imstkPenaltyCH.cpp +++ b/Source/Collision/CollisionHandling/imstkPenaltyCH.cpp @@ -65,7 +65,7 @@ PenaltyCH::computeContactForcesAnalyticRigid(const std::shared_ptr<CollidingObje return; } - CHECK(analyticObj) << m_object->getName() << " is not a colliding object"; + CHECK(analyticObj!=nullptr) << m_object->getName() << " is not a colliding object"; // If collision data is valid, append forces Vec3d force(0., 0., 0.); @@ -94,7 +94,7 @@ PenaltyCH::computeContactForcesDiscreteDeformable(const std::shared_ptr<Deformab return; } - CHECK(deformableObj) << "PenaltyRigidCH::computeContactForcesDiscreteDeformable error: " + CHECK(deformableObj!=nullptr) << "PenaltyRigidCH::computeContactForcesDiscreteDeformable error: " << m_object->getName() << " is not a deformable object."; // Get current force vector diff --git a/Source/Collision/CollisionHandling/imstkPickingCH.cpp b/Source/Collision/CollisionHandling/imstkPickingCH.cpp index b8328b33d562391be71ab14d27c79969d2a394cd..3e1467725296656a786bda759481c5659d91813a 100644 --- a/Source/Collision/CollisionHandling/imstkPickingCH.cpp +++ b/Source/Collision/CollisionHandling/imstkPickingCH.cpp @@ -36,7 +36,7 @@ PickingCH::PickingCH(const CollisionHandling::Side& side, void PickingCH::processCollisionData() { - CHECK(m_object) << "PickingCH::handleCollision error: " + CHECK(m_object!=nullptr) << "PickingCH::handleCollision error: " << "no picking collision handling available the object"; this->addPickConstraints(m_object); @@ -52,7 +52,7 @@ PickingCH::addPickConstraints(std::shared_ptr<DeformableObject> deformableObj) return; } - CHECK(deformableObj) << "PenaltyRigidCH::addPickConstraints error: " + CHECK(deformableObj!=nullptr) << "PenaltyRigidCH::addPickConstraints error: " << " not a deformable object."; const auto& Uprev = deformableObj->getDisplacements(); diff --git a/Source/Collision/Testing/imstkTetraToTetraCDTest.cpp b/Source/Collision/Testing/imstkTetraToTetraCDTest.cpp index e13ebc41aad22395da76b3a853f94aa72233c3a5..d20495a6c8b20915121ba6d0059413a14ea67c9f 100644 --- a/Source/Collision/Testing/imstkTetraToTetraCDTest.cpp +++ b/Source/Collision/Testing/imstkTetraToTetraCDTest.cpp @@ -45,7 +45,7 @@ loadMesh(std::string externalDataSuffix) std::shared_ptr<TetrahedralMesh> volMesh = std::static_pointer_cast<TetrahedralMesh>(imstk::MeshIO::read(file)); - CHECK(volMesh) << "Failed to read a volumetric mesh file : " << file; + CHECK(volMesh!=nullptr) << "Failed to read a volumetric mesh file : " << file; return volMesh; } diff --git a/Source/Collision/imstkInteractionPair.cpp b/Source/Collision/imstkInteractionPair.cpp index 5026e8fd16ea9036a545f44cc21209029bb38c4b..9befeb1da4f85763710eb63e52508ac40542afc0 100644 --- a/Source/Collision/imstkInteractionPair.cpp +++ b/Source/Collision/imstkInteractionPair.cpp @@ -36,7 +36,7 @@ InteractionPair::InteractionPair(std::shared_ptr<CollidingObject> A, m_valid = false; // Check that objects exist - CHECK(A && B) << "InteractionPair error: invalid objects (nullptr)."; + CHECK(A!=nullptr && B!=nullptr) << "InteractionPair error: invalid objects (nullptr)."; // Check if objects are different /*if (A == B) @@ -48,7 +48,7 @@ InteractionPair::InteractionPair(std::shared_ptr<CollidingObject> A, // Collision Detection std::shared_ptr<CollisionDetection> CD = CollisionDetection::makeCollisionDetectionObject(CDType, A, B, m_colData); - CHECK(CD) << "InteractionPair error: can not instantiate collision detection algorithm."; + CHECK(CD!=nullptr) << "InteractionPair error: can not instantiate collision detection algorithm."; // Collision Handling A std::shared_ptr<CollisionHandling> CHA; @@ -56,7 +56,7 @@ InteractionPair::InteractionPair(std::shared_ptr<CollidingObject> A, { CHA = CollisionHandling::make_collision_handling(CHAType, CollisionHandling::Side::A, m_colData, A, B); - CHECK(CHA) << "InteractionPair error: can not instantiate collision handling for '" + CHECK(CHA!=nullptr) << "InteractionPair error: can not instantiate collision handling for '" << A->getName() << "' object."; } @@ -66,7 +66,7 @@ InteractionPair::InteractionPair(std::shared_ptr<CollidingObject> A, { CHB = CollisionHandling::make_collision_handling(CHBType, CollisionHandling::Side::B, m_colData, B, A); - CHECK(CHB) << "InteractionPair error: can not instantiate collision handling for '" + CHECK(CHB!=nullptr) << "InteractionPair error: can not instantiate collision handling for '" << B->getName() << "' object."; } @@ -87,7 +87,7 @@ InteractionPair::InteractionPair(std::shared_ptr<CollidingObject> A, m_valid = false; // Check that objects exist - CHECK(A && B) << "InteractionPair error: invalid objects (nullptr)."; + CHECK(A!=nullptr && B!=nullptr) << "InteractionPair error: invalid objects (nullptr)."; // Check if objects are different /*if (A == B) diff --git a/Source/DynamicalModels/ObjectModels/imstkFEMDeformableBodyModel.cpp b/Source/DynamicalModels/ObjectModels/imstkFEMDeformableBodyModel.cpp index e4c5e963999558ce3c1d20bbae7eb542d6cd18fd..a9b49a6e63dd7a862be501f09c3c2921052765e3 100644 --- a/Source/DynamicalModels/ObjectModels/imstkFEMDeformableBodyModel.cpp +++ b/Source/DynamicalModels/ObjectModels/imstkFEMDeformableBodyModel.cpp @@ -181,7 +181,7 @@ bool FEMDeformableBodyModel::initialize() { // prerequisite of for successfully initializing - CHECK(m_geometry && m_FEModelConfig) << "DeformableBodyModel::initialize: Physics mesh or force model configuration not set yet!"; + CHECK(m_geometry!=nullptr && m_FEModelConfig!=nullptr) << "DeformableBodyModel::initialize: Physics mesh or force model configuration not set yet!"; auto physicsMesh = std::dynamic_pointer_cast<imstk::VolumetricMesh>(this->getModelGeometry()); m_vegaPhysicsMesh = VegaMeshIO::convertVolumetricMeshToVegaMesh(physicsMesh); @@ -323,7 +323,7 @@ FEMDeformableBodyModel::initializeForceModel() bool FEMDeformableBodyModel::initializeMassMatrix() { - CHECK(m_geometry) << "DeformableBodyModel::initializeMassMatrix Force model geometry not set!"; + CHECK(m_geometry!=nullptr) << "DeformableBodyModel::initializeMassMatrix Force model geometry not set!"; vega::SparseMatrix* vegaMatrix; vega::GenerateMassMatrix::computeMassMatrix(m_vegaPhysicsMesh.get(), &vegaMatrix, true);//caveat @@ -390,14 +390,14 @@ FEMDeformableBodyModel::initializeDampingMatrix() bool FEMDeformableBodyModel::initializeTangentStiffness() { - CHECK(m_internalForceModel) + CHECK(m_internalForceModel!=nullptr) << "DeformableBodyModel::initializeTangentStiffness: Tangent stiffness cannot be initialized without force model"; vega::SparseMatrix* matrix = nullptr; m_internalForceModel->getTangentStiffnessMatrixTopology(&matrix); - CHECK(matrix) << "DeformableBodyModel::initializeTangentStiffness - Tangent stiffness matrix topology not avaliable!"; - CHECK(m_vegaMassMatrix) << "DeformableBodyModel::initializeTangentStiffness - Vega mass matrix doesn't exist!"; + CHECK(matrix!=nullptr) << "DeformableBodyModel::initializeTangentStiffness - Tangent stiffness matrix topology not avaliable!"; + CHECK(m_vegaMassMatrix!=nullptr) << "DeformableBodyModel::initializeTangentStiffness - Vega mass matrix doesn't exist!"; matrix->BuildSubMatrixIndices(*m_vegaMassMatrix.get()); @@ -775,4 +775,4 @@ FEMDeformableBodyModel::setFixedSizeTimeStepping() m_timeStepSizeType = TimeSteppingType::fixed; m_timeIntegrator->setTimestepSizeToDefault(); } -} // imstk \ No newline at end of file +} // imstk diff --git a/Source/DynamicalModels/ObjectStates/imstkSPHState.cpp b/Source/DynamicalModels/ObjectStates/imstkSPHState.cpp index 4acf9de19853cf0d1f81934cf105258e7d7ec857..4a6e18d9c6b4caa9061b3ae7e1adf2a3865ab940 100644 --- a/Source/DynamicalModels/ObjectStates/imstkSPHState.cpp +++ b/Source/DynamicalModels/ObjectStates/imstkSPHState.cpp @@ -55,7 +55,7 @@ SPHKinematicState::setState(const std::shared_ptr<SPHKinematicState>& rhs) void SPHSimulationState::initializeData() { - CHECK(m_KinematicState) << "SPH basic state has not been initialized"; + CHECK(m_KinematicState!=nullptr) << "SPH basic state has not been initialized"; size_t numParticles = m_KinematicState->getNumParticles(); diff --git a/Source/Geometry/Map/imstkIdentityMap.cpp b/Source/Geometry/Map/imstkIdentityMap.cpp index 6ff7f5bd35279285a8e8a6da8a8e2f6925852979..5c7ab8b88dd90c546d6903a809d793d6501d79f2 100644 --- a/Source/Geometry/Map/imstkIdentityMap.cpp +++ b/Source/Geometry/Map/imstkIdentityMap.cpp @@ -34,7 +34,7 @@ IdentityMap::apply() } // Check geometries - CHECK(m_master && m_slave) << "Identity map is being applied without valid geometries"; + CHECK(m_master!=nullptr && m_slave!=nullptr) << "Identity map is being applied without valid geometries"; // Set the follower mesh configuration to be same as that of master m_slave->setTranslation(m_master->getTranslation()); diff --git a/Source/Geometry/Map/imstkOneToOneMap.cpp b/Source/Geometry/Map/imstkOneToOneMap.cpp index a98554d4dbbc2726a5143a24d8af6baf7bd162e2..6cdab4e5597fa135a63e99f58edc76c948c7a009 100644 --- a/Source/Geometry/Map/imstkOneToOneMap.cpp +++ b/Source/Geometry/Map/imstkOneToOneMap.cpp @@ -31,12 +31,12 @@ namespace imstk void OneToOneMap::compute() { - CHECK(m_master && m_slave) << "OneToOneMap map is being applied without valid geometries"; + CHECK(m_master!=nullptr && m_slave!=nullptr) << "OneToOneMap map is being applied without valid geometries"; auto meshMaster = std::dynamic_pointer_cast<PointSet>(m_master); auto meshSlave = std::dynamic_pointer_cast<PointSet>(m_slave); - CHECK(meshMaster && meshSlave) << "Fail to cast from geometry to pointset"; + CHECK(meshMaster!=nullptr && meshSlave!=nullptr) << "Fail to cast from geometry to pointset"; m_oneToOneMap.clear(); ParallelUtils::SpinLock lock; @@ -176,7 +176,7 @@ OneToOneMap::apply() } // Check geometries - CHECK(m_master && m_slave) << "OneToOneMap map is being applied without valid geometries"; + CHECK(m_master!=nullptr && m_slave!=nullptr) << "OneToOneMap map is being applied without valid geometries"; // Check data CHECK(m_oneToOneMap.size() == m_oneToOneMapVector.size()) << "Internal data is corrupted"; diff --git a/Source/Geometry/Mesh/imstkTetrahedralMesh.cpp b/Source/Geometry/Mesh/imstkTetrahedralMesh.cpp index c05812d25a412bff6c6311f9ca098733a5b7ee9b..5f4b0b8e5cff313ee61ebb1ce2f20193fffd6811 100644 --- a/Source/Geometry/Mesh/imstkTetrahedralMesh.cpp +++ b/Source/Geometry/Mesh/imstkTetrahedralMesh.cpp @@ -103,7 +103,7 @@ bool TetrahedralMesh::extractSurfaceMesh(std::shared_ptr<SurfaceMesh> surfaceMesh, const bool enforceWindingConsistency /* = false*/) { - CHECK(surfaceMesh) + CHECK(surfaceMesh!=nullptr) << "TetrahedralMesh::extractSurfaceMesh error: the surface mesh provided is not instantiated."; using triArray = SurfaceMesh::TriangleArray; diff --git a/Source/Geometry/Reader/imstkAssimpMeshIO.cpp b/Source/Geometry/Reader/imstkAssimpMeshIO.cpp index bf0879c9bb53486674986ba282dad63d15435c4c..cbe059a7dda9a110c5cb4c01ba6683a0688cac11 100644 --- a/Source/Geometry/Reader/imstkAssimpMeshIO.cpp +++ b/Source/Geometry/Reader/imstkAssimpMeshIO.cpp @@ -53,7 +53,7 @@ AssimpMeshIO::readMeshData(const std::string& filePath) auto scene = importer.ReadFile(filePath, AssimpMeshIO::getDefaultPostProcessSteps()); // Check if there is actually a mesh or if the file can be read - CHECK(scene && scene->HasMeshes()) << "AssimpMeshIO::readMeshData error: could not read with reader."; + CHECK(scene!=nullptr && scene->HasMeshes()) << "AssimpMeshIO::readMeshData error: could not read with reader."; // Get first mesh auto importedMesh = scene->mMeshes[0]; diff --git a/Source/Geometry/Reader/imstkVTKMeshIO.h b/Source/Geometry/Reader/imstkVTKMeshIO.h index bdaab1f6fbb651d3457d23f44c036300fa87e6a5..82a4f5100fa010806c3c46df1e5280c63e755ef4 100644 --- a/Source/Geometry/Reader/imstkVTKMeshIO.h +++ b/Source/Geometry/Reader/imstkVTKMeshIO.h @@ -96,8 +96,8 @@ protected: /// /// \brief Writes the given volumetric mesh to given file path /// - static bool VTKMeshIO::writeVtkUnstructuredGrid(const TetrahedralMesh& tetMesh, const std::string& filePath); - static bool VTKMeshIO::writeVtkUnstructuredGrid(const HexahedralMesh& hMesh, const std::string& filePath); + static bool writeVtkUnstructuredGrid(const TetrahedralMesh& tetMesh, const std::string& filePath); + static bool writeVtkUnstructuredGrid(const HexahedralMesh& hMesh, const std::string& filePath); /// /// \brief diff --git a/Source/Geometry/Reader/imstkVegaMeshIO.cpp b/Source/Geometry/Reader/imstkVegaMeshIO.cpp index f604d9977109737c03c7c77abf6e17ce752a27ed..d1cc573eb774d201f8b9be18452e7392eb387962 100644 --- a/Source/Geometry/Reader/imstkVegaMeshIO.cpp +++ b/Source/Geometry/Reader/imstkVegaMeshIO.cpp @@ -50,7 +50,7 @@ VegaMeshIO::write(const std::shared_ptr<imstk::PointSet> imstkMesh, const std::s // extract volumetric mesh const auto imstkVolMesh = std::dynamic_pointer_cast<imstk::VolumetricMesh>(imstkMesh); - CHECK(imstkVolMesh) << "VegaMeshIO::write error: imstk::Mesh is not a volumetric mesh"; + CHECK(imstkVolMesh!=nullptr) << "VegaMeshIO::write error: imstk::Mesh is not a volumetric mesh"; switch (imstkVolMesh->getType()) { @@ -58,7 +58,7 @@ VegaMeshIO::write(const std::shared_ptr<imstk::PointSet> imstkMesh, const std::s case Geometry::Type::HexahedralMesh: auto vegaMesh = convertVolumetricMeshToVegaMesh(imstkVolMesh); - CHECK(vegaMesh) << "VegaMeshIO::write error: failed to convert volumetric mesh to vega mesh"; + CHECK(vegaMesh!=nullptr) << "VegaMeshIO::write error: failed to convert volumetric mesh to vega mesh"; const auto fileName = const_cast<char*>(filePath.c_str()); const int write_status = vegaMesh->save(fileName); @@ -180,7 +180,7 @@ VegaMeshIO::convertVolumetricMeshToVegaMesh(const std::shared_ptr<imstk::Volumet std::shared_ptr<vega::TetMesh> vegaMesh = std::make_shared<vega::TetMesh>(int(imstkVolTetMesh->getNumVertices()), &vertices[0], int(imstkVolTetMesh->getNumTetrahedra()), &elements[0], E, nu, density); - CHECK(vegaMesh) << "VegaMeshIO::convertVolumetricMeshToVegaMesh error: Failed to create vega mesh"; + CHECK(vegaMesh!=nullptr) << "VegaMeshIO::convertVolumetricMeshToVegaMesh error: Failed to create vega mesh"; return vegaMesh; } diff --git a/Source/Geometry/imstkGeometryUtilities.cpp b/Source/Geometry/imstkGeometryUtilities.cpp index af245070bf21869efd2eed26eccc031ed9bd12f9..2137405f4111990dc9d492561c7ecd200af5eb7e 100644 --- a/Source/Geometry/imstkGeometryUtilities.cpp +++ b/Source/Geometry/imstkGeometryUtilities.cpp @@ -32,6 +32,15 @@ #include <vtkTriangleFilter.h> #include <vtkUnstructuredGrid.h> +namespace std +{ +template<typename T, typename... Args> +std::unique_ptr<T> make_unique(Args&&... args) +{ + return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); +} +} + namespace imstk { std::unique_ptr<SurfaceMesh> @@ -346,4 +355,4 @@ GeometryUtils::loopSubdivideSurfaceMesh(const SurfaceMesh& surfaceMesh, const in return convertVtkPolyDataToSurfaceMesh(filter->GetOutput()); } -} \ No newline at end of file +} diff --git a/Source/Rendering/VTKRenderer/imstkVTKTextureDelegate.cpp b/Source/Rendering/VTKRenderer/imstkVTKTextureDelegate.cpp index 2a50b53b4886194b604426bd62571f29fb4b3b76..c033562c01b6fab3f2181da1036738ac4d71015f 100644 --- a/Source/Rendering/VTKRenderer/imstkVTKTextureDelegate.cpp +++ b/Source/Rendering/VTKRenderer/imstkVTKTextureDelegate.cpp @@ -65,7 +65,7 @@ VTKTextureDelegate::loadTexture(std::shared_ptr<Texture> texture) imgReader = readerFactory->CreateImageReader2(sideName.c_str()); - CHECK(imgReader) << "VTKTextureDelegate::loadTexture error: could not find reader for " + CHECK(imgReader!=nullptr) << "VTKTextureDelegate::loadTexture error: could not find reader for " << sideName; auto imageFlip = vtkSmartPointer<vtkImageFlip>::New(); @@ -81,7 +81,7 @@ VTKTextureDelegate::loadTexture(std::shared_ptr<Texture> texture) vtkImageReader2* imgReader; imgReader = readerFactory->CreateImageReader2(tFileName.c_str()); - CHECK(imgReader) << "VTKTextureDelegate::loadTexture error: could not find reader for " + CHECK(imgReader!=nullptr) << "VTKTextureDelegate::loadTexture error: could not find reader for " << tFileName; imgReader->SetFileName(tFileName.c_str()); diff --git a/Source/Scene/SceneElements/Loader/imstkVisualObjectImporter.cpp b/Source/Scene/SceneElements/Loader/imstkVisualObjectImporter.cpp index 97117a2f7da21f63bff0042f4a5faf64385d3762..fbef3a6e74aaa22b4cb05ad8d92bfafb3ddf9b08 100644 --- a/Source/Scene/SceneElements/Loader/imstkVisualObjectImporter.cpp +++ b/Source/Scene/SceneElements/Loader/imstkVisualObjectImporter.cpp @@ -53,7 +53,7 @@ VisualObjectImporter::importVisualObject( auto scene = importer.ReadFile(modelFilePath, AssimpMeshIO::getDefaultPostProcessSteps()); // Check if there is actually a mesh or if the file can be read - CHECK(scene && scene->HasMeshes()) << "AssimpMeshIO::readMeshData error: could not read with reader."; + CHECK(scene!=nullptr && scene->HasMeshes()) << "AssimpMeshIO::readMeshData error: could not read with reader."; std::vector<std::string> materialTextureCoreFileNames; std::vector<std::string> materialTextureFileExtensions; diff --git a/Source/Scene/SceneElements/Objects/imstkDeformableObject.cpp b/Source/Scene/SceneElements/Objects/imstkDeformableObject.cpp index 6c56759b85265c01a2a409a22c1b801886604803..46e685639bafbc6dc9db36f6f292439052082f67 100644 --- a/Source/Scene/SceneElements/Objects/imstkDeformableObject.cpp +++ b/Source/Scene/SceneElements/Objects/imstkDeformableObject.cpp @@ -26,7 +26,7 @@ namespace imstk Vectord& DeformableObject::getContactForce() { - CHECK(m_defModel) << "deformation model pointer not valid DeformableObject::getContactForce()"; + CHECK(m_defModel!=nullptr) << "deformation model pointer not valid DeformableObject::getContactForce()"; return m_defModel->getContactForce(); } diff --git a/Source/Scene/SceneElements/Objects/imstkPbdObject.cpp b/Source/Scene/SceneElements/Objects/imstkPbdObject.cpp index 33f7b76aea628ed195f5ee43d8004aea311250d6..e52f7669c9ed5e0c0dee6f7bd2774ffa06ccdaca 100644 --- a/Source/Scene/SceneElements/Objects/imstkPbdObject.cpp +++ b/Source/Scene/SceneElements/Objects/imstkPbdObject.cpp @@ -32,7 +32,7 @@ PbdObject::initialize() { m_pbdModel = std::dynamic_pointer_cast<PbdModel>(m_dynamicalModel); - CHECK(m_pbdModel) << "Dynamics pointer cast failure in PbdObject::initialize()"; + CHECK(m_pbdModel!=nullptr) << "Dynamics pointer cast failure in PbdObject::initialize()"; return DynamicObject::initialize(); } @@ -70,4 +70,4 @@ PbdObject::reset() DynamicObject::reset(); this->updateVelocity(); } -} //imstk \ No newline at end of file +} //imstk diff --git a/Source/SimulationManager/imstkViewer.cpp b/Source/SimulationManager/imstkViewer.cpp index 690953f737748cd900606db28ae0e9c6a3379ee0..924bff6b38875f802ce2f9c63181841464a9006d 100644 --- a/Source/SimulationManager/imstkViewer.cpp +++ b/Source/SimulationManager/imstkViewer.cpp @@ -32,7 +32,7 @@ Viewer::getActiveScene() const const std::shared_ptr<Renderer>& Viewer::getActiveRenderer() const { - CHECK(m_activeScene) << "no active scene!"; + CHECK(m_activeScene!=nullptr) << "no active scene!"; return m_rendererMap.at(m_activeScene); } diff --git a/Source/apiUtilities/imstkAPIUtilities.h b/Source/apiUtilities/imstkAPIUtilities.h index 4ff78fc8ffe8208454f9d4539ab31174dcd38c87..db6a78e3d55a9605c48baed15bbf1dad4eb79fd4 100644 --- a/Source/apiUtilities/imstkAPIUtilities.h +++ b/Source/apiUtilities/imstkAPIUtilities.h @@ -60,7 +60,7 @@ createVisualAnalyticalSceneObject(Geometry::Type type, const double scale = 1., const Vec3d t = Vec3d(0., 0., 0.)) { - CHECK(scene) << "createVisualAnalyticalSceneObject: Scene is not valid!"; + CHECK(scene!=nullptr) << "createVisualAnalyticalSceneObject: Scene is not valid!"; CHECK(!objName.empty()) << "createVisualAnalyticalSceneObject: Name is empty!"; std::shared_ptr<Geometry> geom; @@ -111,7 +111,7 @@ createCollidingAnalyticalSceneObject(Geometry::Type type, const double scale = 1., const Vec3d t = Vec3d(0., 0., 0.)) { - CHECK(scene) << "createCollidingSphereSceneObject: Scene is not valid!"; + CHECK(scene!=nullptr) << "createCollidingSphereSceneObject: Scene is not valid!"; CHECK(!objName.empty()) << "createCollidingAnalyticalSceneObject: Name is empty!"; std::shared_ptr<Geometry> geom; @@ -153,7 +153,7 @@ createAndAddVisualSceneObject(std::shared_ptr<Scene> scene, const std::string fileName, const std::string objectName) { - CHECK(scene) << "createAndAddVisualSceneObject: Scene is not valid!"; + CHECK(scene!=nullptr) << "createAndAddVisualSceneObject: Scene is not valid!"; CHECK(!fileName.empty()) << "createAndAddVisualSceneObject: Name is empty!"; auto mesh = MeshIO::read(fileName); @@ -174,7 +174,7 @@ createAndAddVisualSceneObject(std::shared_ptr<Scene> scene, std::shared_ptr<NonLinearSystem> createNonLinearSystem(std::shared_ptr<FEMDeformableBodyModel> dynaModel) { - CHECK(dynaModel) << "createNonLinearSystem: Dynamic model is not valid!"; + CHECK(dynaModel!=nullptr) << "createNonLinearSystem: Dynamic model is not valid!"; auto nlSystem = std::make_shared<NonLinearSystem>( dynaModel->getFunction(), diff --git a/patchfile.patch b/patchfile.patch new file mode 100644 index 0000000000000000000000000000000000000000..1b899fcd15e6d3a5135af1c190d337fe52dd0f59 --- /dev/null +++ b/patchfile.patch @@ -0,0 +1,453 @@ +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 +