#ifndef FIXEDSIMULATIONOBJECT_H_
#define FIXEDSIMULATIONOBJECT_H_

#include "../config.h"
#include <ode/ode.h>
#include "SimulationObject.h"
#include "../iface/Visualized.h"

/**
 * Class representing fixed simulation object i.e. object which doesn't change its physical properties through time.
 * Fixed simulation objects can still be animated, i.e. have their state (and visualization) changed over time.
 */
class FixedSimulationObject: public SimulationObject, public Visualized {
public:
	/**
	 * Constructor
	 * @param size object's size
	 * @param pos object's position
	 * @param rot object's rotation
	 * @param weight object's weight (infinite if ommited)
	 */
	FixedSimulationObject(const dVector3 size, const dVector3 pos, const dReal direction, const dReal weight = dInfinity);
	virtual ~FixedSimulationObject();
	
	/**
	 * Sets the collision space for the object
	 * If not given at all, the object is ommited from collisions
	 */
	void setCollisionSpace(dSpaceID space) { dSpaceAdd(space, _geom); };
	/**
	 * Removes the object from it's actual collision space
	 */
	void removeCollisionSpace(dSpaceID space) { dSpaceRemove(space, _geom); };
	
	virtual void visualize() = 0;

protected:
	/**
	 * Internal ODE geom
	 */
	dGeomID _geom;
	/**
	 * Internal ODE body
	 */
	dBodyID _body;
	/**
	 * Object's size
	 */
	dVector3 _size;
};

#endif /*FIXEDSIMULATIONOBJECT_H_*/
