]>
Dogcows Code - chaz/yoink/blob - src/Moof/Frustum.hh
2 /*] Copyright (c) 2009-2010, Charles McGarvey [**************************
3 **] All rights reserved.
7 * Distributable under the terms and conditions of the 2-clause BSD license;
8 * see the file COPYING for a complete text of the license.
10 **************************************************************************/
12 #ifndef _MOOF_FRUSTUM_HH_
13 #define _MOOF_FRUSTUM_HH_
15 #include <Moof/Math.hh>
16 #include <Moof/Plane.hh>
22 template <int D
> class Aabb
;
23 template <int D
> class Sphere
;
27 Plane mPlanes
[6]; // left, right, bottom, top, near, far
38 Frustum(const Matrix4
& modelview
, const Matrix4
& projection
)
40 init(modelview
, projection
);
42 Frustum(const Matrix4
& modelview
, Scalar fovy
, Scalar aspect
,
43 Scalar abutting
, Scalar distant
)
45 init(modelview
, fovy
, aspect
, abutting
, distant
);
48 void init(const Matrix4
& modelview
, const Matrix4
& projection
);
49 void init(const Matrix4
& modelview
, Scalar fovy
, Scalar aspect
,
50 Scalar abutting
, Scalar distant
);
52 Collision
contains(const Aabb
<3>& aabb
) const;
53 Collision
contains(const Sphere
<3>& sphere
) const;
59 #endif // _MOOF_FRUSTUM_HH_
This page took 0.034312 seconds and 4 git commands to generate.