ScummVM API documentation
GraphicsTypes.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22/*
23 * Copyright (C) 2006-2010 - Frictional Games
24 *
25 * This file is part of HPL1 Engine.
26 */
27
28#ifndef HPL_GRAPHICSTYPES_H
29#define HPL_GRAPHICSTYPES_H
30
31#include "common/array.h"
32#include "common/list.h"
33#include "hpl1/engine/graphics/Color.h"
34#include "hpl1/engine/math/MathTypes.h"
35
36namespace hpl {
37
38#define MAX_TEXTUREUNITS (8)
39#define MAX_NUM_OF_LIGHTS (30)
40
41enum eMatrix {
42 eMatrix_ModelView,
43 eMatrix_Projection,
44 eMatrix_Texture,
45 eMatrix_LastEnum
46};
47
48enum eTileRotation {
49 eTileRotation_0,
50 eTileRotation_90,
51 eTileRotation_180,
52 eTileRotation_270,
53 eTileRotation_LastEnum
54};
55
56enum ePrimitiveType {
57 ePrimitiveType_Tri,
58 ePrimitiveType_Quad,
59 ePrimitiveType_LastEnum
60};
61
62typedef tFlag tAnimTransformFlag;
63
64#define eAnimTransformFlag_Translate (0x00000001)
65#define eAnimTransformFlag_Scale (0x00000002)
66#define eAnimTransformFlag_Rotate (0x00000004)
67
68#define klNumOfAnimTransformFlags (3)
69
70const tAnimTransformFlag kvAnimTransformFlags[] = {eAnimTransformFlag_Translate,
71 eAnimTransformFlag_Scale, eAnimTransformFlag_Rotate};
72
73//---------------------------------------
74
75enum eFontAlign {
76 eFontAlign_Left,
77 eFontAlign_Right,
78 eFontAlign_Center,
79 eFontAlign_LastEnum
80};
81
82//---------------------------------------
83
84class cKeyFrame {
85public:
86 cVector3f trans;
87 cVector3f scale;
88 cQuaternion rotation;
89 float time;
90};
91
93typedef tKeyFramePtrVec::iterator tKeyFramePtrVecIt;
94
96typedef tKeyFrameVec::iterator tKeyFrameVecIt;
97
98//---------------------------------------
99
100enum eAnimationEventType {
101 eAnimationEventType_PlaySound,
102 eAnimationEventType_LastEnum
103};
104
105//---------------------------------------
106
108public:
109 cVertexBonePair(unsigned int aVtx, unsigned int aBone, float aW) {
110 vtxIdx = aVtx;
111 boneIdx = aBone;
112 weight = aW;
113 }
114 cVertexBonePair() {}
115
116 unsigned int vtxIdx;
117 unsigned int boneIdx;
118 float weight;
119};
120
122typedef tVertexBonePairVec::iterator tVertexBonePairVecIt;
123
124//---------------------------------------
125
126class cVertex {
127public:
128 cVertex() : pos(0), tex(0), col(0) {}
129 cVertex(const cVector3f &avPos, const cVector3f &avTex, const cColor &aCol) {
130 pos = avPos;
131 tex = avTex;
132 col = aCol;
133 }
134
135 cVertex(const cVector3f &avPos, const cColor &aCol) {
136 pos = avPos;
137 col = aCol;
138 }
139
140 cVector3f pos;
141 cVector3f tex;
142 cVector3f tan;
143 cVector3f norm;
144 cColor col;
145};
146
149
151typedef tVertexVec::iterator tVertexVecIt;
152} // namespace hpl
153
154#endif // HPL_GRAPHICSTYPES_H
cKeyFrame * * iterator
Definition: array.h:54
Definition: list.h:44
Definition: Color.h:37
Definition: GraphicsTypes.h:84
Definition: Quaternion.h:36
Definition: GraphicsTypes.h:107
Definition: GraphicsTypes.h:126
Definition: list_intern.h:54