/*
	BoundingBox.H

	Type definitions for BoundingBox class
*/
#ifndef _BOUNDINGBOX_H__
#define _BOUNDINGBOX_H__

#include <fstream.h>
#include <afxtempl.h>
#include "..\Face.h"
#include "..\3DPoint.h"

class CBoundingBox
{
	public:
		CBoundingBox();
		virtual ~CBoundingBox();
		CBoundingBox* GetUnionWith(CBoundingBox box);
		C3DPoint m_minPoint;
		C3DPoint m_maxPoint;
		void CreateFrom(CList <CFace *, CFace *>* faces);
		BOOL ContainsPoint(C3DPoint point);
		BOOL ContainsPointXY(C3DPoint point);
		BOOL ContainsPointXZ(C3DPoint point);
		BOOL ContainsPointYZ(C3DPoint point);
		double IsInBetween(C3DPoint point1, C3DPoint point2);
		double GetVolume(void);
	private:
		double TestInsideFace(double t, double a, double b, int nFace,C3DPoint point1, C3DPoint point2);

		
};

#endif