+++ /dev/null
-
-/*] Copyright (c) 2009-2010, Charles McGarvey [**************************
-**] All rights reserved.
-*
-* vi:ts=4 sw=4 tw=75
-*
-* Distributable under the terms and conditions of the 2-clause BSD license;
-* see the file COPYING for a complete text of the license.
-*
-**************************************************************************/
-
-#ifndef _MOOF_FRUSTUM_HH_
-#define _MOOF_FRUSTUM_HH_
-
-#include <Moof/Math.hh>
-#include <Moof/Plane.hh>
-
-
-namespace Mf {
-
-
-template <int D> class Aabb;
-template <int D> class Sphere;
-
-class Frustum
-{
- Plane mPlanes[6]; // left, right, bottom, top, near, far
-
-public:
- typedef enum
- {
- OUTSIDE = 0,
- INSIDE = 1,
- INTERSECT = 2
- } Collision;
-
- Frustum() {}
- Frustum(const Matrix4& modelview, const Matrix4& projection)
- {
- init(modelview, projection);
- }
- Frustum(const Matrix4& modelview, Scalar fovy, Scalar aspect,
- Scalar abutting, Scalar distant)
- {
- init(modelview, fovy, aspect, abutting, distant);
- }
-
- void init(const Matrix4& modelview, const Matrix4& projection);
- void init(const Matrix4& modelview, Scalar fovy, Scalar aspect,
- Scalar abutting, Scalar distant);
-
- Collision contains(const Aabb<3>& aabb) const;
- Collision contains(const Sphere<3>& sphere) const;
-};
-
-
-} // namespace Mf
-
-#endif // _MOOF_FRUSTUM_HH_
-