TrinityCore
VMAP Namespace Reference

Classes

struct  AreaAndLiquidData
 
struct  AreaInfo
 
struct  GModelRayCallback
 
struct  GroupLocationInfo
 
class  GroupModel
 
struct  GroupModel_Raw
 
class  IVMapManager
 
struct  LocationInfo
 
class  LocationInfoCallback
 
class  ManagedModel
 
class  MapRayCallback
 
struct  MapSpawns
 
struct  MeshTriangle
 
class  ModelInstance
 
struct  ModelMinimalData
 
class  ModelPosition
 
struct  ModelSpawn
 
class  StaticMapTree
 
class  TileAssembler
 
struct  TileFileOpenResult
 
class  TriBoundFunc
 
class  VMapFactory
 
class  VMapManager2
 
class  WModelAreaCallback
 
struct  WModelRayCallBack
 
class  WmoLiquid
 
struct  WMOLiquidHeader
 
class  WorldModel
 
struct  WorldModel_Raw
 

Typedefs

typedef std::unordered_map< uint32, StaticMapTree * > InstanceTreeMap
 
typedef std::unordered_map< std::string, std::weak_ptr< ManagedModel > > ModelFileMap
 
typedef std::deque< MapSpawnsMapData
 

Enumerations

enum class  LoadResult : uint8 {
  Success , FileNotFound , VersionMismatch , ReadFromFileFailed ,
  DisabledInConfig
}
 
enum  DisableTypes { VMAP_DISABLE_AREAFLAG = 0x1 , VMAP_DISABLE_HEIGHT = 0x2 , VMAP_DISABLE_LOS = 0x4 , VMAP_DISABLE_LIQUIDSTATUS = 0x8 }
 
enum class  ModelIgnoreFlags : uint32 { Nothing = 0x00 , M2 = 0x01 }
 
enum  ModelInstanceFlags { MOD_HAS_BOUND = 1 << 0 , MOD_PARENT_SPAWN = 1 << 1 }
 
enum class  ModelFlags : uint32 { None = 0x0 , IsM2 = 0x1 }
 

Functions

bool readChunk (FILE *rf, char *dest, const char *compare, uint32 len)
 
std::string getTileFileName (uint32 mapID, uint32 tileX, uint32 tileY, std::string_view extension)
 
TileFileOpenResult OpenMapTileFile (std::string const &basePath, uint32 mapID, uint32 tileX, uint32 tileY, VMapManager2 *vm)
 
ModelIgnoreFlags operator& (ModelIgnoreFlags left, ModelIgnoreFlags right)
 
bool IntersectTriangle (MeshTriangle const &tri, std::vector< Vector3 >::const_iterator points, G3D::Ray const &ray, float &distance)
 
bool IsInsideOrAboveBound (G3D::AABox const &bounds, const G3D::Point3 &point)
 
 DEFINE_ENUM_FLAG (ModelFlags)
 
static auto OpenFile (boost::filesystem::path const &p, char const *mode)
 

Variables

VMapManager2gVMapManager = nullptr
 
const char VMAP_MAGIC [] = "VMAP_4.D"
 
const char RAW_VMAP_MAGIC [] = "VMAP04D"
 
const char GAMEOBJECT_MODELS [] = "GameObjectModels.dtree"
 

Detailed Description

This is the minimum interface to the VMapMamager.

This is the access point to the VMapManager.

Typedef Documentation

◆ InstanceTreeMap

typedef std::unordered_map<uint32, StaticMapTree*> VMAP::InstanceTreeMap

Definition at line 51 of file VMapManager2.h.

◆ MapData

typedef std::deque<MapSpawns> VMAP::MapData

Definition at line 64 of file TileAssembler.h.

◆ ModelFileMap

typedef std::unordered_map<std::string, std::weak_ptr<ManagedModel> > VMAP::ModelFileMap

Definition at line 52 of file VMapManager2.h.

Enumeration Type Documentation

◆ DisableTypes

Enumerator
VMAP_DISABLE_AREAFLAG 
VMAP_DISABLE_HEIGHT 
VMAP_DISABLE_LOS 
VMAP_DISABLE_LIQUIDSTATUS 

Definition at line 54 of file VMapManager2.h.

◆ LoadResult

enum class VMAP::LoadResult : uint8
strong
Enumerator
Success 
FileNotFound 
VersionMismatch 
ReadFromFileFailed 
DisabledInConfig 

Definition at line 34 of file IVMapManager.h.

◆ ModelFlags

enum class VMAP::ModelFlags : uint32
strong
Enumerator
None 
IsM2 

Definition at line 37 of file WorldModel.h.

◆ ModelIgnoreFlags

enum class VMAP::ModelIgnoreFlags : uint32
strong
Enumerator
Nothing 
M2 

Definition at line 25 of file ModelIgnoreFlags.h.

◆ ModelInstanceFlags

Enumerator
MOD_HAS_BOUND 
MOD_PARENT_SPAWN 

Definition at line 35 of file ModelInstance.h.

Function Documentation

◆ DEFINE_ENUM_FLAG()

VMAP::DEFINE_ENUM_FLAG ( ModelFlags  )

◆ getTileFileName()

std::string VMAP::getTileFileName ( uint32  mapID,
uint32  tileX,
uint32  tileY,
std::string_view  extension 
)

Definition at line 72 of file MapTree.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IntersectTriangle()

bool VMAP::IntersectTriangle ( MeshTriangle const &  tri,
std::vector< Vector3 >::const_iterator  points,
G3D::Ray const &  ray,
float &  distance 
)

Definition at line 34 of file WorldModel.cpp.

+ Here is the caller graph for this function:

◆ IsInsideOrAboveBound()

bool VMAP::IsInsideOrAboveBound ( G3D::AABox const &  bounds,
const G3D::Point3 &  point 
)
inline

Definition at line 419 of file WorldModel.cpp.

+ Here is the caller graph for this function:

◆ OpenFile()

static auto VMAP::OpenFile ( boost::filesystem::path const &  p,
char const *  mode 
)
static

Definition at line 40 of file TileAssembler.cpp.

+ Here is the caller graph for this function:

◆ OpenMapTileFile()

TileFileOpenResult VMAP::OpenMapTileFile ( std::string const &  basePath,
uint32  mapID,
uint32  tileX,
uint32  tileY,
VMapManager2 vm 
)

Definition at line 209 of file MapTree.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator&()

ModelIgnoreFlags VMAP::operator& ( ModelIgnoreFlags  left,
ModelIgnoreFlags  right 
)
inline

Definition at line 31 of file ModelIgnoreFlags.h.

◆ readChunk()

bool VMAP::readChunk ( FILE *  rf,
char *  dest,
const char *  compare,
uint32  len 
)

Definition at line 49 of file VMapManager2.cpp.

+ Here is the caller graph for this function:

Variable Documentation

◆ GAMEOBJECT_MODELS

const char VMAP::GAMEOBJECT_MODELS[] = "GameObjectModels.dtree"

Definition at line 29 of file VMapDefinitions.h.

◆ gVMapManager

VMapManager2* VMAP::gVMapManager = nullptr

Definition at line 23 of file VMapFactory.cpp.

◆ RAW_VMAP_MAGIC

const char VMAP::RAW_VMAP_MAGIC[] = "VMAP04D"

Definition at line 28 of file VMapDefinitions.h.

◆ VMAP_MAGIC

const char VMAP::VMAP_MAGIC[] = "VMAP_4.D"

Definition at line 27 of file VMapDefinitions.h.