]> icculus.org git repositories - icculus/iodoom3.git/blob - neo/renderer/Model_ase.h
Use the same OpenAL headers on all platforms.
[icculus/iodoom3.git] / neo / renderer / Model_ase.h
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];
43         idVec3                                  faceNormal;
44         idVec3                                  vertexNormals[3];
45         byte                                    vertexColors[3][4];
46 } aseFace_t;
47
48 typedef struct {
49         int                                             timeValue;
50
51         int                                             numVertexes;
52         int                                             numTVertexes;
53         int                                             numCVertexes;
54         int                                             numFaces;
55         int                                             numTVFaces;
56         int                                             numCVFaces;
57
58         idVec3                                  transform[4];                   // applied to normals
59
60         bool                                    colorsParsed;
61         bool                                    normalsParsed;
62         idVec3 *                                vertexes;
63         idVec2 *                                tvertexes;
64         idVec3 *                                cvertexes;
65         aseFace_t *                             faces;
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
73 } aseMaterial_t;
74
75 typedef struct {
76         char                                    name[128];
77         int                                             materialRef;
78
79         aseMesh_t                               mesh;
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;
87         idList<aseMaterial_t *> materials;
88         idList<aseObject_t *>   objects;
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__ */