]>
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_
17 * All things related to frustums!
20 #include <moof/math.hh>
21 #include <moof/plane.hh>
27 template <int D
> class aabb
;
28 template <int D
> class sphere
;
32 * A six-sided volume for representing the space visible by a position
47 frustum(const matrix4
& modelview
, const matrix4
& projection
)
49 init(modelview
, projection
);
51 frustum(const matrix4
& modelview
, scalar fovy
, scalar aspect
,
52 scalar abutting
, scalar distant
)
54 init(modelview
, fovy
, aspect
, abutting
, distant
);
57 void init(const matrix4
& modelview
, const matrix4
& projection
);
58 void init(const matrix4
& modelview
, scalar fovy
, scalar aspect
,
59 scalar abutting
, scalar distant
);
61 collision
contains(const aabb
<3>& aabb
) const;
62 collision
contains(const sphere
<3>& sphere
) const;
67 plane planes_
[6]; // left, right, bottom, top, near, far
73 #endif // _MOOF_FRUSTUM_HH_
This page took 0.040767 seconds and 4 git commands to generate.