#ifndef __AA_BOUNDING_BOX__
#define __AA_BOUNDING_BOX__

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

class BoundingSphere;
class Material;

class AABoundBox
{
public:

	AABoundBox(Vec3f max = Vec3f(0,0,0), Vec3f min = Vec3f(0,0,0));

	virtual ~AABoundBox();

	void setMax(Vec3f newMax);
	void setMin(Vec3f newMin);
	void setCenter(Vec3f newCenter);

	Vec3f getMax();
	Vec3f getMin();
	Vec3f getCenter();

	void scale(float x, float y, float z);

	void growByPoint(Vec3f newOne);

	bool collisionTest(AABoundBox* other);
	bool collisionTest(BoundingSphere* other);

	void render(Material* mat = NULL);

protected:
	
	Vec3f max;
	Vec3f min;
	Vec3f center;

	void recalculateCenter();
};

#endif __AA_BOUNDING_BOX__