mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
* from https://www.codefactor.io/repository/github/azerothcore/azerothcore-wotlk/issues?category=Style&groupId=838&lang=5&page=75
55 lines
1.1 KiB
C++
55 lines
1.1 KiB
C++
/*
|
|
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2
|
|
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
|
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
|
*/
|
|
|
|
#ifndef MODEL_H
|
|
#define MODEL_H
|
|
|
|
#include "loadlib/loadlib.h"
|
|
#include "vec3d.h"
|
|
#include "modelheaders.h"
|
|
#include <vector>
|
|
|
|
class MPQFile;
|
|
|
|
Vec3D fixCoordSystem(Vec3D v);
|
|
|
|
class Model
|
|
{
|
|
private:
|
|
void _unload()
|
|
{
|
|
delete[] vertices;
|
|
delete[] indices;
|
|
vertices = nullptr;
|
|
indices = nullptr;
|
|
}
|
|
std::string filename;
|
|
public:
|
|
ModelHeader header;
|
|
Vec3D* vertices;
|
|
uint16* indices;
|
|
|
|
bool open();
|
|
bool ConvertToVMAPModel(char const* outfilename);
|
|
|
|
Model(std::string& filename);
|
|
~Model() { _unload(); }
|
|
};
|
|
|
|
class ModelInstance
|
|
{
|
|
public:
|
|
uint32 id{0};
|
|
Vec3D pos, rot;
|
|
uint16 scale{0}, flags{0};
|
|
float sc{0.0f};
|
|
|
|
ModelInstance() {}
|
|
ModelInstance(MPQFile& f, char const* ModelInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE* pDirfile);
|
|
};
|
|
|
|
#endif
|