18#ifndef _VMAPMANAGER2_H
19#define _VMAPMANAGER2_H
22#include <unordered_map>
29#define MAP_FILENAME_EXTENSION2 ".vmtree"
31#define FILENAMEBUFFER_SIZE 500
55 typedef std::unordered_map<std::string, ManagedModel*>
ModelFileMap;
79 InstanceTreeMap::const_iterator GetMapTree(
uint32 mapId)
const;
83 G3D::Vector3 convertPositionToInternalRep(
float x,
float y,
float z)
const;
84 static std::string getMapFileName(
unsigned int mapId);
89 void InitializeThreadUnsafe(std::unordered_map<
uint32, std::vector<uint32>>
const& mapData);
91 LoadResult loadMap(
char const* pBasePath,
unsigned int mapId,
int x,
int y)
override;
93 void unloadMap(
unsigned int mapId,
int x,
int y)
override;
95 void unloadMap(
unsigned int mapId)
override;
97 bool isInLineOfSight(
unsigned int mapId,
float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
ModelIgnoreFlags ignoreFlags)
override ;
101 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;
102 float getHeight(
unsigned int mapId,
float x,
float y,
float z,
float maxSearchDist)
override;
108 WorldModel* acquireModelInstance(std::string
const& basepath, std::string
const& filename);
109 void releaseModelInstance(std::string
const& filename);
112 virtual std::string
getDirFileName(
unsigned int mapId,
int ,
int )
const override
114 return getMapFileName(mapId);
116 virtual LoadResult existsMap(
char const* basePath,
unsigned int mapId,
int x,
int y)
override;
std::optional< T > Optional
Optional helper class to wrap optional values within.
std::mutex LoadedModelFilesLock
ModelFileMap iLoadedModelFiles
std::unordered_map< uint32, uint32 > iParentMapData
IsVMAPDisabledForFn IsVMAPDisabledForPtr
static bool IsVMAPDisabledForDummy(uint32, uint8)
bool thread_safe_environment
bool processCommand(char *) override
virtual std::string getDirFileName(unsigned int mapId, int, int) const override
InstanceTreeMap iInstanceMapTrees
GetLiquidFlagsFn GetLiquidFlagsPtr
static uint32 GetLiquidFlagsDummy(uint32)
std::unordered_map< uint32, StaticMapTree * > InstanceTreeMap
std::unordered_map< std::string, ManagedModel * > ModelFileMap
@ VMAP_DISABLE_LIQUIDSTATUS