public void Clear() { Bodies.Clear(); Velocities.Clear(); Contacts.Clear(); foreach (var state in ContactStates) { for (int i = 0; i < state.contactCount; i++) { ContactState.Free(state.contacts[i]); } ContactConstraintState.Free(state); // Array.Clear(state.contacts, 0, state.contactCount); } ContactStates.Clear(); }
public void ResetSpeedsBuffer() { Velocities.Clear(); _lastWritePos = -1; _previousPosition = null; }