30 void setup(
size_t time = 0);
Generic animated value class that reads keyframe data from M2 files.
Abstract base class representing a file within the game data archive.
An animated camera defined within an M2 model (e.g. portrait or character-info camera).
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.