WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
ModelLight.h
Go to the documentation of this file.
1/*
2 * ModelLight.h
3 *
4 * Created on: 21 oct. 2013
5 *
6 */
7
8#pragma once
9
10#include "animated.h"
11
12class GameFile;
13
14#include <glad/gl.h> // GLuint
15#include "glm/glm.hpp"
16
19{
20 ssize_t type;
21 ssize_t parent;
22 glm::vec3 pos, tpos, dir, tdir;
26
28 void init(GameFile* f, ModelLightDef& mld, std::vector<uint32>& global);
30 void setup(size_t time, GLuint l);
31};
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 light source attached to an M2 model bone.
Definition ModelLight.h:19
Animated< float > diffIntensity
Definition ModelLight.h:24
ssize_t parent
Parent bone index (-1 if none).
Definition ModelLight.h:21
Animated< float > ambIntensity
Definition ModelLight.h:24
glm::vec3 tpos
Definition ModelLight.h:22
Animated< float > AttenStart
Definition ModelLight.h:24
void setup(size_t time, GLuint l)
Set up the OpenGL light for rendering.
Animated< int > UseAttenuation
Whether attenuation is enabled.
Definition ModelLight.h:25
glm::vec3 dir
Definition ModelLight.h:22
ssize_t type
Light type: 0 = directional, 1 = point.
Definition ModelLight.h:20
glm::vec3 pos
Definition ModelLight.h:22
void init(GameFile *f, ModelLightDef &mld, std::vector< uint32 > &global)
Initialise from an M2 light definition block.
Definition ModelLight.cpp:8
Animated< glm::vec3 > diffColor
Definition ModelLight.h:23
Animated< float > AttenEnd
Intensity and attenuation tracks.
Definition ModelLight.h:24
Animated< glm::vec3 > ambColor
Diffuse and ambient colour tracks.
Definition ModelLight.h:23
glm::vec3 tdir
Position, transformed position, direction, transformed direction.
Definition ModelLight.h:22