Original Post
I have a tetrahedral mesh. I need to store the triangles of each tetrahedron
to a hash map. I have never programmed using hash map. So I have little difficulty in implementing the hash map. Following is the incomplete code.
for (UINT IdxTet = 0; IdxTet <uiNumTetarhede; IdxTet++){ Eement* pElement1 = pModel->GetElement(IdxTet); Node* pNode1 = pElement1->GetNodeList(); /* Triangles and it indices of a tetrahedron*/ int pTriangle1[4][3] = {{pNode1[0].GetID(),pNode1[1].GetID(),pNode1[2].GetID()}, {pNode1[0].GetID(),pNode1[2].GetID(),pNode1[3].GetID()}, {pNode1[0].GetID(),pNode1[1].GetID(),pNode1[3].GetID()}, {pNode1[1].GetID(),pNode1[2].GetID(),pNode1[3].GetID()}; // hash map definition hash_map<int,int,int> TMap; //Here I need add 4 triangles (pTriangle1) to TMap // Please help me}