]>
Dogcows Code - chaz/yoink/blob - src/moof/camera.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_CAMERA_HH_
13 #define _MOOF_CAMERA_HH_
17 * Classes related to managing the modelview and perspective matrices.
20 #include <moof/event.hh>
21 #include <moof/frustum.hh>
22 #include <moof/math.hh>
23 #include <moof/rigid_body.hh>
29 class camera
: public rigid_body3
38 quaternion_rotation_world_y(state_
.orientation
, SCALAR(0.0));
41 void position(const vector3
& position
);
42 void rotation(const quaternion
& rotation
);
44 void look_at(const vector3
& point
);
46 void projection(const matrix4
& projection
);
47 void projection(scalar fovy
, scalar aspect
, scalar near
, scalar far
);
49 const matrix4
& modelview() const
54 const matrix4
& projection() const
59 const class frustum
& frustum() const
65 void upload_to_gl(scalar alpha
= 0) const;
67 void update(scalar t
, scalar dt
);
68 void draw(scalar alpha
= 0) const;
69 void handle_event(const event
& event
);
74 void calculate(scalar alpha
) const;
76 mutable matrix4 modelview_
;
79 mutable class frustum frustum_
;
85 #endif // _MOOF_CAMERA_HH_
This page took 0.041398 seconds and 4 git commands to generate.