AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
VMAP::VMapMgr2 Class Reference

#include "VMapMgr2.h"

Inheritance diagram for VMAP::VMapMgr2:
VMAP::IVMapMgr

Public Types

typedef uint32(* GetLiquidFlagsFn) (uint32 liquidType)
 
typedef bool(* IsVMAPDisabledForFn) (uint32 entry, uint8 flags)
 

Public Member Functions

 VMapMgr2 ()
 
 ~VMapMgr2 () override
 
bool processCommand (char *) override
 
std::string getDirFileName (unsigned int mapId, int, int) const override
 
LoadResult existsMap (const char *basePath, unsigned int mapId, int x, int y) override
 
- Public Member Functions inherited from VMAP::IVMapMgr
 IVMapMgr ()
 
virtual ~IVMapMgr ()=default
 
void setEnableLineOfSightCalc (bool pVal)
 
void setEnableHeightCalc (bool pVal)
 
bool isLineOfSightCalcEnabled () const
 
bool isHeightCalcEnabled () const
 
bool isMapLoadingEnabled () const
 

Static Public Member Functions

static G3D::Vector3 convertPositionToInternalRep (float x, float y, float z)
 
static std::string getMapFileName (unsigned int mapId)
 

Public Attributes

GetLiquidFlagsFn GetLiquidFlagsPtr
 
IsVMAPDisabledForFn IsVMAPDisabledForPtr
 

Static Protected Member Functions

static uint32 GetLiquidFlagsDummy (uint32)
 
static bool IsVMAPDisabledForDummy (uint32, uint8)
 

Detailed Description

Member Typedef Documentation

◆ GetLiquidFlagsFn

typedef uint32(* VMAP::VMapMgr2::GetLiquidFlagsFn) (uint32 liquidType)

◆ IsVMAPDisabledForFn

typedef bool(* VMAP::VMapMgr2::IsVMAPDisabledForFn) (uint32 entry, uint8 flags)

Constructor & Destructor Documentation

◆ VMapMgr2()

VMAP::VMapMgr2::VMapMgr2 ( )
32 {
35 }
static uint32 GetLiquidFlagsDummy(uint32)
Definition VMapMgr2.h:57
IsVMAPDisabledForFn IsVMAPDisabledForPtr
Definition VMapMgr2.h:81
static bool IsVMAPDisabledForDummy(uint32, uint8)
Definition VMapMgr2.h:58
GetLiquidFlagsFn GetLiquidFlagsPtr
Definition VMapMgr2.h:78

References GetLiquidFlagsDummy(), GetLiquidFlagsPtr, IsVMAPDisabledForDummy(), and IsVMAPDisabledForPtr.

◆ ~VMapMgr2()

VMAP::VMapMgr2::~VMapMgr2 ( )
override
38 {
39 }

Member Function Documentation

◆ convertPositionToInternalRep()

Vector3 VMAP::VMapMgr2::convertPositionToInternalRep ( float  x,
float  y,
float  z 
)
static
42 {
43 Vector3 pos;
44 const float mid = 0.5f * MAX_NUMBER_OF_GRIDS * SIZE_OF_GRIDS;
45 pos.x = mid - x;
46 pos.y = mid - y;
47 pos.z = z;
48
49 return pos;
50 }
#define SIZE_OF_GRIDS
Definition MapDefines.h:26
#define MAX_NUMBER_OF_GRIDS
Definition MapDefines.h:24

References MAX_NUMBER_OF_GRIDS, and SIZE_OF_GRIDS.

Referenced by StaticVMapCollisionData::GetAreaAndLiquidData(), StaticVMapCollisionData::getHeight(), StaticVMapCollisionData::GetObjectHitPos(), and StaticVMapCollisionData::isInLineOfSight().

◆ existsMap()

LoadResult VMAP::VMapMgr2::existsMap ( const char *  basePath,
unsigned int  mapId,
int  x,
int  y 
)
overridevirtual

Implements VMAP::IVMapMgr.

63 {
64 return StaticMapTree::CanLoadMap(std::string(basePath), mapId, x, y);
65 }
static LoadResult CanLoadMap(const std::string &basePath, uint32 mapID, uint32 tileX, uint32 tileY)
Definition MapTree.cpp:216

References VMAP::StaticMapTree::CanLoadMap().

◆ getDirFileName()

std::string VMAP::VMapMgr2::getDirFileName ( unsigned int  mapId,
int  ,
int   
) const
inlineoverridevirtual

Implements VMAP::IVMapMgr.

72 {
73 return getMapFileName(mapId);
74 }
static std::string getMapFileName(unsigned int mapId)
Definition VMapMgr2.cpp:53

References getMapFileName().

◆ GetLiquidFlagsDummy()

static uint32 VMAP::VMapMgr2::GetLiquidFlagsDummy ( uint32  )
inlinestaticprotected
57{ return 0; }

Referenced by VMapMgr2().

◆ getMapFileName()

std::string VMAP::VMapMgr2::getMapFileName ( unsigned int  mapId)
static
54 {
55 std::stringstream fname;
56 fname.width(3);
57 fname << std::setfill('0') << mapId << std::string(MAP_FILENAME_EXTENSION2);
58
59 return fname.str();
60 }
#define MAP_FILENAME_EXTENSION2
Definition VMapMgr2.h:25

References MAP_FILENAME_EXTENSION2.

Referenced by VMAP::StaticMapTree::CanLoadMap(), getDirFileName(), MMAP::TerrainBuilder::loadVMap(), and MapCollisionData::MapCollisionData().

◆ IsVMAPDisabledForDummy()

static bool VMAP::VMapMgr2::IsVMAPDisabledForDummy ( uint32  ,
uint8   
)
inlinestaticprotected
58{ return false; }

Referenced by VMapMgr2().

◆ processCommand()

bool VMAP::VMapMgr2::processCommand ( char *  pCommand)
inlineoverridevirtual

send debug commands

Implements VMAP::IVMapMgr.

68{ return false; } // for debug and extensions

Member Data Documentation

◆ GetLiquidFlagsPtr

GetLiquidFlagsFn VMAP::VMapMgr2::GetLiquidFlagsPtr

◆ IsVMAPDisabledForPtr

IsVMAPDisabledForFn VMAP::VMapMgr2::IsVMAPDisabledForPtr

The documentation for this class was generated from the following files: