]>
Dogcows Code - chaz/yoink/blob - src/moof/frustum.hh
c603a97884c056e1fc408bf7bbace8305728d8f4
2 /*] Copyright (c) 2009-2011, Charles McGarvey [*****************************
3 **] All rights reserved.
5 * Distributable under the terms and conditions of the 2-clause BSD license;
6 * see the file COPYING for a complete text of the license.
8 *****************************************************************************/
10 #ifndef _MOOF_FRUSTUM_HH_
11 #define _MOOF_FRUSTUM_HH_
15 * All things related to frustums!
18 #include <moof/math.hh>
19 #include <moof/plane.hh>
23 template <int D
> class aabb
;
24 template <int D
> class sphere
;
27 * A six-sided volume for representing the space visible by a position looking
42 frustum(const matrix4
& modelview
, const matrix4
& projection
)
44 init(modelview
, projection
);
46 frustum(const matrix4
& modelview
, scalar fovy
, scalar aspect
,
47 scalar abutting
, scalar distant
)
49 init(modelview
, fovy
, aspect
, abutting
, distant
);
52 void init(const matrix4
& modelview
, const matrix4
& projection
);
53 void init(const matrix4
& modelview
, scalar fovy
, scalar aspect
,
54 scalar abutting
, scalar distant
);
56 collision
contains(const aabb
<3>& aabb
) const;
57 collision
contains(const sphere
<3>& sphere
) const;
61 plane planes_
[6]; // left, right, bottom, top, near, far
66 #endif // _MOOF_FRUSTUM_HH_
This page took 0.046096 seconds and 4 git commands to generate.