| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
#if !defined( INCLUDED_CULLABLE_H ) |
| 23 |
#define INCLUDED_CULLABLE_H |
| 24 |
|
| 25 |
#include "generic/constant.h" |
| 26 |
|
| 27 |
template<typename Element> class BasicVector3; |
| 28 |
typedef BasicVector3<float> Vector3; |
| 29 |
class Plane3; |
| 30 |
class Matrix4; |
| 31 |
class AABB; |
| 32 |
class Segment; |
| 33 |
|
| 34 |
template<typename Enumeration> class EnumeratedValue; |
| 35 |
struct VolumeIntersection; |
| 36 |
typedef EnumeratedValue<VolumeIntersection> VolumeIntersectionValue; |
| 37 |
|
| 38 |
class VolumeTest |
| 39 |
{ |
| 40 |
public: |
| 41 |
|
| 42 |
|
| 43 |
virtual bool TestPoint( const Vector3& point ) const = 0; |
| 44 |
|
| 45 |
virtual bool TestLine( const Segment& segment ) const = 0; |
| 46 |
|
| 47 |
virtual bool TestPlane( const Plane3& plane ) const = 0; |
| 48 |
|
| 49 |
virtual bool TestPlane( const Plane3& plane, const Matrix4& localToWorld ) const = 0; |
| 50 |
|
| 51 |
virtual VolumeIntersectionValue TestAABB( const AABB& aabb ) const = 0; |
| 52 |
|
| 53 |
virtual VolumeIntersectionValue TestAABB( const AABB& aabb, const Matrix4& localToWorld ) const = 0; |
| 54 |
|
| 55 |
virtual bool fill() const = 0; |
| 56 |
|
| 57 |
virtual const Matrix4& GetViewport() const = 0; |
| 58 |
virtual const Matrix4& GetProjection() const = 0; |
| 59 |
virtual const Matrix4& GetModelview() const = 0; |
| 60 |
}; |
| 61 |
|
| 62 |
class Cullable |
| 63 |
{ |
| 64 |
public: |
| 65 |
STRING_CONSTANT( Name, "Cullable" ); |
| 66 |
|
| 67 |
virtual VolumeIntersectionValue intersectVolume( const VolumeTest& test, const Matrix4& localToWorld ) const = 0; |
| 68 |
}; |
| 69 |
|
| 70 |
|
| 71 |
#endif |