]>
Dogcows Code - chaz/yoink/blob - src/moof/camera.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_CAMERA_HH_
11 #define _MOOF_CAMERA_HH_
13 #include <moof/event.hh>
14 #include <moof/frustum.hh>
15 #include <moof/math.hh>
16 #include <moof/rigid_body.hh>
21 * Classes related to managing the modelview and perspective matrices.
27 class camera
: public rigid_body3
36 quaternion_rotation_world_y(state_
.orientation
, SCALAR(0.0));
39 void position(const vector3
& position
);
40 void rotation(const quaternion
& rotation
);
42 void look_at(const vector3
& point
);
44 void projection(const matrix4
& projection
);
45 void projection(scalar fovy
, scalar aspect
, scalar near
, scalar far
);
47 const matrix4
& modelview() const
52 const matrix4
& projection() const
57 const class frustum
& frustum() const
62 void upload_to_gl(scalar alpha
= 0) const;
64 void update(scalar t
, scalar dt
);
65 void draw(scalar alpha
= 0) const;
66 void handle_event(const event
& event
);
70 void calculate(scalar alpha
) const;
72 mutable matrix4 modelview_
;
74 mutable class frustum frustum_
;
80 #endif // _MOOF_CAMERA_HH_
This page took 0.034749 seconds and 4 git commands to generate.