WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
ModelCamera.h
Go to the documentation of this file.
1/*
2 * ModelCamera.h
3 *
4 * Created on: 20 oct. 2013
5 *
6 */
7
8#pragma once
9
10#include <string>
11#include "animated.h"
12
13#include "glm/glm.hpp"
14
17{
18 bool ok;
19
20 glm::vec3 pos, target;
24
26 void init(GameFile* f, ModelCameraDef& mcd, std::vector<uint32>& global, std::string modelname);
28 void initv10(GameFile* f, ModelCameraDefV10& mcd, std::vector<uint32>& global, std::string modelname);
30 void setup(size_t time = 0);
31
32 ModelCamera() : ok(false), pos(glm::vec3()), target(glm::vec3()), nearclip(0), farclip(0),
33 fov(0), tPos(), tTarget(), rot()
34 {
35 }
36};
Generic animated value class that reads keyframe data from M2 files.
Definition animated.h:161
Abstract base class representing a file within the game data archive.
Definition GameFile.h:12
An animated camera defined within an M2 model (e.g. portrait or character-info camera).
Definition ModelCamera.h:17
bool ok
Whether this camera was successfully initialised.
Definition ModelCamera.h:18
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.
Definition ModelCamera.h:22
glm::vec3 pos
Definition ModelCamera.h:20
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.
float farclip
Definition ModelCamera.h:21
float nearclip
Definition ModelCamera.h:21
Animated< glm::vec3 > tPos
Definition ModelCamera.h:22
float fov
Clipping planes and field of view.
Definition ModelCamera.h:21
Animated< float > rot
Animated roll track.
Definition ModelCamera.h:23
glm::vec3 target
Camera position and look-at target.
Definition ModelCamera.h:20