MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/PositionBasedDynamics / initMesh

Method initMesh

Simulation/TriangleModel.cpp:30–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void TriangleModel::initMesh(const unsigned int nPoints, const unsigned int nFaces, const unsigned int indexOffset, unsigned int* indices, const ParticleMesh::UVIndices& uvIndices, const ParticleMesh::UVs& uvs)
31{
32 m_indexOffset = indexOffset;
33 m_particleMesh.release();
34
35 m_particleMesh.initMesh(nPoints, nFaces * 2, nFaces);
36
37 for (unsigned int i = 0; i < nFaces; i++)
38 {
39 m_particleMesh.addFace(&indices[3 * i]);
40 }
41 m_particleMesh.copyUVs(uvIndices, uvs);
42 m_particleMesh.buildNeighbors();
43}
44
45unsigned int TriangleModel::getIndexOffset() const
46{

Callers

nothing calls this directly

Calls 4

addFaceMethod · 0.80
copyUVsMethod · 0.80
releaseMethod · 0.45
buildNeighborsMethod · 0.45

Tested by

no test coverage detected