]>
Dogcows Code - chaz/yoink/blob - src/moof/frustum.hh
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_
13 #include <moof/math.hh>
14 #include <moof/plane.hh>
19 * All things related to frustums!
25 template <int D
> class aabb
;
26 template <int D
> class sphere
;
29 * A six-sided volume for representing the space visible by a position looking
44 frustum(const matrix4
& modelview
, const matrix4
& projection
)
46 init(modelview
, projection
);
48 frustum(const matrix4
& modelview
, scalar fovy
, scalar aspect
,
49 scalar abutting
, scalar distant
)
51 init(modelview
, fovy
, aspect
, abutting
, distant
);
54 void init(const matrix4
& modelview
, const matrix4
& projection
);
55 void init(const matrix4
& modelview
, scalar fovy
, scalar aspect
,
56 scalar abutting
, scalar distant
);
58 collision
contains(const aabb
<3>& aabb
) const;
59 collision
contains(const sphere
<3>& sphere
) const;
63 plane planes_
[6]; // left, right, bottom, top, near, far
69 #endif // _MOOF_FRUSTUM_HH_
This page took 0.039464 seconds and 5 git commands to generate.