19 #ifndef _VMAPMANAGER2_H
20 #define _VMAPMANAGER2_H
23 #include <unordered_map>
30 #define MAP_FILENAME_EXTENSION2 ".vmtree"
32 #define FILENAMEBUFFER_SIZE 500
68 typedef std::unordered_map<std::string, ManagedModel>
ModelFileMap;
94 InstanceTreeMap::const_iterator GetMapTree(
uint32 mapId)
const;
98 G3D::Vector3 convertPositionToInternalRep(
float x,
float y,
float z)
const;
99 static std::string getMapFileName(
unsigned int mapId);
104 void InitializeThreadUnsafe(std::unordered_map<
uint32, std::vector<uint32>>
const& mapData);
105 int loadMap(
const char* pBasePath,
unsigned int mapId,
int x,
int y)
override;
107 void unloadMap(
unsigned int mapId,
int x,
int y)
override;
108 void unloadMap(
unsigned int mapId)
override;
110 bool isInLineOfSight(
unsigned int mapId,
float x1,
float y1,
float z1,
float x2,
float y2,
float z2)
override ;
114 bool getObjectHitPos(
unsigned int mapId,
float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
float& rx,
float& ry,
float& rz,
float modifyDist)
override;
115 float getHeight(
unsigned int mapId,
float x,
float y,
float z,
float maxSearchDist)
override;
119 bool getAreaInfo(
unsigned int pMapId,
float x,
float y,
float&
z,
uint32&
flags,
int32& adtId,
int32& rootId,
int32& groupId)
const override;
120 bool GetLiquidLevel(
uint32 pMapId,
float x,
float y,
float z,
uint8 reqLiquidType,
float& level,
float&
floor,
uint32& type)
const override;
122 WorldModel* acquireModelInstance(
const std::string& basepath,
const std::string& filename);
123 void releaseModelInstance(
const std::string& filename);
126 virtual std::string
getDirFileName(
unsigned int mapId,
int ,
int )
const override
128 return getMapFileName(mapId);
130 virtual bool existsMap(
const char* basePath,
unsigned int mapId,
int x,
int y)
override;
132 void getInstanceMapTree(InstanceTreeMap &instanceMapTree);
Definition: VMapManager2.h:73
Definition: VMapManager2.h:78
virtual std::string getDirFileName(unsigned int mapId, int, int) const override
Definition: VMapManager2.h:126
static Vector3int16 floor(const Vector3 &v)
Definition: VMapManager2.h:75
std::unordered_map< uint32, StaticMapTree * > InstanceTreeMap
Definition: VMapManager2.h:67
Definition: VMapManager2.h:54
WorldModel * iModel
Definition: VMapManager2.h:63
Definition: IVMapManager.h:31
std::mutex LoadedModelFilesLock
Definition: VMapManager2.h:86
bool thread_safe_environment
Definition: VMapManager2.h:84
#define bool
Definition: CascPort.h:16
ModelFileMap iLoadedModelFiles
Definition: VMapManager2.h:82
static uint32 GetLiquidFlagsDummy(uint32)
Definition: VMapManager2.h:91
std::unordered_map< std::string, ManagedModel > ModelFileMap
Definition: VMapManager2.h:68
void incRefCount()
Definition: VMapManager2.h:60
Definition: WorldModel.h:106
GetLiquidFlagsFn GetLiquidFlagsPtr
Definition: VMapManager2.h:135
G3D::int16 z
Definition: Vector3int16.h:46
int iRefCount
Definition: VMapManager2.h:64
int32_t int32
Definition: Define.h:146
uint32_t uint32
Definition: Define.h:150
ManagedModel()
Definition: VMapManager2.h:57
G3D::int16 y
Definition: Vector2int16.h:38
Definition: IVMapManager.h:45
int decRefCount()
Definition: VMapManager2.h:61
DisableTypes
Definition: VMapManager2.h:70
#define TC_COMMON_API
Definition: Define.h:116
WorldModel * getModel()
Definition: VMapManager2.h:59
bool processCommand(char *) override
Definition: VMapManager2.h:117
static bool IsVMAPDisabledForDummy(uint32, uint8)
Definition: VMapManager2.h:92
uint8_t uint8
Definition: Define.h:152
Definition: VMapManager2.h:74
uint32_t uint32
Definition: g3dmath.h:168
uint8 flags
Definition: DisableMgr.cpp:44
G3D::int16 x
Definition: Vector2int16.h:37
void setModel(WorldModel *model)
Definition: VMapManager2.h:58
static unsigned short getHeight(const float fx, const float fy, const float fz, const float, const float ics, const float ch, const rcHeightPatch &hp)
Definition: RecastMeshDetail.cpp:203
IsVMAPDisabledForFn IsVMAPDisabledForPtr
Definition: VMapManager2.h:138
Definition: VMapManager2.h:72
InstanceTreeMap iInstanceMapTrees
Definition: VMapManager2.h:83