diff --git a/Source/DataStructures/imstkLooseOctree.cpp b/Source/DataStructures/imstkLooseOctree.cpp index 7546a038a238b1c7ef1f55233d43e9bb28c54c75..9f88d95419e1ce735331a27057325ee822e1fa7a 100644 --- a/Source/DataStructures/imstkLooseOctree.cpp +++ b/Source/DataStructures/imstkLooseOctree.cpp @@ -25,6 +25,7 @@ #include "imstkPointSet.h" #include "imstkSurfaceMesh.h" #include "imstkDebugRenderGeometry.h" +#include "imstkRenderMaterial.h" namespace imstk { diff --git a/Source/DynamicalModels/ObjectModels/PbdConstraints/imstkPbdFETetConstraint.cpp b/Source/DynamicalModels/ObjectModels/PbdConstraints/imstkPbdFETetConstraint.cpp index f520e92ff3d358f45cc2ee102e7b9b3a1b10433b..73c9e7e8d47874ee40930ff83e538070cb2d1b89 100644 --- a/Source/DynamicalModels/ObjectModels/PbdConstraints/imstkPbdFETetConstraint.cpp +++ b/Source/DynamicalModels/ObjectModels/PbdConstraints/imstkPbdFETetConstraint.cpp @@ -21,6 +21,7 @@ #include "imstkPbdFETetConstraint.h" #include "imstkPbdModel.h" +#include "imstkLogUtility.h" namespace imstk { diff --git a/Source/DynamicalModels/ObjectModels/imstkAbstractDynamicalModel.cpp b/Source/DynamicalModels/ObjectModels/imstkAbstractDynamicalModel.cpp index fce352a539b0239393f34ca9a2f903c716c91369..6f1fe5464af884014f35bd31298a689916e7a122 100644 --- a/Source/DynamicalModels/ObjectModels/imstkAbstractDynamicalModel.cpp +++ b/Source/DynamicalModels/ObjectModels/imstkAbstractDynamicalModel.cpp @@ -20,6 +20,7 @@ =========================================================================*/ #include "imstkAbstractDynamicalModel.h" +#include "imstkLogUtility.h" namespace imstk { diff --git a/Source/DynamicalModels/ObjectModels/imstkFEMDeformableBodyModel.cpp b/Source/DynamicalModels/ObjectModels/imstkFEMDeformableBodyModel.cpp index 2e7423fcf0ce86c5dd3cdb635e9437786c4552ae..93ff37a71b92b21ae309abdc5bdfd6c01d13ed0c 100644 --- a/Source/DynamicalModels/ObjectModels/imstkFEMDeformableBodyModel.cpp +++ b/Source/DynamicalModels/ObjectModels/imstkFEMDeformableBodyModel.cpp @@ -29,6 +29,7 @@ #include "imstkCorotationalFEMForceModel.h" #include "imstkIsotropicHyperelasticFEMForceModel.h" #include "imstkVegaMeshIO.h" +#include "imstkVolumetricMesh.h" #include "imstkTimeIntegrator.h" #include "imstkVegaMeshIO.h" #include "imstkNewtonSolver.h" diff --git a/Source/Geometry/Analytic/imstkAnalyticalGeometry.cpp b/Source/Geometry/Analytic/imstkAnalyticalGeometry.cpp index 2c5ac36dd563c7d8ef27230eb57cd29af94171b9..76f576c7f00888248a878767d80fafae98539f51 100644 --- a/Source/Geometry/Analytic/imstkAnalyticalGeometry.cpp +++ b/Source/Geometry/Analytic/imstkAnalyticalGeometry.cpp @@ -20,6 +20,7 @@ =========================================================================*/ #include "imstkAnalyticalGeometry.h" +#include "imstkLogUtility.h" namespace imstk { diff --git a/Source/Geometry/Analytic/imstkCube.cpp b/Source/Geometry/Analytic/imstkCube.cpp index 98c8d9c5d7e790742612d81d5d0563a8a2f7a723..3dacac3a8160390d47bf625e4ad367c129f50a1c 100644 --- a/Source/Geometry/Analytic/imstkCube.cpp +++ b/Source/Geometry/Analytic/imstkCube.cpp @@ -20,6 +20,7 @@ =========================================================================*/ #include "imstkCube.h" +#include "imstkLogUtility.h" namespace imstk { diff --git a/Source/Geometry/Analytic/imstkPlane.cpp b/Source/Geometry/Analytic/imstkPlane.cpp index d298d07efb80080e55cfa213bc9d2225216e4681..db67616e6af8d4935f0c7267cfa858fb2e131490 100644 --- a/Source/Geometry/Analytic/imstkPlane.cpp +++ b/Source/Geometry/Analytic/imstkPlane.cpp @@ -20,6 +20,7 @@ =========================================================================*/ #include "imstkPlane.h" +#include "imstkLogUtility.h" namespace imstk { diff --git a/Source/Geometry/Decal/imstkDecal.cpp b/Source/Geometry/Decal/imstkDecal.cpp index 4e858b98055e0cb73b25dd8f5ec9f09a7a9e21fd..74fb2dc20394b28c32cf6781694c1ff47e21a12f 100644 --- a/Source/Geometry/Decal/imstkDecal.cpp +++ b/Source/Geometry/Decal/imstkDecal.cpp @@ -20,6 +20,8 @@ =========================================================================*/ #include "imstkDecal.h" +#include "imstkLogUtility.h" +#include "imstkMath.h" namespace imstk { diff --git a/Source/Geometry/Decal/imstkDecal.h b/Source/Geometry/Decal/imstkDecal.h index 961f16ed25efffa1042ef7aa2166898091006951..e8c50d5cbb2b60666a69fc79309ddf0138d5bb3b 100644 --- a/Source/Geometry/Decal/imstkDecal.h +++ b/Source/Geometry/Decal/imstkDecal.h @@ -20,6 +20,7 @@ =========================================================================*/ #pragma once +#include "imstkAnalyticalGeometry.h" #pragma warning( push ) #pragma warning( disable : 4201 ) @@ -28,9 +29,6 @@ #include "glm/gtc/quaternion.hpp" #pragma warning( pop ) -#include "imstkMath.h" -#include "imstkAnalyticalGeometry.h" - namespace imstk { class Decal : public AnalyticalGeometry diff --git a/Source/Geometry/Map/imstkGeometryMap.cpp b/Source/Geometry/Map/imstkGeometryMap.cpp index 62391eaea82b6023eb965a12dd0b738d6e297fb7..ba8ed2433a61dad4a9b408e8fa2d3a3fe85f72c7 100644 --- a/Source/Geometry/Map/imstkGeometryMap.cpp +++ b/Source/Geometry/Map/imstkGeometryMap.cpp @@ -20,6 +20,7 @@ =========================================================================*/ #include "imstkGeometryMap.h" +#include "imstkLogUtility.h" namespace imstk { diff --git a/Source/Geometry/Map/imstkGeometryMap.h b/Source/Geometry/Map/imstkGeometryMap.h index 6ebc4e7d6c95167ee6dd36c580cb9448de7eecb4..522bf556a0b21e12db868d2a5b1305a3a3a16cbd 100644 --- a/Source/Geometry/Map/imstkGeometryMap.h +++ b/Source/Geometry/Map/imstkGeometryMap.h @@ -21,11 +21,8 @@ #pragma once -#include <memory> -#include <iostream> - #include "imstkGeometry.h" -#include "g3log/g3log.hpp" +#include "imstkLogUtility.h" namespace imstk { diff --git a/Source/Geometry/Map/imstkIdentityMap.cpp b/Source/Geometry/Map/imstkIdentityMap.cpp index 402f974877a1d52c1278853ae1b070c0f6949207..568aebe596c5ca4268a6a02c9772774d6cd052a3 100644 --- a/Source/Geometry/Map/imstkIdentityMap.cpp +++ b/Source/Geometry/Map/imstkIdentityMap.cpp @@ -20,6 +20,7 @@ =========================================================================*/ #include "imstkIdentityMap.h" +#include "imstkLogUtility.h" namespace imstk { diff --git a/Source/Geometry/Map/imstkIsometricMap.cpp b/Source/Geometry/Map/imstkIsometricMap.cpp index 435a1bfc2566bfba35555082a0868e027cf77b0a..43792ee5edde00ba52bb962b1cd4f50b48162419 100644 --- a/Source/Geometry/Map/imstkIsometricMap.cpp +++ b/Source/Geometry/Map/imstkIsometricMap.cpp @@ -20,6 +20,7 @@ =========================================================================*/ #include "imstkIsometricMap.h" +#include "imstkLogUtility.h" namespace imstk { diff --git a/Source/Geometry/Map/imstkOneToOneMap.cpp b/Source/Geometry/Map/imstkOneToOneMap.cpp index 3e43bd6129b2833c066dcfe927b904550ff2c6be..b8233310da4c9cd117ea83aefef7f11de1496f1b 100644 --- a/Source/Geometry/Map/imstkOneToOneMap.cpp +++ b/Source/Geometry/Map/imstkOneToOneMap.cpp @@ -21,6 +21,8 @@ #include "imstkOneToOneMap.h" #include "imstkParallelUtils.h" +#include "imstkLogUtility.h" +#include "imstkPointSet.h" #undef min #undef max diff --git a/Source/Geometry/Map/imstkOneToOneMap.h b/Source/Geometry/Map/imstkOneToOneMap.h index cf316070ed45d3f6486efcbca7e376eb76870f7c..c79d0df63fd89f56b48f4744a75f6e974018b170 100644 --- a/Source/Geometry/Map/imstkOneToOneMap.h +++ b/Source/Geometry/Map/imstkOneToOneMap.h @@ -25,11 +25,11 @@ // imstk #include "imstkGeometryMap.h" -#include "imstkTetrahedralMesh.h" -#include "imstkSurfaceMesh.h" namespace imstk { +class PointSet; + /// /// \class OneToOneMap /// diff --git a/Source/Geometry/Map/imstkTetraTriangleMap.cpp b/Source/Geometry/Map/imstkTetraTriangleMap.cpp index 84122c1f223700fe56f9bd728c2b8882ad94b506..f408181a98d3e79a51d332583b7acb9d5864789b 100644 --- a/Source/Geometry/Map/imstkTetraTriangleMap.cpp +++ b/Source/Geometry/Map/imstkTetraTriangleMap.cpp @@ -20,7 +20,9 @@ =========================================================================*/ #include "imstkTetraTriangleMap.h" +#include "imstkSurfaceMesh.h" #include "imstkParallelUtils.h" +#include "imstkLogUtility.h" namespace imstk { diff --git a/Source/Geometry/Map/imstkTetraTriangleMap.h b/Source/Geometry/Map/imstkTetraTriangleMap.h index 668526a6f9dce5220ab3a5548615cd72aa11c843..8a75db015172c551e10cc6739d127e8370f86a28 100644 --- a/Source/Geometry/Map/imstkTetraTriangleMap.h +++ b/Source/Geometry/Map/imstkTetraTriangleMap.h @@ -25,7 +25,6 @@ // imstk #include "imstkGeometryMap.h" -#include "imstkSurfaceMesh.h" #include "imstkTetrahedralMesh.h" namespace imstk diff --git a/Source/Geometry/Mesh/imstkHexahedralMesh.cpp b/Source/Geometry/Mesh/imstkHexahedralMesh.cpp index 5e0fc192da41d7af63eac20ffdb4aaf7fc1e5c5c..c2202058daec1ea2c51f44ed3147e05edd19a625 100644 --- a/Source/Geometry/Mesh/imstkHexahedralMesh.cpp +++ b/Source/Geometry/Mesh/imstkHexahedralMesh.cpp @@ -20,6 +20,7 @@ =========================================================================*/ #include "imstkHexahedralMesh.h" +#include "imstkLogUtility.h" namespace imstk { diff --git a/Source/Geometry/Mesh/imstkHexahedralMesh.h b/Source/Geometry/Mesh/imstkHexahedralMesh.h index b85cd83c39316d4a8e2f43e1d31ca9ef4f6e4bfe..c8f7fd0cfbc84b5d3c247a73abf0a385f091ac80 100644 --- a/Source/Geometry/Mesh/imstkHexahedralMesh.h +++ b/Source/Geometry/Mesh/imstkHexahedralMesh.h @@ -21,8 +21,6 @@ #pragma once -#include <set> - #include "imstkVolumetricMesh.h" namespace imstk diff --git a/Source/Geometry/Mesh/imstkImageData.cpp b/Source/Geometry/Mesh/imstkImageData.cpp index 2132f8a628640e5748f230fcab29bb7a3382bcaf..9e286d43266ac385bedcd5b5a108036c693cb832 100644 --- a/Source/Geometry/Mesh/imstkImageData.cpp +++ b/Source/Geometry/Mesh/imstkImageData.cpp @@ -24,6 +24,7 @@ // vtk #include "vtkImageReslice.h" #include "vtkTransform.h" +#include <vtkImageData.h> namespace imstk { diff --git a/Source/Geometry/Mesh/imstkImageData.h b/Source/Geometry/Mesh/imstkImageData.h index ad0e6c441030ebf5ea3fa0d11956fe663b3ad290..04eba181f616794eeafeb042fb1aba7b5ca83bc2 100644 --- a/Source/Geometry/Mesh/imstkImageData.h +++ b/Source/Geometry/Mesh/imstkImageData.h @@ -25,11 +25,12 @@ #include "imstkPointSet.h" // vtk -#include <vtkImageData.h> #include <vtkSmartPointer.h> // forward declarations class vtkTransform; +class vtkImageData; +class vtkTransform; namespace imstk { diff --git a/Source/Geometry/Mesh/imstkLineMesh.cpp b/Source/Geometry/Mesh/imstkLineMesh.cpp index af7614bb5118ba80ca87771fab1349e9b823539a..d0522f98c625b9c2c484545ad127616426400d31 100644 --- a/Source/Geometry/Mesh/imstkLineMesh.cpp +++ b/Source/Geometry/Mesh/imstkLineMesh.cpp @@ -20,8 +20,7 @@ =========================================================================*/ #include "imstkLineMesh.h" - -#include "g3log/g3log.hpp" +#include "imstkLogUtility.h" namespace imstk { diff --git a/Source/Geometry/Mesh/imstkMeshAdjacency.cpp b/Source/Geometry/Mesh/imstkMeshAdjacency.cpp deleted file mode 100644 index f32a603c9be351bc8b7d006d15561df332308e53..0000000000000000000000000000000000000000 --- a/Source/Geometry/Mesh/imstkMeshAdjacency.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/*========================================================================= - - Library: iMSTK - - Copyright (c) Kitware, Inc. & Center for Modeling, Simulation, - & Imaging in Medicine, Rensselaer Polytechnic Institute. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0.txt - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -=========================================================================*/ - -#if 0 -#include "imstkMeshAdjacency.h" - -#include <cassert> -#include <cstddef> -#include <numeric> - -namespace imstk -{ -template<typename Element> -void -MeshAdjacency<Element>::m_buildVertexToElem(void) -{ - constexpr size_t numVertPerElem = Element::numVertices; - - // if the total number of vertices is unknown, loop over all elements to find the largest vertex - // index - if (m_numVertices == 0) - { - for (auto& vertices : m_elemToVert) - { - for (auto vid : vertices) - { - m_numVertices = std::max(m_numVertices, vid); - } - } - } - - // find the number of adjacent elements for each vertex - m_vertToElem_ptr.resize(m_numVertices + 1, 0); - - for (auto& vertices : m_elemToVert) - { - for (auto vid : vertices) - { - m_vertToElem_ptr[vid + 1] += 1; - } - } - - // accumulate pointer - for (size_t i = 0; i < m_numVertices; ++i) - { - m_vertToElem_ptr[i + 1] += m_vertToElem[i]; - } - - // track the number - auto cnt = m_vertToElem_ptr; - - size_t totNum = std::accumulate(m_vertToElem_ptr.begin(), m_vertToElem_ptr.end(), 0); - - // start to specify element adjacency of vertices - m_vertToElem.resize(totNum); - - for (size_t eid = 0; eid < m_elemToVert.size(); eid++) - { - for (auto vid : m_elemToVert[eid]) - { - m_vertToElem[cnt[vid]] = eid; - ++cnt[vid]; - } - } - - // TODO: in debug mood, verify cnt[i] = make_exception_ptr[i+1] - return; -} - -template<typename Element> -void -MeshAdjacency<Element>::m_buildInterFace(void) -{ - constexpr int numElemFaces = Element::numFaces; - const size_t numElems = m_elemToVert.size(); - auto faceVertices = Element::faceVertices; - - std::vector<size_t> vertices; - std::vector<size_t> vertices_c; - - std::vector<std::array<bool, numElemFaces>> foundNbr(numElems); - bool found; - size_t ptr0, ptr1; - - auto isSameFace = [](const std::vector<size_t>& vert0, const std::vector<size_t>& vert1) - { - // the same orientation - if (vert0[0] == vert1[0] && vert0[1] == vert1[1] && vert0[2] == vert1[2]) - { - return true; - } - if (vert0[0] == vert1[1] && vert0[1] == vert1[2] && vert0[2] == vert1[0]) - { - return true; - } - if (vert0[0] == vert1[2] && vert0[1] == vert1[0] && vert0[2] == vert1[1]) - { - return true; - } - - // opposite orientation - if (vert0[0] == vert1[0] && vert0[1] == vert1[1] && vert0[2] == vert1[2]) - { - return true; - } - if (vert0[0] == vert1[1] && vert0[1] == vert1[2] && vert0[2] == vert1[0]) - { - return true; - } - if (vert0[0] == vert1[2] && vert0[1] == vert1[0] && vert0[2] == vert1[1]) - { - return true; - } - return false; - } - - for (size_t eid = 0; eid < numElems; ++eid) - { - for (int fid = 0; fid > numElemFaces; ++fid) - { - if (foundNbr[eid][fid]) - { - continue; - } - - m_getFaceVertices(eid, fid, vertices); - - ptr0 = m_vertToElem_ptr[m_elemToVert[eid][faceVertices[0]]]; - ptr1 = m_vertToElem_ptr[m_elemToVert[eid][faceVertices[0]] + 1]; - - found = false; - - // loop over candidacies, ie, the elements sharing 1st vertex of this face - for (size_t ptr = ptr0; ptr < ptr1; ++ptr) - { - size_t eid_c = m_vertToElem[ptr]; - // only do one-way search - if (eid_c <= eid) - { - continue; - } - - for (int fid_c = 0; fid_c < numElemFaces; ++fid_c) - { - m_getFaceVertices(eid_c, fid_c, vertices_c); - } - } - } - } -} - -template<typename Element> -void -MeshAdjacency<Element>::m_getFaceVertices(const size_t eid, const int fid, - std::vector<size_t>& faceVertices) const -{ - auto& faceVertices_local = Element::faceVertices[fid]; - const int numFaceVertices = Element::faceVertices[fid].size(); - faceVertices.resize(numFaceVertices); - - for (int i = 0; i < numFaceVertices; ++i) - { - faceVertices[i] = m_elemToVert[eid][faceVertices_local[i]]; - } - return; -} -} // namespace imstk -#endif diff --git a/Source/Geometry/Mesh/imstkMeshAdjacency.h b/Source/Geometry/Mesh/imstkMeshAdjacency.h deleted file mode 100644 index b7980c8917978767594741d80c5d67cad90441df..0000000000000000000000000000000000000000 --- a/Source/Geometry/Mesh/imstkMeshAdjacency.h +++ /dev/null @@ -1,108 +0,0 @@ -/*========================================================================= - - Library: iMSTK - - Copyright (c) Kitware, Inc. & Center for Modeling, Simulation, - & Imaging in Medicine, Rensselaer Polytechnic Institute. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0.txt - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -=========================================================================*/ - -#if 0 -#include <array> -#include <memory> -#include <vector> - -namespace imstk -{ -struct InterFace -{ - size_t elemLeft; ///< left element - size_t elemRight; - size_t faceLeft; ///< face number in left element - size_t faceRight; -}; - -struct Tetrahedron -{ - static constexpr int numVertices = 4; - static constexpr int numFaces = 4; - static constexpr std::array<int, numFaces> numFaceVertices = { 3, 3, 3, 3 }; - // constexpr std::vector will be available in C++20 - static std::array<std::vector<int>, 4> faceVertices; -}; - -std::array<std::vector<int>, 4> Tetrahedron::faceVertices = { std::vector<int>{ 0, 2, 1 }, - { 0, 1, 3 }, - { 0, 3, 2 }, - { 1, 2, 3 } }; - -struct Hexhedron -{ - static constexpr int numVertices = 8; - static constexpr int numFaces = 6; - static constexpr std::array<int, numFaces> numFaceVertices = { 4, 4, 4, 4, 4, 4 }; - static std::array<std::vector<int>, numFaces> faceVertices; -}; - -std::array<std::vector<int>, 6> Hexhedron::faceVertices = { std::vector<int>{ 0, 2, 3, 1 }, - { 4, 7, 6, 5 }, - { 0, 4, 7, 3 }, - { 1, 2, 6, 5 }, - { 0, 1, 5, 4 }, - { 2, 3, 7, 6 } }; - -/// -/// \class MeshAdjacency -/// -/// \brief Adjacency of a mesh -/// -template<typename Element> -class MeshAdjacency -{ -public: - using ElemIndices = std::array<size_t, Element::numVertices>; - MeshAdjacency(const std::vector<ElemIndices>& elemToVert, const size_t numVertices = 0) - : m_numVertices(numVertices), m_elemToVert(elemToVert) - { - } - - ~MeshAdjacency() = default; - MeshAdjacency& operator=(const MeshAdjacency&) = delete; - -private: - /// - /// \brief Find adjacent elements for each vertex - /// - void m_buildVertexToElem(); - /// - /// \brief Find the adjacent faces for each element - /// - void m_buildInterFace(); - - /// \brief Given an element index and a face, get the indices of face vertex in the mesh - /// \param eid element index - /// \param fid index of the face in an element - void m_getFaceVertices(const size_t eid, const int fid, - std::vector<size_t>& faceVertices) const; - -private: - size_t m_numVertices; - const std::vector<ElemIndices>& m_elemToVert; - std::vector<size_t> m_vertToElem; - std::vector<size_t> m_vertToElem_ptr; - std::vector<InterFace> interfaces; -}; -} // namespace imstk -#endif diff --git a/Source/Geometry/Mesh/imstkPointSet.cpp b/Source/Geometry/Mesh/imstkPointSet.cpp index c97e326d5038e6f7f4c73d6bc847e5e385d5f305..b2602a1f697c46dcfd0c9d118711aeade3adfaac 100644 --- a/Source/Geometry/Mesh/imstkPointSet.cpp +++ b/Source/Geometry/Mesh/imstkPointSet.cpp @@ -20,8 +20,8 @@ =========================================================================*/ #include "imstkPointSet.h" -//#include "imstkGraph.h" #include "imstkParallelUtils.h" +#include "imstkLogUtility.h" namespace imstk { diff --git a/Source/Geometry/Mesh/imstkTetrahedralMesh.cpp b/Source/Geometry/Mesh/imstkTetrahedralMesh.cpp index b56a38bef3be8948367d19a813aee4adf08923b4..eb57eb9d6d2194d4a42223b4847a7c519cc20eaf 100644 --- a/Source/Geometry/Mesh/imstkTetrahedralMesh.cpp +++ b/Source/Geometry/Mesh/imstkTetrahedralMesh.cpp @@ -20,9 +20,9 @@ =========================================================================*/ #include "imstkTetrahedralMesh.h" -#include "imstkPointSet.h" #include "imstkSurfaceMesh.h" -//#include "imstkGraph.h" +#include "imstkSurfaceMesh.h" +#include "imstkLogUtility.h" namespace imstk { diff --git a/Source/Geometry/Mesh/imstkTetrahedralMesh.h b/Source/Geometry/Mesh/imstkTetrahedralMesh.h index de3c7f28541cdf09f7554490705b23904fb3eedf..b4881a889acec38508f97390f464c720611e6ebd 100644 --- a/Source/Geometry/Mesh/imstkTetrahedralMesh.h +++ b/Source/Geometry/Mesh/imstkTetrahedralMesh.h @@ -21,17 +21,13 @@ #pragma once -#include <set> -#include <list> -#include <iostream> - // imstk -#include "imstkPointSet.h" -#include "imstkSurfaceMesh.h" #include "imstkVolumetricMesh.h" namespace imstk { +class SurfaceMesh; + /// /// \class TetrahedralMesh /// diff --git a/Source/Geometry/Mesh/imstkVolumetricMesh.cpp b/Source/Geometry/Mesh/imstkVolumetricMesh.cpp index 64b0cdb17304cd8112030a670bff8d1870adabcf..ce3cab27633848a22388af1e9233e16e71ff3a64 100644 --- a/Source/Geometry/Mesh/imstkVolumetricMesh.cpp +++ b/Source/Geometry/Mesh/imstkVolumetricMesh.cpp @@ -20,8 +20,7 @@ =========================================================================*/ #include "imstkVolumetricMesh.h" - -#include "g3log/g3log.hpp" +#include "imstkLogUtility.h" namespace imstk { diff --git a/Source/Geometry/Mesh/imstkVolumetricMesh.h b/Source/Geometry/Mesh/imstkVolumetricMesh.h index dacee1fa664b0a8e3968c09a71e42056dd71a2dc..6691b0fcf5896430bd46e79b45d04ec58f439bde 100644 --- a/Source/Geometry/Mesh/imstkVolumetricMesh.h +++ b/Source/Geometry/Mesh/imstkVolumetricMesh.h @@ -34,6 +34,7 @@ namespace imstk { + /// /// \class VolumetricMesh /// diff --git a/Source/Geometry/Particles/imstkRenderParticles.cpp b/Source/Geometry/Particles/imstkRenderParticles.cpp index 644c18012205fd4a82b0366b8b69e4ac100c64bb..94943afe5f3006b33172e760b728c823a0c8e6b9 100644 --- a/Source/Geometry/Particles/imstkRenderParticles.cpp +++ b/Source/Geometry/Particles/imstkRenderParticles.cpp @@ -20,6 +20,7 @@ =========================================================================*/ #include "imstkRenderParticles.h" +#include "imstkTimer.h" namespace imstk { diff --git a/Source/Geometry/Particles/imstkRenderParticles.h b/Source/Geometry/Particles/imstkRenderParticles.h index d86522e82cc8a52c95ffaaeccea32d1e8017308f..42ce56ab921c0280221453918c5b09e888de04b5 100644 --- a/Source/Geometry/Particles/imstkRenderParticles.h +++ b/Source/Geometry/Particles/imstkRenderParticles.h @@ -21,10 +21,6 @@ #pragma once -#include <vector> -#include <climits> -#include <memory> - #pragma warning( push ) #pragma warning( disable : 4201 ) #include "glm/glm.hpp" @@ -32,11 +28,12 @@ #include "imstkGeometry.h" #include "imstkMath.h" +#include "imstkLogUtility.h" #include "imstkColor.h" -#include "imstkTimer.h" namespace imstk { + /// /// \struct RenderParticle /// diff --git a/Source/Geometry/Reader/imstkAssimpMeshIO.cpp b/Source/Geometry/Reader/imstkAssimpMeshIO.cpp index a83735c9e8c22ba1ce9aad6c195deeaf1d72a4a0..a494b3b2e472a8a63fd6b9491da8bf8cf8f1e612 100644 --- a/Source/Geometry/Reader/imstkAssimpMeshIO.cpp +++ b/Source/Geometry/Reader/imstkAssimpMeshIO.cpp @@ -20,8 +20,13 @@ =========================================================================*/ #include "imstkAssimpMeshIO.h" +#include "imstkLogUtility.h" -#include "g3log/g3log.hpp" +// assimp +#include "assimp/Importer.hpp" +#include "assimp/mesh.h" +#include "assimp/scene.h" +#include "assimp/postprocess.h" namespace imstk { diff --git a/Source/Geometry/Reader/imstkAssimpMeshIO.h b/Source/Geometry/Reader/imstkAssimpMeshIO.h index 6a80e9e2986d55b5902c2008145683c1c725f5ae..c921416be9fc5dd54a77c72ef5bcb1417d9cde27 100644 --- a/Source/Geometry/Reader/imstkAssimpMeshIO.h +++ b/Source/Geometry/Reader/imstkAssimpMeshIO.h @@ -24,10 +24,7 @@ #include "imstkSurfaceMesh.h" #include "imstkMeshIO.h" -#include "assimp/Importer.hpp" -#include "assimp/mesh.h" -#include "assimp/scene.h" -#include "assimp/postprocess.h" +struct aiMesh; namespace imstk { diff --git a/Source/Geometry/Reader/imstkMSHMeshIO.cpp b/Source/Geometry/Reader/imstkMSHMeshIO.cpp index 87941fe7c0de5d53ee7c406d55e7ab907184afde..6078f0b019b754fe172f9cdc5aed1578a4e9180f 100644 --- a/Source/Geometry/Reader/imstkMSHMeshIO.cpp +++ b/Source/Geometry/Reader/imstkMSHMeshIO.cpp @@ -26,6 +26,7 @@ #include "imstkMSHMeshIO.h" #include "imstkTetrahedralMesh.h" #include "imstkHexahedralMesh.h" +#include "imstkVolumetricMesh.h" #include "tetMesh.h" diff --git a/Source/Geometry/Reader/imstkMSHMeshIO.h b/Source/Geometry/Reader/imstkMSHMeshIO.h index 4da4d1a8890c6e7938f7663f34f0667bc40e79dc..d74e4320fa536811f8d7a91e823725d0346b1f31 100644 --- a/Source/Geometry/Reader/imstkMSHMeshIO.h +++ b/Source/Geometry/Reader/imstkMSHMeshIO.h @@ -21,15 +21,13 @@ #pragma once -#include <memory> -#include <vector> -#include <array> - #include "imstkMeshIO.h" -#include "imstkVolumetricMesh.h" namespace imstk { +class VolumetricMesh; +class SurfaceMesh; + /// /// \class MSHMeshIO /// @@ -52,7 +50,7 @@ public: /// /// \brief Read and generate a volumetric mesh given a external msh file /// - static std::shared_ptr<imstk::VolumetricMesh> read(const std::string& filePath, const MeshFileType meshType); + static std::shared_ptr<VolumetricMesh> read(const std::string& filePath, const MeshFileType meshType); protected: /// diff --git a/Source/Geometry/Reader/imstkMeshIO.cpp b/Source/Geometry/Reader/imstkMeshIO.cpp index 0f80d3f403cb81d77dc03a8e46a12227173cb977..ba5cd2df2d67cb81d598654fc7ed1d16d9394a39 100644 --- a/Source/Geometry/Reader/imstkMeshIO.cpp +++ b/Source/Geometry/Reader/imstkMeshIO.cpp @@ -27,6 +27,11 @@ #include "imstkVegaMeshIO.h" #include "imstkMSHMeshIO.h" +#include "imstkSurfaceMesh.h" +#include "imstkLineMesh.h" +#include "imstkTetrahedralMesh.h" +#include "imstkHexahedralMesh.h" + #include "g3log/g3log.hpp" namespace imstk diff --git a/Source/Geometry/Reader/imstkMeshIO.h b/Source/Geometry/Reader/imstkMeshIO.h index bf177d80b22f4d4a06128d22cb5be527b65a5285..7269d1f72f57f4356703074246d27e263932a95c 100644 --- a/Source/Geometry/Reader/imstkMeshIO.h +++ b/Source/Geometry/Reader/imstkMeshIO.h @@ -21,11 +21,6 @@ #pragma once -// std library -#include <memory> -#include <vector> -#include <array> - // imstk #include "imstkPointSet.h" diff --git a/Source/Geometry/Reader/imstkVTKMeshIO.cpp b/Source/Geometry/Reader/imstkVTKMeshIO.cpp index 99994fde02fd94e46fd9a19deaa60e11e69c197d..452b2b9d8258c059988a95dc80aefc853715ea60 100644 --- a/Source/Geometry/Reader/imstkVTKMeshIO.cpp +++ b/Source/Geometry/Reader/imstkVTKMeshIO.cpp @@ -39,6 +39,11 @@ #include "vtkDICOMImageReader.h" #include "vtkNrrdReader.h" +#include "imstkSurfaceMesh.h" +#include "imstkLineMesh.h" +#include "imstkTetrahedralMesh.h" +#include "imstkHexahedralMesh.h" + #include "g3log/g3log.hpp" namespace imstk diff --git a/Source/Geometry/Reader/imstkVTKMeshIO.h b/Source/Geometry/Reader/imstkVTKMeshIO.h index 82a4f5100fa010806c3c46df1e5280c63e755ef4..f097583eca66e12e36eef2877dc176b224f8614a 100644 --- a/Source/Geometry/Reader/imstkVTKMeshIO.h +++ b/Source/Geometry/Reader/imstkVTKMeshIO.h @@ -30,14 +30,15 @@ #include "vtkPointData.h" #include "imstkMeshIO.h" -#include "imstkSurfaceMesh.h" -#include "imstkLineMesh.h" -#include "imstkTetrahedralMesh.h" -#include "imstkHexahedralMesh.h" #include "imstkImageData.h" namespace imstk { + class SurfaceMesh; + class LineMesh; + class TetrahedralMesh; + class HexahedralMesh; + class VolumetricMesh; /// /// \class VTKMeshIO /// diff --git a/Source/Geometry/Reader/imstkVegaMeshIO.cpp b/Source/Geometry/Reader/imstkVegaMeshIO.cpp index c5e1d92f7d735ce943489793913ade2c329bc424..0fce49ed910f1259f2ec197a4f1a51dda8bbc42b 100644 --- a/Source/Geometry/Reader/imstkVegaMeshIO.cpp +++ b/Source/Geometry/Reader/imstkVegaMeshIO.cpp @@ -23,9 +23,14 @@ #include "imstkMeshIO.h" #include "imstkTetrahedralMesh.h" #include "imstkHexahedralMesh.h" +#include "imstkVolumetricMesh.h" #include "g3log/g3log.hpp" +// Vega +#include "volumetricMeshLoader.h" +#include "volumetricMesh.h" + #include "tetMesh.h" namespace imstk diff --git a/Source/Geometry/Reader/imstkVegaMeshIO.h b/Source/Geometry/Reader/imstkVegaMeshIO.h index c35044e6ac0de4ac66e7b952c1bb10207d7ea2d8..8e53f8d8c2e2ee2830fe83f55f14c1ce4e422605 100644 --- a/Source/Geometry/Reader/imstkVegaMeshIO.h +++ b/Source/Geometry/Reader/imstkVegaMeshIO.h @@ -21,17 +21,17 @@ #pragma once -#include <memory> - #include "imstkMeshIO.h" -#include "imstkVolumetricMesh.h" -// Vega -#include "volumetricMeshLoader.h" -#include "volumetricMesh.h" +namespace vega +{ +class VolumetricMesh; +} namespace imstk { +class VolumetricMesh; + /// /// \class VegaMeshIO /// diff --git a/Source/Geometry/imstkDebugRenderGeometry.cpp b/Source/Geometry/imstkDebugRenderGeometry.cpp index ecc302b0689b4317000ea4a16b341d41214f712e..b5b6e399c970d39915999830509a4fc584d203c9 100644 --- a/Source/Geometry/imstkDebugRenderGeometry.cpp +++ b/Source/Geometry/imstkDebugRenderGeometry.cpp @@ -20,6 +20,7 @@ =========================================================================*/ #include "imstkDebugRenderGeometry.h" +#include "imstkRenderMaterial.h" namespace imstk { diff --git a/Source/Geometry/imstkDebugRenderGeometry.h b/Source/Geometry/imstkDebugRenderGeometry.h index 9a4c2943f39afbfa996b85c4967a6cbd6ce27be8..6ef0a35515ae2e52755fae1750621ffc13a92206 100644 --- a/Source/Geometry/imstkDebugRenderGeometry.h +++ b/Source/Geometry/imstkDebugRenderGeometry.h @@ -22,11 +22,11 @@ #pragma once #include "imstkMath.h" -#include "imstkRenderMaterial.h" -#include <memory> namespace imstk { +class RenderMaterial; + /// /// \class imstkDbgRenderGeometry /// diff --git a/Source/Geometry/imstkGeometry.h b/Source/Geometry/imstkGeometry.h index 9fa317e9b7445b8cd23c257ebf34862772a73061..f3a270f3c69f6f33ad99b7fb39c1226cd33b73d9 100644 --- a/Source/Geometry/imstkGeometry.h +++ b/Source/Geometry/imstkGeometry.h @@ -21,13 +21,9 @@ #pragma once -#include "g3log/g3log.hpp" - #include "imstkMath.h" #include "imstkParallelUtils.h" -#include <string> - namespace imstk { /// diff --git a/Source/Geometry/imstkGeometryUtilities.h b/Source/Geometry/imstkGeometryUtilities.h index 717577c33fddcf9a37f792712ab03b89d8280136..3142962324eb4a059ad1750846864be6128b65cc 100644 --- a/Source/Geometry/imstkGeometryUtilities.h +++ b/Source/Geometry/imstkGeometryUtilities.h @@ -21,11 +21,12 @@ #pragma once -#include "g3log/g3log.hpp" +#include "imstkLogUtility.h" #include "imstkMath.h" -#include <vtkSmartPointer.h> #include "imstkParallelUtils.h" +#include <vtkSmartPointer.h> + #include <memory> #include <numeric> #include <queue> diff --git a/Source/Rendering/VTKRenderer/RenderDelegate/imstkVTKImageDataRenderDelegate.cpp b/Source/Rendering/VTKRenderer/RenderDelegate/imstkVTKImageDataRenderDelegate.cpp index 5128c40f04b9bb2a2cb772b6d22d03b42bf7e495..58f8877a0a94d92eddfb28117d4709ca82e4db7c 100644 --- a/Source/Rendering/VTKRenderer/RenderDelegate/imstkVTKImageDataRenderDelegate.cpp +++ b/Source/Rendering/VTKRenderer/RenderDelegate/imstkVTKImageDataRenderDelegate.cpp @@ -26,6 +26,7 @@ #include "vtkColorTransferFunction.h" #include "vtkPiecewiseFunction.h" #include "vtkGPUVolumeRayCastMapper.h" +#include "vtkImageData.h" namespace imstk {