doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Model_ase.h
Go to the documentation of this file.
1 /*
2 ===========================================================================
3 
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
6 
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
8 
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13 
14 Doom 3 Source Code is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
21 
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
23 
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
25 
26 ===========================================================================
27 */
28 
29 #ifndef __MODEL_ASE_H__
30 #define __MODEL_ASE_H__
31 
32 /*
33 ===============================================================================
34 
35  ASE loader. (3D Studio Max ASCII Export)
36 
37 ===============================================================================
38 */
39 
40 typedef struct {
41  int vertexNum[3];
42  int tVertexNum[3];
44  idVec3 vertexNormals[3];
45  byte vertexColors[3][4];
46 } aseFace_t;
47 
48 typedef struct {
49  int timeValue;
50 
54  int numFaces;
57 
58  idVec3 transform[4]; // applied to normals
59 
66 } aseMesh_t;
67 
68 typedef struct {
69  char name[128];
70  float uOffset, vOffset; // max lets you offset by material without changing texCoords
71  float uTiling, vTiling; // multiply tex coords by this
72  float angle; // in clockwise radians
74 
75 typedef struct {
76  char name[128];
78 
80 
81  // frames are only present with animations
82  idList<aseMesh_t*> frames; // aseMesh_t
83 } aseObject_t;
84 
85 typedef struct aseModel_s {
86  ID_TIME_T timeStamp;
89 } aseModel_t;
90 
91 
92 aseModel_t *ASE_Load( const char *fileName );
93 void ASE_Free( aseModel_t *ase );
94 
95 #endif /* !__MODEL_ASE_H__ */
idList< aseMesh_t * > frames
Definition: Model_ase.h:82
bool normalsParsed
Definition: Model_ase.h:61
aseMesh_t mesh
Definition: Model_ase.h:79
Definition: Vector.h:316
idList< aseMaterial_t * > materials
Definition: Model_ase.h:87
float vTiling
Definition: Model_ase.h:71
void ASE_Free(aseModel_t *ase)
Definition: Model_ase.cpp:857
idList< aseObject_t * > objects
Definition: Model_ase.h:88
aseFace_t * faces
Definition: Model_ase.h:65
int materialRef
Definition: Model_ase.h:77
idVec3 faceNormal
Definition: Model_ase.h:43
Definition: Vector.h:52
idVec3 * cvertexes
Definition: Model_ase.h:64
ID_TIME_T timeStamp
Definition: Model_ase.h:86
int numCVertexes
Definition: Model_ase.h:53
int numTVertexes
Definition: Model_ase.h:52
int numTVFaces
Definition: Model_ase.h:55
float vOffset
Definition: Model_ase.h:70
int numFaces
Definition: Model_ase.h:54
struct aseModel_s aseModel_t
bool colorsParsed
Definition: Model_ase.h:60
float angle
Definition: Model_ase.h:72
idVec2 * tvertexes
Definition: Model_ase.h:63
aseModel_t * ASE_Load(const char *fileName)
Definition: Model_ase.cpp:834
unsigned char byte
Definition: Lib.h:75
const GLcharARB * name
Definition: glext.h:3629
int numCVFaces
Definition: Model_ase.h:56
GLuint GLenum GLenum transform
Definition: glext.h:5179
int numVertexes
Definition: Model_ase.h:51
int timeValue
Definition: Model_ase.h:49
idVec3 * vertexes
Definition: Model_ase.h:62