// Alternate (almost identical) version of RemoveFaces that does not // decrement state->numFaces. void IFXNeighborResController::AltRemoveFaces(U32 meshIndex) { ResolutionState* state = &(m_pMeshStates[meshIndex]); --state->resolutionChangeIndex; IFXUpdates* pUpdates = m_pUpdatesGroup->GetUpdates(meshIndex); IFXResolutionChange* rc = &(pUpdates->pResChanges[state->resolutionChangeIndex]); // Decrement the face updates index to reflect modified faces state->faceUpdateIndex -= rc->numFaceUpdates; if (rc->deltaFaces == 0) return; IFXNeighborFace* pNeighborFaces = m_pNeighborMesh->GetNeighborFaceArray(meshIndex); IFXASSERT(state->prevNumFaces); I32 faceIndex = state->prevNumFaces - 1; while (faceIndex >= I32(state->numFaces)) { // Determine corner across from collapse edge. U32 xCornerIndex = pNeighborFaces[faceIndex].GetFaceFlags()->collapseIndex; if (xCornerIndex < NO_COLLAPSE_INDEX) { RemoveFace(meshIndex, faceIndex, xCornerIndex); } --faceIndex; } }
/** * Remove faces from tiangle mesh topology * * @param fs: faces' id need to delete * @return true: delete success * false: delete failed */ bool niTriMesh2dTopo::RemoveFaces(niIntArray fs) { int num = int(fs.size()); if (num < 1) return false; for (int i = 0; i < num; ++i) { RemoveFace(fs[i]); } return true; }
void FaceSet::remove(int i) { RemoveFace(i); }