]>
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_
15 #include <Moof/Event.hh>
16 #include <Moof/Frustum.hh>
17 #include <Moof/Math.hh>
18 #include <Moof/RigidBody.hh>
24 class Camera
: public RigidBody3
33 cml::quaternion_rotation_world_y(mState
.orientation
, SCALAR(0.0));
36 void setPosition(const Vector3
& position
);
37 void setRotation(const Quaternion
& rotation
);
39 void lookAt(const Vector3
& point
);
41 void setProjection(const Matrix4
& projection
);
42 void setProjection(Scalar fovy
, Scalar aspect
, Scalar near
, Scalar far
);
44 const Matrix4
& getModelview() const
49 const Matrix4
& getProjection() const
54 const Frustum
& getFrustum() const
60 void uploadToGL(Scalar alpha
= 0) const;
62 void update(Scalar t
, Scalar dt
);
63 void draw(Scalar alpha
= 0) const;
64 void handleEvent(const Event
& event
);
68 void calculate(Scalar alpha
) const;
70 mutable Matrix4 mModelview
;
73 mutable Frustum mFrustum
;
79 #endif // _MOOF_CAMERA_HH_
This page took 0.034643 seconds and 4 git commands to generate.