18#ifndef _VMAPMANAGER2_H
19#define _VMAPMANAGER2_H
25#include <unordered_map>
52 typedef std::unordered_map<std::string, std::weak_ptr<ManagedModel>>
ModelFileMap;
76 InstanceTreeMap::const_iterator GetMapTree(
uint32 mapId)
const;
80 G3D::Vector3 convertPositionToInternalRep(
float x,
float y,
float z)
const;
81 static std::string getMapFileName(
unsigned int mapId);
86 void InitializeThreadUnsafe(std::unordered_map<
uint32, std::vector<uint32>>
const& mapData);
88 LoadResult loadMap(
char const* pBasePath,
unsigned int mapId,
int x,
int y)
override;
90 void unloadMap(
unsigned int mapId,
int x,
int y)
override;
92 void unloadMap(
unsigned int mapId)
override;
94 bool isInLineOfSight(
unsigned int mapId,
float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
ModelIgnoreFlags ignoreFlags)
override ;
98 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;
99 float getHeight(
unsigned int mapId,
float x,
float y,
float z,
float maxSearchDist)
override;
105 std::shared_ptr<WorldModel> acquireModelInstance(std::string
const& basepath, std::string
const& filename);
106 void releaseModelInstance(std::string
const& filename);
109 virtual std::string
getDirFileName(
unsigned int mapId,
int ,
int )
const override
111 return getMapFileName(mapId);
113 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, std::weak_ptr< ManagedModel > > ModelFileMap
@ VMAP_DISABLE_LIQUIDSTATUS