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

An animated light source attached to an M2 model bone. More...

#include <ModelLight.h>

Collaboration diagram for ModelLight:
[legend]

Public Member Functions

void init (GameFile *f, ModelLightDef &mld, std::vector< uint32 > &global)
 Initialise from an M2 light definition block.
 
void setup (size_t time, GLuint l)
 Set up the OpenGL light for rendering.
 

Public Attributes

ssize_t type
 Light type: 0 = directional, 1 = point.
 
ssize_t parent
 Parent bone index (-1 if none).
 
glm::vec3 pos
 
glm::vec3 tpos
 
glm::vec3 dir
 
glm::vec3 tdir
 Position, transformed position, direction, transformed direction.
 
Animated< glm::vec3 > diffColor
 
Animated< glm::vec3 > ambColor
 Diffuse and ambient colour tracks.
 
Animated< float > diffIntensity
 
Animated< float > ambIntensity
 
Animated< float > AttenStart
 
Animated< float > AttenEnd
 Intensity and attenuation tracks.
 
Animated< int > UseAttenuation
 Whether attenuation is enabled.
 

Detailed Description

An animated light source attached to an M2 model bone.

Definition at line 18 of file ModelLight.h.

Member Function Documentation

◆ init()

void ModelLight::init ( GameFile f,
ModelLightDef mld,
std::vector< uint32 > &  global 
)

Initialise from an M2 light definition block.

Definition at line 8 of file ModelLight.cpp.

Here is the call graph for this function:

◆ setup()

void ModelLight::setup ( size_t  time,
GLuint  l 
)

Set up the OpenGL light for rendering.

Definition at line 23 of file ModelLight.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ ambColor

Animated<glm::vec3> ModelLight::ambColor

Diffuse and ambient colour tracks.

Definition at line 23 of file ModelLight.h.

◆ ambIntensity

Animated<float> ModelLight::ambIntensity

Definition at line 24 of file ModelLight.h.

◆ AttenEnd

Animated<float> ModelLight::AttenEnd

Intensity and attenuation tracks.

Definition at line 24 of file ModelLight.h.

◆ AttenStart

Animated<float> ModelLight::AttenStart

Definition at line 24 of file ModelLight.h.

◆ diffColor

Animated<glm::vec3> ModelLight::diffColor

Definition at line 23 of file ModelLight.h.

◆ diffIntensity

Animated<float> ModelLight::diffIntensity

Definition at line 24 of file ModelLight.h.

◆ dir

glm::vec3 ModelLight::dir

Definition at line 22 of file ModelLight.h.

◆ parent

ssize_t ModelLight::parent

Parent bone index (-1 if none).

Definition at line 21 of file ModelLight.h.

◆ pos

glm::vec3 ModelLight::pos

Definition at line 22 of file ModelLight.h.

◆ tdir

glm::vec3 ModelLight::tdir

Position, transformed position, direction, transformed direction.

Definition at line 22 of file ModelLight.h.

◆ tpos

glm::vec3 ModelLight::tpos

Definition at line 22 of file ModelLight.h.

◆ type

ssize_t ModelLight::type

Light type: 0 = directional, 1 = point.

Definition at line 20 of file ModelLight.h.

◆ UseAttenuation

Animated<int> ModelLight::UseAttenuation

Whether attenuation is enabled.

Definition at line 25 of file ModelLight.h.


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