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

Represents a single bone in a WoW M2 model skeleton. More...

#include <Bone.h>

Collaboration diagram for Bone:
[legend]

Public Member Functions

void calcMatrix (std::vector< Bone > &allbones, ssize_t anim, size_t time, bool rotate=true)
 Compute the bone matrix from parent bones and animation data.
 
void initV3 (GameFile &f, ModelBoneDef &b, const modelAnimData &data)
 Initialise the bone from an M2 v3+ file.
 

Public Attributes

Animated< glm::vec3 > trans
 Translation animation track.
 
Animated< glm::fquat, PACK_QUATERNION, Quat16ToQuat32rot
 Rotation animation track (packed 16-bit).
 
Animated< glm::vec3 > scale
 Scale animation track.
 
glm::vec3 pivot
 
glm::vec3 transPivot
 Pivot point and translated pivot.
 
int16 parent
 Parent bone index (-1 if root).
 
bool billboard
 Whether this bone is billboarded.
 
glm::mat4 mat
 Computed transformation matrix.
 
glm::mat4 mrot
 Computed rotation-only matrix.
 
ModelBoneDef boneDef
 Raw bone definition from the M2 file.
 
bool calc
 Whether this bone has been calculated for the current frame.
 

Detailed Description

Represents a single bone in a WoW M2 model skeleton.

Definition at line 19 of file Bone.h.

Member Function Documentation

◆ calcMatrix()

void Bone::calcMatrix ( std::vector< Bone > &  allbones,
ssize_t  anim,
size_t  time,
bool  rotate = true 
)

Compute the bone matrix from parent bones and animation data.

Definition at line 9 of file Bone.cpp.

Here is the call graph for this function:

◆ initV3()

void Bone::initV3 ( GameFile f,
ModelBoneDef b,
const modelAnimData data 
)

Initialise the bone from an M2 v3+ file.

Definition at line 79 of file Bone.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ billboard

bool Bone::billboard

Whether this bone is billboarded.

Definition at line 29 of file Bone.h.

◆ boneDef

ModelBoneDef Bone::boneDef

Raw bone definition from the M2 file.

Definition at line 33 of file Bone.h.

◆ calc

bool Bone::calc

Whether this bone has been calculated for the current frame.

Definition at line 35 of file Bone.h.

◆ mat

glm::mat4 Bone::mat

Computed transformation matrix.

Definition at line 30 of file Bone.h.

◆ mrot

glm::mat4 Bone::mrot

Computed rotation-only matrix.

Definition at line 31 of file Bone.h.

◆ parent

int16 Bone::parent

Parent bone index (-1 if root).

Definition at line 27 of file Bone.h.

◆ pivot

glm::vec3 Bone::pivot

Definition at line 26 of file Bone.h.

◆ rot

Animated<glm::fquat, PACK_QUATERNION, Quat16ToQuat32> Bone::rot

Rotation animation track (packed 16-bit).

Definition at line 23 of file Bone.h.

◆ scale

Animated<glm::vec3> Bone::scale

Scale animation track.

Definition at line 24 of file Bone.h.

◆ trans

Animated<glm::vec3> Bone::trans

Translation animation track.

Definition at line 22 of file Bone.h.

◆ transPivot

glm::vec3 Bone::transPivot

Pivot point and translated pivot.

Definition at line 26 of file Bone.h.


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