Implemented a custom physics engine #316

Merged
direnbharwani merged 95 commits from SHPhysics into main 2023-01-23 15:55:45 +08:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 7b1b4873ec - Show all commits

View File

@ -177,7 +177,7 @@ namespace SHADE
for (size_t j = 0; j < FACE.vertexIndices.size(); ++j)
{
const int32_t TAIL = FACE.vertexIndices[j];
const int32_t HEAD = j + 1 < FACE.vertexIndices.size() ? FACE.vertexIndices[j + 1] : FACE.vertexIndices[0];
const int32_t HEAD = FACE.vertexIndices[(j + 1) % FACE.vertexIndices.size()];
const uint64_t NEW_EDGE_ID = BUILD_UINT64_FROM_UINT32S(TAIL, HEAD);
const uint64_t TWIN_EDGE_ID = BUILD_UINT64_FROM_UINT32S(HEAD, TAIL);