#ifndef CPHYSICS_WORLD
#define CPHYSICS_WORLD

#include "PhysicsGlobal.h"
#include "EPhysicsEnums.h"
#include "IPhysicsBaseEntity.h"

class IPhysicsWorld
{
public:
	IPhysicsWorld();
	~IPhysicsWorld();

	void setSolverModel(ENUMERATED_SOLVER_MODEL solverModel);
	void setPlatformArchitecture(ENUMERATED_PLATFORM_ARCHITECTURE platformArchitecture);
	void setFrictionModel(ENUMERATED_FRICTION_MODEL frictionModel);
	void manualUpdate(f32 timeStep);
	void setMinimumFrameRate(f32 frameRate);
	f32 getTimeStep();
	void setWorldSize(vector3df min, vector3df max);
	void setEntityLeaveWorldEvent(NewtonBodyLeaveWorld callback);
	void forEachBodyDo(NewtonBodyIterator callback);
	void forEachBodyInBoxDo(aabbox3d<f32> box, NewtonBodyIterator callback);
	f32 getVersion();
	void freezeEntity(IPhysicsBaseEntity* entity);
	void unfreezeEntity(IPhysicsBaseEntity* entity);
	NewtonWorld* getWorld();
	void close();
		
protected:
	NewtonWorld* m_world;

private:
	static void* _cdecl physicsAlloc (int size);
	static void _cdecl physicsFree (void *pointer, int size);

};

#endif 
