9 #include "imstkMacros.h" 10 #include "imstkVolumetricMesh.h" 11 #include "imstkVecDataArray.h" 31 static std::string StrainParameterName;
56 m_removedMeshElems.reserve(getNumTetrahedra());
57 m_removedMeshElems.push_back(tetId);
60 const std::vector<int>& getRemovedTetrahedra()
const {
return m_removedMeshElems; }
68 int getNumTetrahedra()
const {
return getNumCells(); }
70 std::shared_ptr<VecDataArray<int, 4>> getTetrahedraIndices()
const {
return getCells(); }
76 std::unique_ptr<TetrahedralMesh>
clone()
78 return std::unique_ptr<TetrahedralMesh>(cloneImplementation());
94 std::vector<int> m_removedMeshElems;
std::unique_ptr< TetrahedralMesh > clone()
Polymorphic clone, hides the declaration in superclass return own type.
std::shared_ptr< SurfaceMesh > extractSurfaceMesh() override
This method extracts the conforming triangular mesh from the tetrahedral mesh.
int getNumCells() const override
Returns the number of cells.
Represents a set of tetrahedrons & vertices via an array of Vec3d double vertices & Vec4i integer ind...
void setCells(std::shared_ptr< VecDataArray< int, N >> indices)
Get/Set cell connectivity.
std::shared_ptr< VecDataArray< double, 3 > > getStrainParameters()
Get/Set the strain parameters for the tetrahedral mesh the strain parameters are expected to be a Vec...
void computeTetrahedronBoundingBox(const size_t &tetId, Vec3d &min, Vec3d &max) const
Compute the bounding box of a given tetrahedron.
Vec4d computeBarycentricWeights(const int tetId, const Vec3d &pos) const override
compute the barycentric weights of a given point in 3D space for a given the tetrahedra ...
double getVolume() override
Compute and return the volume of the tetrahedral mesh.
void setTetrahedraAsRemoved(const unsigned int tetId)
Get/set method for removed elements from the mesh.
Base class for all volume mesh types.