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 "
modelheaders.h
"
22
#include <string>
23
#include <vector>
24
#include <cstdio>
// for FILE*
25
26
class
CASCFile
;
27
struct
ADTOutputCache
;
28
struct
WMODoodadData
;
29
namespace
ADT
{
struct
MDDF;
struct
MODF; }
30
31
Vec3D
fixCoordSystem
(
Vec3D
const
& v);
32
33
class
Model
34
{
35
private
:
36
void
_unload
()
37
{
38
delete
[]
vertices
;
39
delete
[]
indices
;
40
vertices
=
nullptr
;
41
indices
=
nullptr
;
42
}
43
std::string
filename
;
44
public
:
45
ModelHeader
header
;
46
Vec3D
*
vertices
;
47
uint32
*
indices
;
48
AaBox3D
bounds
;
49
50
bool
open
();
51
bool
ConvertToVMAPModel
(
char
const
* outfilename);
52
53
Model
(std::string&
filename
);
54
~Model
() {
_unload
(); }
55
};
56
57
namespace
Doodad
58
{
59
void
Extract
(
ADT::MDDF
const
& doodadDef,
char
const
* ModelInstName,
uint32
mapID,
uint32
originalMapId,
60
FILE* pDirfile, std::vector<ADTOutputCache>* dirfileCache);
61
62
void
ExtractSet
(
WMODoodadData
const
& doodadData,
ADT::MODF
const
& wmo,
bool
isGlobalWmo,
uint32
mapID,
uint32
originalMapId,
63
FILE* pDirfile, std::vector<ADTOutputCache>* dirfileCache);
64
}
65
66
#endif
uint32
uint32_t uint32
Definition
Define.h:154
Extract
Extract
Definition
System.cpp:91
AaBox3D
Definition
vec3d.h:60
CASCFile
Definition
cascfile.h:26
Model
Definition
model.h:34
Model::vertices
Vec3D * vertices
Definition
model.h:46
Model::header
ModelHeader header
Definition
model.h:45
Model::filename
std::string filename
Definition
model.h:43
Model::open
bool open()
Definition
model.cpp:37
Model::_unload
void _unload()
Definition
model.h:36
Model::bounds
AaBox3D bounds
Definition
model.h:48
Model::indices
uint32 * indices
Definition
model.h:47
Model::~Model
~Model()
Definition
model.h:54
Model::ConvertToVMAPModel
bool ConvertToVMAPModel(char const *outfilename)
Definition
model.cpp:88
Vec3D
Definition
vec3d.h:22
fixCoordSystem
Vec3D fixCoordSystem(Vec3D const &v)
Definition
model.cpp:155
modelheaders.h
ADT
Definition
adtfile.h:27
Doodad
Definition
model.h:58
Doodad::ExtractSet
void ExtractSet(WMODoodadData const &doodadData, ADT::MODF const &wmo, bool isGlobalWmo, uint32 mapID, uint32 originalMapId, FILE *pDirfile, std::vector< ADTOutputCache > *dirfileCache)
Definition
model.cpp:211
ADTOutputCache
Definition
adtfile.h:54
ADT::MDDF
Definition
adtfile.h:29
ADT::MODF
Definition
adtfile.h:39
ModelHeader
Definition
modelheaders.h:27
WMODoodadData
Definition
wmo.h:71
tools
vmap4_extractor
model.h
Generated on Sun May 10 2026 02:09:16 for TrinityCore by
1.9.8