19 #ifndef _MMAP_TERRAIN_BUILDER_H
20 #define _MMAP_TERRAIN_BUILDER_H
91 static void transform(std::vector<G3D::Vector3> &original, std::vector<G3D::Vector3> &transformed,
102 void getLoopVars(
Spot portion,
int &loopStart,
int &loopEnd,
int &loopInc);
111 void getHeightCoord(
int index,
Grid grid,
float xOffset,
float yOffset,
float* coord,
float* v);
120 void getLiquidCoord(
int index,
int index2,
float xOffset,
float yOffset,
float* coord,
float* v);
Definition: TerrainBuilder.h:43
Definition: TerrainBuilder.h:35
void getHeightCoord(int index, Grid grid, float xOffset, float yOffset, float *coord, float *v)
Get the vector coordinate for a specific position.
Definition: TerrainBuilder.cpp:526
Definition: TerrainBuilder.h:34
bool usesLiquids()
Definition: TerrainBuilder.h:88
Definition: TerrainBuilder.h:78
void loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData &meshData)
Definition: TerrainBuilder.cpp:122
static void cleanVertices(G3D::Array< float > &verts, G3D::Array< int > &tris)
Definition: TerrainBuilder.cpp:838
~TerrainBuilder()
Definition: TerrainBuilder.cpp:86
bool loadHeightMap(uint32 mapID, uint32 tileX, uint32 tileY, G3D::Array< float > &vertices, G3D::Array< int > &triangles, Spot portion)
Load the map terrain from file.
static const int V8_SIZE
Definition: TerrainBuilder.h:48
G3D::Array< unsigned char > offMeshConnectionDirs
Definition: TerrainBuilder.h:73
G3D::Array< unsigned short > offMeshConnectionsFlags
Definition: TerrainBuilder.h:75
Definition: TerrainBuilder.h:42
static const int V9_SIZE_SQ
Definition: TerrainBuilder.h:47
bool isHole(int square, uint8 const holes[16][16][8])
Determines if the specific position's triangles should be rendered.
Definition: TerrainBuilder.cpp:603
G3D::Array< float > offMeshConnectionRads
Definition: TerrainBuilder.h:72
Definition: MMapFactory.cpp:22
G3D::Array< int > liquidTris
Definition: TerrainBuilder.h:67
G3D::Array< uint8 > liquidType
Definition: TerrainBuilder.h:68
Definition: TerrainBuilder.h:37
G3D::Array< int > solidTris
Definition: TerrainBuilder.h:64
bool m_skipLiquid
Controls whether liquids are loaded.
Definition: TerrainBuilder.h:105
void getLiquidCoord(int index, int index2, float xOffset, float yOffset, float *coord, float *v)
Get the liquid vector coordinate for a specific position.
Definition: TerrainBuilder.cpp:593
bool loadVMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData &meshData)
Definition: TerrainBuilder.cpp:627
G3D::Array< float > liquidVerts
Definition: TerrainBuilder.h:66
uint8 getLiquidType(int square, const uint8 liquid_type[16][16])
Get the liquid type for a specific position.
Definition: TerrainBuilder.cpp:616
static const float INVALID_MAP_LIQ_HEIGHT_MAX
Definition: TerrainBuilder.h:55
static void transform(std::vector< G3D::Vector3 > &original, std::vector< G3D::Vector3 > &transformed, float scale, G3D::Matrix3 &rotation, G3D::Vector3 &position)
Definition: TerrainBuilder.cpp:783
static const int V9_SIZE
Definition: TerrainBuilder.h:46
uint32_t uint32
Definition: Define.h:150
double square(double fValue)
Definition: g3dmath.h:698
Definition: TerrainBuilder.h:33
void getLoopVars(Spot portion, int &loopStart, int &loopEnd, int &loopInc)
Sets loop variables for selecting only certain parts of a map's terrain.
Definition: TerrainBuilder.cpp:89
static void copyVertices(std::vector< G3D::Vector3 > &source, G3D::Array< float > &dest)
Definition: TerrainBuilder.cpp:796
Spot
Definition: TerrainBuilder.h:31
static const float INVALID_MAP_LIQ_HEIGHT
Definition: TerrainBuilder.h:54
G3D::Array< float > solidVerts
Definition: TerrainBuilder.h:63
G3D::Array< float > offMeshConnections
Definition: TerrainBuilder.h:71
void loadOffMeshConnections(uint32 mapID, uint32 tileX, uint32 tileY, MeshData &meshData, const char *offMeshFilePath)
Definition: TerrainBuilder.cpp:881
Definition: TerrainBuilder.h:61
uint8_t uint8
Definition: Define.h:152
Definition: TerrainBuilder.h:36
static const int V8_SIZE_SQ
Definition: TerrainBuilder.h:49
G3D::Array< unsigned char > offMeshConnectionsAreas
Definition: TerrainBuilder.h:74
static const float GRID_PART_SIZE
Definition: TerrainBuilder.h:51
static const float GRID_SIZE
Definition: TerrainBuilder.h:50
static void copyIndices(std::vector< VMAP::MeshTriangle > &source, G3D::Array< int > &dest, int offest, bool flip)
Definition: TerrainBuilder.cpp:807
void getHeightTriangle(int square, Spot triangle, int *indices, bool liquid=false)
Get the triangle's vector indices for a specific position.
Definition: TerrainBuilder.cpp:546