public void Add(ObjBase obj) { switch (obj.Type) { case ObjType.Body: AddBody(obj as Body); break; case ObjType.Constraint: AddConstraint(obj as Constraint); break; case ObjType.Composite: AddComposite(obj as Composite); break; } }
public void Remove(ObjBase obj) { switch (obj.Type) { case ObjType.Body: RemoveBody(obj as Body); break; case ObjType.Constraint: RemoveConstraint(obj as Constraint); break; case ObjType.Composite: RemoveConstraint(obj as Composite); break; } }