TrinityCore
Loading...
Searching...
No Matches
model.h
Go to the documentation of this file.
1
/*
2
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3
*
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License as published by the
6
* Free Software Foundation; either version 2 of the License, or (at your
7
* option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
* more details.
13
*
14
* You should have received a copy of the GNU General Public License along
15
* with this program. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#ifndef MODEL_H
19
#define MODEL_H
20
21
#include "loadlib/loadlib.h"
22
#include "
vec3d.h
"
23
#include "
modelheaders.h
"
24
#include <vector>
25
26
class
MPQFile
;
27
struct
WMODoodadData
;
28
namespace
ADT
{
struct
MDDF;
struct
MODF; }
29
30
Vec3D
fixCoordSystem
(
Vec3D
const
& v);
31
32
class
Model
33
{
34
private
:
35
void
_unload
()
36
{
37
delete
[]
vertices
;
38
delete
[]
indices
;
39
vertices
=
nullptr
;
40
indices
=
nullptr
;
41
}
42
std::string
filename
;
43
public
:
44
ModelHeader
header
;
45
Vec3D
*
vertices
;
46
uint16
*
indices
;
47
48
bool
open
();
49
bool
ConvertToVMAPModel
(
char
const
* outfilename);
50
51
Model
(std::string&
filename
);
52
~Model
() {
_unload
(); }
53
};
54
55
namespace
Doodad
56
{
57
void
Extract
(
ADT::MDDF
const
& doodadDef,
char
const
* ModelInstName,
uint32
mapID,
uint32
tileX,
uint32
tileY, FILE* pDirfile);
58
59
void
ExtractSet
(
WMODoodadData
const
& doodadData,
ADT::MODF
const
& wmo,
uint32
mapID,
uint32
tileX,
uint32
tileY, FILE* pDirfile);
60
}
61
62
#endif
uint16
uint16_t uint16
Definition
Define.h:134
uint32
uint32_t uint32
Definition
Define.h:133
Extract
Extract
Definition
System.cpp:62
MPQFile
Definition
mpq_libmpq.h:73
Model
Definition
model.h:33
Model::vertices
Vec3D * vertices
Definition
model.h:45
Model::header
ModelHeader header
Definition
model.h:44
Model::indices
uint16 * indices
Definition
model.h:46
Model::filename
std::string filename
Definition
model.h:42
Model::open
bool open()
Definition
model.cpp:35
Model::_unload
void _unload()
Definition
model.h:35
Model::~Model
~Model()
Definition
model.h:52
Model::ConvertToVMAPModel
bool ConvertToVMAPModel(char const *outfilename)
Definition
model.cpp:73
Vec3D
Definition
vec3d.h:25
fixCoordSystem
Vec3D fixCoordSystem(Vec3D const &v)
Definition
model.cpp:137
modelheaders.h
ADT
Definition
adtfile.h:27
Doodad
Definition
model.h:56
Doodad::ExtractSet
void ExtractSet(WMODoodadData const &doodadData, ADT::MODF const &wmo, uint32 mapID, uint32 tileX, uint32 tileY, FILE *pDirfile)
Definition
model.cpp:184
ADT::MDDF
Definition
adtfile.h:29
ADT::MODF
Definition
adtfile.h:39
ModelHeader
Definition
modelheaders.h:31
WMODoodadData
Definition
wmo.h:70
vec3d.h
tools
vmap4_extractor
model.h
Generated on Sun May 10 2026 02:30:26 for TrinityCore by
1.9.8