Skip to content

Commit

Permalink
Update MeshTopology.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
epernod authored Jan 8, 2025
1 parent 1ae983f commit 4bdc5db
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ MeshTopology::MeshTopology()
, d_seqTetrahedra(initData(&d_seqTetrahedra, "tetrahedra", "List of tetrahedron indices"))
, d_seqHexahedra(initData(&d_seqHexahedra, "hexahedra", "List of hexahedron indices"))
, d_seqUVs(initData(&d_seqUVs, "uv", "List of uv coordinates"))
, d_computeAllBuffers(initData(&d_computeAllBuffers, false, "computeAllBuffers", "Option to compute all crossed topology buffers at init. False by default"))
, nbPoints(0)
, validTetrahedra(false), validHexahedra(false)
, revision(0)
Expand Down Expand Up @@ -546,6 +547,12 @@ void MeshTopology::init()
else
m_upperElementType = sofa::geometry::ElementType::POINT;

// If true, will compute all crossed element buffers such as triangleAroundEdges, EdgesIntriangle, etc.
if (d_computeAllBuffers.getValue())
{
computeCrossElementBuffers();
}

// compute the number of points, if the topology is charged from the scene or if it was loaded from a MeshLoader without any points data.
if (nbPoints==0)
{
Expand Down

0 comments on commit 4bdc5db

Please sign in to comment.