1 | /* |
2 | Open Asset Import Library (assimp) |
3 | ---------------------------------------------------------------------- |
4 | |
5 | Copyright (c) 2006-2017, assimp team |
6 | |
7 | All rights reserved. |
8 | |
9 | Redistribution and use of this software in source and binary forms, |
10 | with or without modification, are permitted provided that the |
11 | following conditions are met: |
12 | |
13 | * Redistributions of source code must retain the above |
14 | copyright notice, this list of conditions and the |
15 | following disclaimer. |
16 | |
17 | * Redistributions in binary form must reproduce the above |
18 | copyright notice, this list of conditions and the |
19 | following disclaimer in the documentation and/or other |
20 | materials provided with the distribution. |
21 | |
22 | * Neither the name of the assimp team, nor the names of its |
23 | contributors may be used to endorse or promote products |
24 | derived from this software without specific prior |
25 | written permission of the assimp team. |
26 | |
27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
28 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
29 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
30 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
31 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
32 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
33 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
34 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
35 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
36 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
37 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
38 | |
39 | ---------------------------------------------------------------------- |
40 | */ |
41 | |
42 | |
43 | // |
44 | //! @file Definition of in-memory structures for the HL2 MDL file format |
45 | // and for the HalfLife text format (SMD) |
46 | // |
47 | // The specification has been taken from various sources on the internet. |
48 | |
49 | |
50 | #ifndef AI_MDLFILEHELPER2_H_INC |
51 | #define AI_MDLFILEHELPER2_H_INC |
52 | |
53 | #include "./../include/assimp/Compiler/pushpack1.h" |
54 | |
55 | namespace Assimp { |
56 | namespace MDL { |
57 | |
58 | // magic bytes used in Half Life 2 MDL models |
59 | #define AI_MDL_MAGIC_NUMBER_BE_HL2a AI_MAKE_MAGIC("IDST") |
60 | #define AI_MDL_MAGIC_NUMBER_LE_HL2a AI_MAKE_MAGIC("TSDI") |
61 | #define AI_MDL_MAGIC_NUMBER_BE_HL2b AI_MAKE_MAGIC("IDSQ") |
62 | #define AI_MDL_MAGIC_NUMBER_LE_HL2b AI_MAKE_MAGIC("QSDI") |
63 | |
64 | // --------------------------------------------------------------------------- |
65 | /** \struct Header_HL2 |
66 | * \brief Data structure for the HL2 main header |
67 | */ |
68 | // --------------------------------------------------------------------------- |
69 | struct { |
70 | //! magic number: "IDST"/"IDSQ" |
71 | char [4]; |
72 | |
73 | //! Version number |
74 | int32_t ; |
75 | |
76 | //! Original file name in pak ? |
77 | char [64]; |
78 | |
79 | //! Length of file name/length of file? |
80 | int32_t ; |
81 | |
82 | //! For viewer, ignored |
83 | aiVector3D ; |
84 | aiVector3D ; |
85 | aiVector3D ; |
86 | |
87 | //! AABB of the model |
88 | aiVector3D ; |
89 | aiVector3D ; |
90 | |
91 | // File flags |
92 | int32_t ; |
93 | |
94 | //! NUmber of bones contained in the file |
95 | int32_t ; |
96 | int32_t ; |
97 | |
98 | //! Number of bone controllers for bone animation |
99 | int32_t ; |
100 | int32_t ; |
101 | |
102 | //! More bounding boxes ... |
103 | int32_t ; |
104 | int32_t ; |
105 | |
106 | //! Animation sequences in the file |
107 | int32_t ; |
108 | int32_t ; |
109 | |
110 | //! Loaded sequences. Ignored |
111 | int32_t ; |
112 | int32_t ; |
113 | |
114 | //! Raw texture data |
115 | int32_t ; |
116 | int32_t ; |
117 | int32_t ; |
118 | |
119 | //! Number of skins (=textures?) |
120 | int32_t ; |
121 | int32_t ; |
122 | int32_t ; |
123 | |
124 | //! Number of parts |
125 | int32_t numbodyparts; |
126 | int32_t bodypartindex; |
127 | |
128 | //! attachable points for gameplay and physics |
129 | int32_t ; |
130 | int32_t ; |
131 | |
132 | //! Table of sound effects associated with the model |
133 | int32_t ; |
134 | int32_t ; |
135 | int32_t ; |
136 | int32_t ; |
137 | |
138 | //! Number of animation transitions |
139 | int32_t ; |
140 | int32_t ; |
141 | } /* PACK_STRUCT */; |
142 | |
143 | #include "./../include/assimp/Compiler/poppack1.h" |
144 | |
145 | } |
146 | } // end namespaces |
147 | |
148 | #endif // ! AI_MDLFILEHELPER2_H_INC |
149 | |