/**
 * \file WorldObject.h
 * \date 12.04.2003
 *
 * Interface for the general world object
 */

#ifndef COMMON_WORLD_WORLDOBJECT_H
#define COMMON_WORLD_WORLDOBJECT_H

class World;

/**
 * \class WorldObject
 * \author Matus Horvath
 * \brief General world object with access to whole world
 */
class WorldObject
{
public:
	WorldObject(World* w) : world(w) {}
	WorldObject(const WorldObject& wo) : world(wo.world) {}
	virtual WorldObject& operator=(const WorldObject& wo) { world = wo.world; return *this; }
	virtual ~WorldObject() {}
	
	World* GetWorld() const { return world; }
	void SetWorld(World* w) { world = w; }
	
protected:
	World* world;

};

#endif // COMMON_WORLD_WORLDOBJECT_H
