// part of uber 3
TEntityPoolStaticInfo = object
public
  {$I uber_defaults.inc}
public const
  PAGE_SIZE = 64 * SizeOf(TEntity);
  STATIC_SIZE = PAGE_SIZE;
end;

TEntityPool = specialize TPool<TEntity, TEntityPoolStaticInfo>;

TConstructor = function (Obj: Pointer; VMT: Pointer): Pointer;

TWorld = object
private
  FEng: TEngine;
  FLastIndex: LongInt;
  FPool: TEntityPool;
  FRoot: PEntity;
  FConstructor: TConstructor;
  FKillQue: PEntity;
public
  constructor Init(Eng: TEngine);
  destructor Done; virtual;
  procedure Render;
  procedure Update;
  function Spawn(Parent: PEntity = nil): PEntity; overload;
  function Spawn(VMT: Pointer; Parent: PEntity = nil): PEntity; overload;
  procedure Kill(Entity: PEntity);
  procedure LogMemoryStats;
  property Root: PEntity read FRoot;
end;

//operator := (Entity: PEntity): TEntityPtr;

var
  World: TWorld;
