WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
ModelCamera Struct Reference

An animated camera defined within an M2 model (e.g. portrait or character-info camera). More...

#include <ModelCamera.h>

Collaboration diagram for ModelCamera:
[legend]

Public Member Functions

void init (GameFile *f, ModelCameraDef &mcd, std::vector< uint32 > &global, std::string modelname)
 Initialise from an M2 camera definition block.
 
void initv10 (GameFile *f, ModelCameraDefV10 &mcd, std::vector< uint32 > &global, std::string modelname)
 Initialise from a v10 camera definition block.
 
void setup (size_t time=0)
 Apply the camera transform at the given time.
 
 ModelCamera ()
 

Public Attributes

bool ok
 Whether this camera was successfully initialised.
 
glm::vec3 pos
 
glm::vec3 target
 Camera position and look-at target.
 
float nearclip
 
float farclip
 
float fov
 Clipping planes and field of view.
 
Animated< glm::vec3 > tPos
 
Animated< glm::vec3 > tTarget
 Animated position and target tracks.
 
Animated< float > rot
 Animated roll track.
 

Detailed Description

An animated camera defined within an M2 model (e.g. portrait or character-info camera).

Definition at line 16 of file ModelCamera.h.

Constructor & Destructor Documentation

◆ ModelCamera()

ModelCamera::ModelCamera ( )
inline

Definition at line 32 of file ModelCamera.h.

Member Function Documentation

◆ init()

void ModelCamera::init ( GameFile f,
ModelCameraDef mcd,
std::vector< uint32 > &  global,
std::string  modelname 
)

Initialise from an M2 camera definition block.

Definition at line 7 of file ModelCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initv10()

void ModelCamera::initv10 ( GameFile f,
ModelCameraDefV10 mcd,
std::vector< uint32 > &  global,
std::string  modelname 
)

Initialise from a v10 camera definition block.

Definition at line 21 of file ModelCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup()

void ModelCamera::setup ( size_t  time = 0)

Apply the camera transform at the given time.

Definition at line 35 of file ModelCamera.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ farclip

float ModelCamera::farclip

Definition at line 21 of file ModelCamera.h.

◆ fov

float ModelCamera::fov

Clipping planes and field of view.

Definition at line 21 of file ModelCamera.h.

◆ nearclip

float ModelCamera::nearclip

Definition at line 21 of file ModelCamera.h.

◆ ok

bool ModelCamera::ok

Whether this camera was successfully initialised.

Definition at line 18 of file ModelCamera.h.

◆ pos

glm::vec3 ModelCamera::pos

Definition at line 20 of file ModelCamera.h.

◆ rot

Animated<float> ModelCamera::rot

Animated roll track.

Definition at line 23 of file ModelCamera.h.

◆ target

glm::vec3 ModelCamera::target

Camera position and look-at target.

Definition at line 20 of file ModelCamera.h.

◆ tPos

Animated<glm::vec3> ModelCamera::tPos

Definition at line 22 of file ModelCamera.h.

◆ tTarget

Animated<glm::vec3> ModelCamera::tTarget

Animated position and target tracks.

Definition at line 22 of file ModelCamera.h.


The documentation for this struct was generated from the following files: