TrinityCore
Loading...
Searching...
No Matches
GridMap Class Reference

#include <Map.h>

Public Member Functions

 GridMap ()
 
 ~GridMap ()
 
bool loadData (char const *filename)
 
void unloadData ()
 
uint16 getArea (float x, float y) const
 
float getHeight (float x, float y) const
 
float getMinHeight (float x, float y) const
 
float getLiquidLevel (float x, float y) const
 
ZLiquidStatus GetLiquidStatus (float x, float y, float z, Optional< uint8 > ReqLiquidType, LiquidData *data=0, float collisionHeight=2.03128f)
 

Private Types

typedef float(GridMap::* GetHeightPtr) (float x, float y) const
 

Private Member Functions

bool loadAreaData (FILE *in, uint32 offset, uint32 size)
 
bool loadHeightData (FILE *in, uint32 offset, uint32 size)
 
bool loadLiquidData (FILE *in, uint32 offset, uint32 size)
 
bool loadHolesData (FILE *in, uint32 offset, uint32 size)
 
bool isHole (int row, int col) const
 
float getHeightFromFloat (float x, float y) const
 
float getHeightFromUint16 (float x, float y) const
 
float getHeightFromUint8 (float x, float y) const
 
float getHeightFromFlat (float x, float y) const
 

Private Attributes

uint32 _flags
 
union { 
 
   float *   m_V9 
 
   uint16 *   m_uint16_V9 
 
   uint8 *   m_uint8_V9 
 
};  
 
union { 
 
   float *   m_V8 
 
   uint16 *   m_uint16_V8 
 
   uint8 *   m_uint8_V8 
 
};  
 
G3D::Plane * _minHeightPlanes
 
float _gridHeight
 
float _gridIntHeightMultiplier
 
uint16_areaMap
 
float _liquidLevel
 
uint16_liquidEntry
 
uint8_liquidFlags
 
float * _liquidMap
 
uint16 _gridArea
 
uint16 _liquidGlobalEntry
 
uint8 _liquidGlobalFlags
 
uint8 _liquidOffX
 
uint8 _liquidOffY
 
uint8 _liquidWidth
 
uint8 _liquidHeight
 
uint16_holes
 
GetHeightPtr _gridGetHeight
 

Detailed Description

Definition at line 154 of file Map.h.

Member Typedef Documentation

◆ GetHeightPtr

typedef float(GridMap::* GridMap::GetHeightPtr) (float x, float y) const
private

Definition at line 197 of file Map.h.

Constructor & Destructor Documentation

◆ GridMap()

GridMap::GridMap ( )

Definition at line 1784 of file Map.cpp.

+ Here is the call graph for this function:

◆ ~GridMap()

GridMap::~GridMap ( )

Definition at line 1811 of file Map.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ getArea()

uint16 GridMap::getArea ( float  x,
float  y 
) const

Definition at line 2048 of file Map.cpp.

+ Here is the caller graph for this function:

◆ getHeight()

float GridMap::getHeight ( float  x,
float  y 
) const
inline

Definition at line 211 of file Map.h.

+ Here is the caller graph for this function:

◆ getHeightFromFlat()

float GridMap::getHeightFromFlat ( float  x,
float  y 
) const
private

Definition at line 2060 of file Map.cpp.

+ Here is the caller graph for this function:

◆ getHeightFromFloat()

float GridMap::getHeightFromFloat ( float  x,
float  y 
) const
private

Definition at line 2065 of file Map.cpp.

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

◆ getHeightFromUint16()

float GridMap::getHeightFromUint16 ( float  x,
float  y 
) const
private

Definition at line 2220 of file Map.cpp.

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

◆ getHeightFromUint8()

float GridMap::getHeightFromUint8 ( float  x,
float  y 
) const
private

Definition at line 2150 of file Map.cpp.

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

◆ getLiquidLevel()

float GridMap::getLiquidLevel ( float  x,
float  y 
) const

Definition at line 2335 of file Map.cpp.

◆ GetLiquidStatus()

ZLiquidStatus GridMap::GetLiquidStatus ( float  x,
float  y,
float  z,
Optional< uint8 ReqLiquidType,
LiquidData data = 0,
float  collisionHeight = 2.03128f 
)
inline

Definition at line 2355 of file Map.cpp.

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

◆ getMinHeight()

float GridMap::getMinHeight ( float  x,
float  y 
) const

Definition at line 2305 of file Map.cpp.

+ Here is the call graph for this function:

◆ isHole()

bool GridMap::isHole ( int  row,
int  col 
) const
private

Definition at line 2290 of file Map.cpp.

+ Here is the caller graph for this function:

◆ loadAreaData()

bool GridMap::loadAreaData ( FILE *  in,
uint32  offset,
uint32  size 
)
private

Definition at line 1894 of file Map.cpp.

+ Here is the caller graph for this function:

◆ loadData()

bool GridMap::loadData ( char const *  filename)

Definition at line 1816 of file Map.cpp.

+ Here is the call graph for this function:

◆ loadHeightData()

bool GridMap::loadHeightData ( FILE *  in,
uint32  offset,
uint32  size 
)
private

Definition at line 1912 of file Map.cpp.

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

◆ loadHolesData()

bool GridMap::loadHolesData ( FILE *  in,
uint32  offset,
uint32  size 
)
private

Definition at line 2036 of file Map.cpp.

+ Here is the caller graph for this function:

◆ loadLiquidData()

bool GridMap::loadLiquidData ( FILE *  in,
uint32  offset,
uint32  size 
)
private

Definition at line 2001 of file Map.cpp.

+ Here is the caller graph for this function:

◆ unloadData()

void GridMap::unloadData ( )

Definition at line 1873 of file Map.cpp.

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

Member Data Documentation

◆ [union]

union { ... } GridMap

◆ [union]

union { ... } GridMap

◆ _areaMap

uint16* GridMap::_areaMap
private

Definition at line 173 of file Map.h.

◆ _flags

uint32 GridMap::_flags
private

Definition at line 156 of file Map.h.

◆ _gridArea

uint16 GridMap::_gridArea
private

Definition at line 180 of file Map.h.

◆ _gridGetHeight

GetHeightPtr GridMap::_gridGetHeight
private

Definition at line 198 of file Map.h.

◆ _gridHeight

float GridMap::_gridHeight
private

Definition at line 169 of file Map.h.

◆ _gridIntHeightMultiplier

float GridMap::_gridIntHeightMultiplier
private

Definition at line 170 of file Map.h.

◆ _holes

uint16* GridMap::_holes
private

Definition at line 188 of file Map.h.

◆ _liquidEntry

uint16* GridMap::_liquidEntry
private

Definition at line 177 of file Map.h.

◆ _liquidFlags

uint8* GridMap::_liquidFlags
private

Definition at line 178 of file Map.h.

◆ _liquidGlobalEntry

uint16 GridMap::_liquidGlobalEntry
private

Definition at line 181 of file Map.h.

◆ _liquidGlobalFlags

uint8 GridMap::_liquidGlobalFlags
private

Definition at line 182 of file Map.h.

◆ _liquidHeight

uint8 GridMap::_liquidHeight
private

Definition at line 186 of file Map.h.

◆ _liquidLevel

float GridMap::_liquidLevel
private

Definition at line 176 of file Map.h.

◆ _liquidMap

float* GridMap::_liquidMap
private

Definition at line 179 of file Map.h.

◆ _liquidOffX

uint8 GridMap::_liquidOffX
private

Definition at line 183 of file Map.h.

◆ _liquidOffY

uint8 GridMap::_liquidOffY
private

Definition at line 184 of file Map.h.

◆ _liquidWidth

uint8 GridMap::_liquidWidth
private

Definition at line 185 of file Map.h.

◆ _minHeightPlanes

G3D::Plane* GridMap::_minHeightPlanes
private

Definition at line 167 of file Map.h.

◆ m_uint16_V8

uint16* GridMap::m_uint16_V8

Definition at line 164 of file Map.h.

◆ m_uint16_V9

uint16* GridMap::m_uint16_V9

Definition at line 159 of file Map.h.

◆ m_uint8_V8

uint8* GridMap::m_uint8_V8

Definition at line 165 of file Map.h.

◆ m_uint8_V9

uint8* GridMap::m_uint8_V9

Definition at line 160 of file Map.h.

◆ m_V8

float* GridMap::m_V8

Definition at line 163 of file Map.h.

◆ m_V9

float* GridMap::m_V9

Definition at line 158 of file Map.h.


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