9 #include "imstkCellMesh.h" 26 std::shared_ptr<VecDataArray<int, 2>> getLinesIndices()
const {
return getCells(); }
31 std::unique_ptr<LineMesh>
clone()
36 return std::unique_ptr<LineMesh>(cloneImplementation());
40 LineMesh* cloneImplementation()
const 45 geom->m_indices = std::make_shared<VecDataArray<int, 2>>(*m_indices);
46 for (
auto i : m_cellAttributes)
48 geom->m_cellAttributes[i.first] = i.second->clone();
50 geom->m_initialVertexPositions = std::make_shared<VecDataArray<double, 3>>(*m_initialVertexPositions);
51 geom->m_vertexPositions = std::make_shared<VecDataArray<double, 3>>(*m_vertexPositions);
52 for (
auto i : m_vertexAttributes)
54 geom->m_vertexAttributes[i.first] = i.second->clone();
std::unique_ptr< LineMesh > clone()
Polymorphic clone, hides the declaration in superclass return own type.
int getNumCells() const override
Returns the number of cells.
void setCells(std::shared_ptr< VecDataArray< int, N >> indices)
Get/Set cell connectivity.
Base class for all volume mesh types.
Abstract template base class for all meshes that have homogenous cell types. This class allows templa...