TrinityCore
MMAP::MapBuilder Class Reference

#include <MapBuilder.h>

Public Member Functions

 MapBuilder (Optional< float > maxWalkableAngle, Optional< float > maxWalkableAngleNotSteep, bool skipLiquid, bool skipContinents, bool skipJunkMaps, bool skipBattlegrounds, bool debugOutput, bool bigBaseUnit, int mapid, char const *offMeshFilePath, unsigned int threads)
 
 ~MapBuilder ()
 
void buildMeshFromFile (char *name)
 
void buildSingleTile (uint32 mapID, uint32 tileX, uint32 tileY)
 
void buildMaps (Optional< uint32 > mapID)
 

Private Member Functions

void buildMap (uint32 mapID)
 
void discoverTiles ()
 
std::set< uint32 > * getTileList (uint32 mapID)
 
void buildNavMesh (uint32 mapID, dtNavMesh *&navMesh)
 
void getTileBounds (uint32 tileX, uint32 tileY, float *verts, int vertCount, float *bmin, float *bmax) const
 
void getGridBounds (uint32 mapID, uint32 &minX, uint32 &minY, uint32 &maxX, uint32 &maxY)
 
bool shouldSkipMap (uint32 mapID) const
 
bool isTransportMap (uint32 mapID) const
 
bool isDevMap (uint32 mapID) const
 
bool isBattlegroundMap (uint32 mapID) const
 
bool isContinentMap (uint32 mapID) const
 
rcConfig GetMapSpecificConfig (uint32 mapID, float bmin[3], float bmax[3], const TileConfig &tileConfig) const
 
uint32 percentageDone (uint32 totalTiles, uint32 totalTilesDone) const
 
uint32 currentPercentageDone () const
 
void ParseOffMeshConnectionsFile (char const *offMeshFilePath)
 

Private Attributes

TerrainBuilderm_terrainBuilder
 
TileList m_tiles
 
bool m_debugOutput
 
std::vector< OffMeshDatam_offMeshConnections
 
unsigned int m_threads
 
bool m_skipContinents
 
bool m_skipJunkMaps
 
bool m_skipBattlegrounds
 
bool m_skipLiquid
 
Optional< float > m_maxWalkableAngle
 
Optional< float > m_maxWalkableAngleNotSteep
 
bool m_bigBaseUnit
 
int32 m_mapid
 
std::atomic< uint32m_totalTiles
 
std::atomic< uint32m_totalTilesProcessed
 
rcContext * m_rcContext
 
std::vector< TileBuilder * > m_tileBuilders
 
ProducerConsumerQueue< TileInfo_queue
 
std::atomic< bool > _cancelationToken
 

Friends

class TileBuilder
 

Detailed Description

Definition at line 144 of file MapBuilder.h.

Constructor & Destructor Documentation

◆ MapBuilder()

MMAP::MapBuilder::MapBuilder ( Optional< float >  maxWalkableAngle,
Optional< float >  maxWalkableAngleNotSteep,
bool  skipLiquid,
bool  skipContinents,
bool  skipJunkMaps,
bool  skipBattlegrounds,
bool  debugOutput,
bool  bigBaseUnit,
int  mapid,
char const *  offMeshFilePath,
unsigned int  threads 
)

Definition at line 59 of file MapBuilder.cpp.

+ Here is the call graph for this function:

◆ ~MapBuilder()

MMAP::MapBuilder::~MapBuilder ( )

Definition at line 91 of file MapBuilder.cpp.

Member Function Documentation

◆ buildMap()

void MMAP::MapBuilder::buildMap ( uint32  mapID)
private

Definition at line 462 of file MapBuilder.cpp.

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

◆ buildMaps()

void MMAP::MapBuilder::buildMaps ( Optional< uint32 mapID)

Definition at line 272 of file MapBuilder.cpp.

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

◆ buildMeshFromFile()

void MMAP::MapBuilder::buildMeshFromFile ( char *  name)

Definition at line 353 of file MapBuilder.cpp.

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

◆ buildNavMesh()

void MMAP::MapBuilder::buildNavMesh ( uint32  mapID,
dtNavMesh *&  navMesh 
)
private

‍*** calculate number of bits needed to store tiles & polys ***‍/

Definition at line 553 of file MapBuilder.cpp.

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

◆ buildSingleTile()

void MMAP::MapBuilder::buildSingleTile ( uint32  mapID,
uint32  tileX,
uint32  tileY 
)

Definition at line 440 of file MapBuilder.cpp.

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

◆ currentPercentageDone()

uint32 MMAP::MapBuilder::currentPercentageDone ( ) const
private

Definition at line 1147 of file MapBuilder.cpp.

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

◆ discoverTiles()

void MMAP::MapBuilder::discoverTiles ( )
private

Definition at line 113 of file MapBuilder.cpp.

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

◆ getGridBounds()

void MMAP::MapBuilder::getGridBounds ( uint32  mapID,
uint32 minX,
uint32 minY,
uint32 maxX,
uint32 maxY 
)
private

Definition at line 311 of file MapBuilder.cpp.

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

◆ GetMapSpecificConfig()

rcConfig MMAP::MapBuilder::GetMapSpecificConfig ( uint32  mapID,
float  bmin[3],
float  bmax[3],
const TileConfig tileConfig 
) const
private

Definition at line 1090 of file MapBuilder.cpp.

+ Here is the caller graph for this function:

◆ getTileBounds()

void MMAP::MapBuilder::getTileBounds ( uint32  tileX,
uint32  tileY,
float *  verts,
int  vertCount,
float *  bmin,
float *  bmax 
) const
private

Definition at line 976 of file MapBuilder.cpp.

+ Here is the caller graph for this function:

◆ getTileList()

std::set< uint32 > * MMAP::MapBuilder::getTileList ( uint32  mapID)
private

Definition at line 234 of file MapBuilder.cpp.

+ Here is the caller graph for this function:

◆ isBattlegroundMap()

bool MMAP::MapBuilder::isBattlegroundMap ( uint32  mapID) const
private

Definition at line 1039 of file MapBuilder.cpp.

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

◆ isContinentMap()

bool MMAP::MapBuilder::isContinentMap ( uint32  mapID) const
private

Definition at line 1047 of file MapBuilder.cpp.

+ Here is the caller graph for this function:

◆ isDevMap()

bool MMAP::MapBuilder::isDevMap ( uint32  mapID) const
private

Definition at line 1031 of file MapBuilder.cpp.

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

◆ isTransportMap()

bool MMAP::MapBuilder::isTransportMap ( uint32  mapID) const
private

Definition at line 1023 of file MapBuilder.cpp.

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

◆ ParseOffMeshConnectionsFile()

void MMAP::MapBuilder::ParseOffMeshConnectionsFile ( char const *  offMeshFilePath)
private

Definition at line 199 of file MapBuilder.cpp.

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

◆ percentageDone()

uint32 MMAP::MapBuilder::percentageDone ( uint32  totalTiles,
uint32  totalTilesDone 
) const
private

Definition at line 1139 of file MapBuilder.cpp.

+ Here is the caller graph for this function:

◆ shouldSkipMap()

bool MMAP::MapBuilder::shouldSkipMap ( uint32  mapID) const
private

Definition at line 995 of file MapBuilder.cpp.

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

Friends And Related Function Documentation

◆ TileBuilder

friend class TileBuilder
friend

Definition at line 146 of file MapBuilder.h.

Member Data Documentation

◆ _cancelationToken

std::atomic<bool> MMAP::MapBuilder::_cancelationToken
private

Definition at line 224 of file MapBuilder.h.

◆ _queue

ProducerConsumerQueue<TileInfo> MMAP::MapBuilder::_queue
private

Definition at line 223 of file MapBuilder.h.

◆ m_bigBaseUnit

bool MMAP::MapBuilder::m_bigBaseUnit
private

Definition at line 212 of file MapBuilder.h.

◆ m_debugOutput

bool MMAP::MapBuilder::m_debugOutput
private

Definition at line 201 of file MapBuilder.h.

◆ m_mapid

int32 MMAP::MapBuilder::m_mapid
private

Definition at line 214 of file MapBuilder.h.

◆ m_maxWalkableAngle

Optional<float> MMAP::MapBuilder::m_maxWalkableAngle
private

Definition at line 210 of file MapBuilder.h.

◆ m_maxWalkableAngleNotSteep

Optional<float> MMAP::MapBuilder::m_maxWalkableAngleNotSteep
private

Definition at line 211 of file MapBuilder.h.

◆ m_offMeshConnections

std::vector<OffMeshData> MMAP::MapBuilder::m_offMeshConnections
private

Definition at line 203 of file MapBuilder.h.

◆ m_rcContext

rcContext* MMAP::MapBuilder::m_rcContext
private

Definition at line 220 of file MapBuilder.h.

◆ m_skipBattlegrounds

bool MMAP::MapBuilder::m_skipBattlegrounds
private

Definition at line 207 of file MapBuilder.h.

◆ m_skipContinents

bool MMAP::MapBuilder::m_skipContinents
private

Definition at line 205 of file MapBuilder.h.

◆ m_skipJunkMaps

bool MMAP::MapBuilder::m_skipJunkMaps
private

Definition at line 206 of file MapBuilder.h.

◆ m_skipLiquid

bool MMAP::MapBuilder::m_skipLiquid
private

Definition at line 208 of file MapBuilder.h.

◆ m_terrainBuilder

TerrainBuilder* MMAP::MapBuilder::m_terrainBuilder
private

Definition at line 198 of file MapBuilder.h.

◆ m_threads

unsigned int MMAP::MapBuilder::m_threads
private

Definition at line 204 of file MapBuilder.h.

◆ m_tileBuilders

std::vector<TileBuilder*> MMAP::MapBuilder::m_tileBuilders
private

Definition at line 222 of file MapBuilder.h.

◆ m_tiles

TileList MMAP::MapBuilder::m_tiles
private

Definition at line 199 of file MapBuilder.h.

◆ m_totalTiles

std::atomic<uint32> MMAP::MapBuilder::m_totalTiles
private

Definition at line 216 of file MapBuilder.h.

◆ m_totalTilesProcessed

std::atomic<uint32> MMAP::MapBuilder::m_totalTilesProcessed
private

Definition at line 217 of file MapBuilder.h.


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