18#ifndef _VMAPMANAGER2_H
19#define _VMAPMANAGER2_H
22#include <unordered_map>
29#define MAP_FILENAME_EXTENSION2 ".vmtree"
31#define FILENAMEBUFFER_SIZE 500
67 typedef std::unordered_map<std::string, ManagedModel>
ModelFileMap;
93 InstanceTreeMap::const_iterator GetMapTree(
uint32 mapId)
const;
97 G3D::Vector3 convertPositionToInternalRep(
float x,
float y,
float z)
const;
98 static std::string getMapFileName(
unsigned int mapId);
103 void InitializeThreadUnsafe(
const std::vector<uint32>& mapIds);
104 int loadMap(
char const* pBasePath,
unsigned int mapId,
int x,
int y)
override;
106 void unloadMap(
unsigned int mapId,
int x,
int y)
override;
107 void unloadMap(
unsigned int mapId)
override;
109 bool isInLineOfSight(
unsigned int mapId,
float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
ModelIgnoreFlags ignoreFlags)
override ;
113 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;
114 float getHeight(
unsigned int mapId,
float x,
float y,
float z,
float maxSearchDist)
override;
120 WorldModel* acquireModelInstance(
const std::string& basepath,
const std::string& filename,
uint32 flags = 0);
121 void releaseModelInstance(
const std::string& filename);
124 virtual std::string
getDirFileName(
unsigned int mapId,
int ,
int )
const override
126 return getMapFileName(mapId);
128 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.
void setModel(WorldModel *model)
std::mutex LoadedModelFilesLock
ModelFileMap iLoadedModelFiles
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