![]() |
TrinityCore
|
#include <VMapManager.h>
Public Types | |
| typedef uint32(* | GetLiquidFlagsFn) (uint32 liquidType) |
| typedef bool(* | IsVMAPDisabledForFn) (uint32 entry, uint8 flags) |
Public Member Functions | |
| VMapManager () | |
| VMapManager (VMapManager const &)=delete | |
| VMapManager (VMapManager &&)=delete | |
| VMapManager & | operator= (VMapManager const &)=delete |
| VMapManager & | operator= (VMapManager &&)=delete |
| ~VMapManager () | |
| void | InitializeThreadUnsafe (std::unordered_map< uint32, std::vector< uint32 > > const &mapData) |
| void | InitializeThreadUnsafe (uint32 mapId, int32 parentMapId) |
| void | setEnableLineOfSightCalc (bool enableLineOfSightCalc) |
| void | setEnableHeightCalc (bool enableHeightCalc) |
| bool | isLineOfSightCalcEnabled () const |
| bool | isHeightCalcEnabled () const |
| bool | isMapLoadingEnabled () const |
| LoadResult | loadMap (std::string const &basePath, uint32 mapId, uint32 x, uint32 y) |
| void | unloadMap (uint32 mapId, uint32 x, uint32 y) |
| void | unloadMap (uint32 mapId) |
| bool | isInLineOfSight (uint32 mapId, float x1, float y1, float z1, float x2, float y2, float z2, ModelIgnoreFlags ignoreFlags) |
| bool | getObjectHitPos (uint32 mapId, float x1, float y1, float z1, float x2, float y2, float z2, float &rx, float &ry, float &rz, float modifyDist) |
| float | getHeight (uint32 mapId, float x, float y, float z, float maxSearchDist) |
| bool | getAreaAndLiquidData (uint32 mapId, float x, float y, float z, Optional< uint8 > reqLiquidType, AreaAndLiquidData &data) const |
| std::shared_ptr< WorldModel > | acquireModelInstance (std::string const &basepath, std::string const &filename) |
| void | releaseModelInstance (std::string const &filename) |
| LoadResult | existsMap (std::string const &basePath, uint32 mapId, uint32 x, uint32 y) |
| std::span< ModelInstance const > | getModelsOnMap (uint32 mapId) const |
| int32 | getParentMapId (uint32 mapId) const |
Static Public Member Functions | |
| static std::string | getMapFileName (uint32 mapId) |
| static std::string | getTileFileName (uint32 mapID, uint32 tileX, uint32 tileY, std::string_view extension) |
| static std::string | getDirFileName (uint32 mapId, uint32 x, uint32 y) |
Public Attributes | |
| GetLiquidFlagsFn | GetLiquidFlagsPtr |
| IsVMAPDisabledForFn | IsVMAPDisabledForPtr |
| bool | LoadPathOnlyModels |
Protected Member Functions | |
| InstanceTreeMap::const_iterator | GetMapTree (uint32 mapId) const |
Protected Attributes | |
| bool | iEnableLineOfSightCalc |
| bool | iEnableHeightCalc |
| bool | thread_safe_environment |
| ModelFileMap | iLoadedModelFiles |
| InstanceTreeMap | iInstanceMapTrees |
| std::unordered_map< uint32, uint32 > | iParentMapData |
| std::mutex | LoadedModelFilesLock |
Definition at line 99 of file VMapManager.h.
Definition at line 180 of file VMapManager.h.
Definition at line 183 of file VMapManager.h.
| VMAP::VMapManager::VMapManager | ( | ) |
Definition at line 58 of file VMapManager.cpp.
|
delete |
|
delete |
|
default |
| std::shared_ptr< WorldModel > VMAP::VMapManager::acquireModelInstance | ( | std::string const & | basepath, |
| std::string const & | filename | ||
| ) |
Critical section, thread safe access to iLoadedModelFiles
Definition at line 271 of file VMapManager.cpp.
Here is the caller graph for this function:| LoadResult VMAP::VMapManager::existsMap | ( | std::string const & | basePath, |
| uint32 | mapId, | ||
| uint32 | x, | ||
| uint32 | y | ||
| ) |
| bool VMAP::VMapManager::getAreaAndLiquidData | ( | uint32 | mapId, |
| float | x, | ||
| float | y, | ||
| float | z, | ||
| Optional< uint8 > | reqLiquidType, | ||
| AreaAndLiquidData & | data | ||
| ) | const |
Query world model area info.
Definition at line 242 of file VMapManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| float VMAP::VMapManager::getHeight | ( | uint32 | mapId, |
| float | x, | ||
| float | y, | ||
| float | z, | ||
| float | maxSearchDist | ||
| ) |
get height or INVALID_HEIGHT if no height available
Definition at line 223 of file VMapManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 111 of file VMapManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
| std::span< ModelInstance const > VMAP::VMapManager::getModelsOnMap | ( | uint32 | mapId | ) | const |
Definition at line 313 of file VMapManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| bool VMAP::VMapManager::getObjectHitPos | ( | uint32 | mapId, |
| float | x1, | ||
| float | y1, | ||
| float | z1, | ||
| float | x2, | ||
| float | y2, | ||
| float | z2, | ||
| float & | rx, | ||
| float & | ry, | ||
| float & | rz, | ||
| float | modifyDist | ||
| ) |
test if we hit an object. return true if we hit one. rx, ry, rz will hold the hit position or the dest position, if no intersection was found return a position, that is modifyDist closer to the origin
get the hit position and return true if we hit something otherwise the result pos will be the dest pos
Definition at line 193 of file VMapManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 116 of file VMapManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 93 of file VMapManager.cpp.
|
inline |
| bool VMAP::VMapManager::isInLineOfSight | ( | uint32 | mapId, |
| float | x1, | ||
| float | y1, | ||
| float | z1, | ||
| float | x2, | ||
| float | y2, | ||
| float | z2, | ||
| ModelIgnoreFlags | ignoreFlags | ||
| ) |
|
inline |
|
inline |
| LoadResult VMAP::VMapManager::loadMap | ( | std::string const & | basePath, |
| uint32 | mapId, | ||
| uint32 | x, | ||
| uint32 | y | ||
| ) |
Definition at line 121 of file VMapManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
delete |
|
delete |
| void VMAP::VMapManager::releaseModelInstance | ( | std::string const & | filename | ) |
Critical section, thread safe access to iLoadedModelFiles
Definition at line 296 of file VMapManager.cpp.
Here is the caller graph for this function:
|
inline |
Enable/disable model height calculation It is enabled by default. If it is enabled in mid game the maps have to loaded manualy
Definition at line 141 of file VMapManager.h.
Here is the caller graph for this function:
|
inline |
Enable/disable LOS calculation It is enabled by default. If it is enabled in mid game the maps have to loaded manualy
Definition at line 135 of file VMapManager.h.
Here is the caller graph for this function:| void VMAP::VMapManager::unloadMap | ( | uint32 | mapId | ) |
Definition at line 161 of file VMapManager.cpp.
| GetLiquidFlagsFn VMAP::VMapManager::GetLiquidFlagsPtr |
Definition at line 181 of file VMapManager.h.
|
protected |
Definition at line 103 of file VMapManager.h.
|
protected |
Definition at line 102 of file VMapManager.h.
|
protected |
Definition at line 107 of file VMapManager.h.
|
protected |
Definition at line 106 of file VMapManager.h.
Definition at line 108 of file VMapManager.h.
| IsVMAPDisabledForFn VMAP::VMapManager::IsVMAPDisabledForPtr |
Definition at line 184 of file VMapManager.h.
|
protected |
Definition at line 110 of file VMapManager.h.
| bool VMAP::VMapManager::LoadPathOnlyModels |
Definition at line 186 of file VMapManager.h.
|
protected |
Definition at line 104 of file VMapManager.h.