#include "SimulationObject.h"
#include "../Logger.h"
#include "../typedefs.h"

dWorldID SimulationObject::_worldID = 0;
dSpaceID SimulationObject::_spaceID = 0;
int SimulationObject::_nextID = 1;

void SimulationObject::setWorldID(dWorldID id) { mASSERT(id > 0); _worldID = id; }

void SimulationObject::setSpaceID(dSpaceID id) { mASSERT(id > 0); _spaceID = id; }

SimulationObject::SimulationObject():
	_id(SimulationObject::_nextID)
{
	_nextID++;
	_DEBUG("simulation object ID=" << _id << " created");
}

SimulationObject::~SimulationObject()
{
	_DEBUG("simulation object ID=" << _id << " destroyed");
}
