#ifndef _Brush_h
#define _Brush_h

#include "Plane.h"
#include "Point.h"

#include <list>
#include <limits>
#include <vector>

struct BrushIntersection {
	BrushIntersection( ) : raydistance( std::numeric_limits< float >::infinity( ) ) { }
	BrushIntersection( float _raydistance, const Point & _normal ) : raydistance( _raydistance ), normal( _normal ) { }
	Point normal;
	float raydistance;
};

class Brush {
public:
	Brush( const Plane * planearray, int size );
	BrushIntersection Intersect( const Ray & ray ) const;
	BrushIntersection Intersect( const LineSegment & line ) const;
private:
	std::list< Plane > planes;
};

#endif
