#ifndef __ASTEROID__
#define __ASTEROID__

#include <stdlib.h>
#include "Vec3f.h"

#define MAX_ROTATION_SPEED 0.5

class Stone;
class Material;
class VertexBufferObject;
class BoundingSphere;
class TextureObject;

class Asteroid
{
public:
	Asteroid( float radius, Vec3f position, Material* material = NULL, TextureObject* texture = NULL, bool visible = true);
	Asteroid( float radius, Vec3f position, Stone* geometrie, Material* material = NULL, TextureObject* texture = NULL, bool visible = true);

	virtual ~Asteroid();

	void setPosition(Vec3f newPos);
	Vec3f getPosition();

	Stone* getGeometrie();

	float getRadius();

	float getMovingSpeed();
	void setMovingSpeed(float newSpeed);

	Vec3f getMovingDirection();
	void setMovingDirection(Vec3f newDirection);

	BoundingSphere* getBoundingVolume();

	void render();

	void update();

	bool visible;

protected:

	void init();

	Vec3f position;

	Vec3f movingDirection;

	float movingSpeed;

	float radius;

	Vec3f rotationAxis;
	float rotationAngle;
	float rotationSpeed;

	Stone* geometrie;
	Material * mat;

	BoundingSphere* bbox;
	TextureObject* tex;

	
};

#endif __ASTEROID__