9 LOG_INFO <<
"Using original Camera Model Definitions.";
23 LOG_INFO <<
"Using version 10 Camera Model Definitions.";
39 glMatrixMode(GL_PROJECTION);
46 const glm::vec3 u(0, 1, 0);
48 glMatrixMode(GL_MODELVIEW);
50 gluLookAt(p.x, p.y, p.z, t.x, t.y, t.z, u.x, u.y, u.z);
T getValue(ssize_t anim, size_t time)
void init(AnimationBlock &b, GameFile *f, std::vector< uint32 > &gs)
Abstract base class representing a file within the game data archive.
AnimationBlock transTarget
AnimationBlock transTarget
bool ok
Whether this camera was successfully initialised.
void initv10(GameFile *f, ModelCameraDefV10 &mcd, std::vector< uint32 > &global, std::string modelname)
Initialise from a v10 camera definition block.
Animated< glm::vec3 > tTarget
Animated position and target tracks.
void setup(size_t time=0)
Apply the camera transform at the given time.
void init(GameFile *f, ModelCameraDef &mcd, std::vector< uint32 > &global, std::string modelname)
Initialise from an M2 camera definition block.
Animated< glm::vec3 > tPos
float fov
Clipping planes and field of view.
Animated< float > rot
Animated roll track.
glm::vec3 target
Camera position and look-at target.