private void RemoveBodyInternal(VoltBody body) { this.bodies.Remove(body); if (body.IsStatic) { this.staticBroadphase.RemoveBody(body); } else { this.dynamicBroadphase.RemoveBody(body); } body.FreeHistory(); body.AssignWorld(null); }
private void AddBodyInternal(VoltBody body) { this.bodies.Add(body); if (body.IsStatic) { this.staticBroadphase.AddBody(body); } else { this.dynamicBroadphase.AddBody(body); } body.AssignWorld(this); if ((this.HistoryLength > 0) && (body.IsStatic == false)) { body.AssignHistory(this.AllocateHistory()); } }