Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
erincatto committed Jul 26, 2023
1 parent b250ce4 commit 4d5d696
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/world.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ static void b2Solve(b2World* world, b2StepContext* context)

b2Array_Clear(world->awakeContactArray);

// Iterate the bit set
// The order of the awake contact array doesn't matter, but I don't want duplicates. It is possible
// that body A or body B or both bodies wake the contact.
uint64_t word;
Expand All @@ -519,6 +520,7 @@ static void b2Solve(b2World* world, b2StepContext* context)
uint32_t ctz = b2CTZ(word);
uint32_t contactIndex = 64 * k + ctz;

// TODO_ERIN consider adding the awake index to the contact to speed up deletes
b2Array_Push(world->awakeContactArray, contactIndex);

// Clear the smallest set bit
Expand Down

0 comments on commit 4d5d696

Please sign in to comment.