// We need separation create/destroy functions from the constructor/destructor because
// the destructor cannot access the allocator or broad-phase (no destructor arguments allowed by C++).
public void Create(BroadPhase broadPhase, Body body, Transform xf, FixtureDef def)
{
UserData = def.UserData;
Friction = def.Friction;
Restitution = def.Restitution;
Body = body;
_next = null;
Filter = def.Filter;
IsSensor = def.IsSensor;
Shape = def.Shape.Clone();
Shape.ComputeMass(out _massData, def.Density);
// Create proxy in the broad-phase.
Shape.ComputeAABB(out Aabb, ref xf);
ProxyId = broadPhase.CreateProxy(Aabb, this);
}