18#ifndef _MMAP_TERRAIN_BUILDER_H
19#define _MMAP_TERRAIN_BUILDER_H
25#include <G3D/Vector3.h>
26#include <G3D/Matrix3.h>
92 static void transform(std::vector<G3D::Vector3> &original, std::vector<G3D::Vector3> &transformed,
93 float scale, G3D::Matrix3 &rotation, G3D::Vector3 &position);
94 static void copyVertices(std::vector<G3D::Vector3> &source, G3D::Array<float> &dest);
95 static void copyIndices(std::vector<VMAP::MeshTriangle> &source, G3D::Array<int> &dest,
int offest,
bool flip);
96 static void copyIndices(G3D::Array<int> &src, G3D::Array<int> &dest,
int offset);
97 static void cleanVertices(G3D::Array<float> &verts, G3D::Array<int> &tris);
103 void getLoopVars(
Spot portion,
int &loopStart,
int &loopEnd,
int &loopInc);
109 void getHeightCoord(
int index,
Grid grid,
float xOffset,
float yOffset,
float* coord,
float* v);
118 void getLiquidCoord(
int index,
int index2,
float xOffset,
float yOffset,
float* coord,
float* v);
uint16 holes[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID]
void loadOffMeshConnections(uint32 mapID, uint32 tileX, uint32 tileY, MeshData &meshData, char const *offMeshFilePath)
TerrainBuilder(TerrainBuilder const &tb)=delete
bool isHole(int square, const uint16 holes[16][16])
Determines if the specific position's triangles should be rendered.
static void copyVertices(std::vector< G3D::Vector3 > &source, G3D::Array< float > &dest)
uint8 getLiquidType(int square, const uint8 liquid_type[16][16])
Get the liquid type for a specific position.
static void transform(std::vector< G3D::Vector3 > &original, std::vector< G3D::Vector3 > &transformed, float scale, G3D::Matrix3 &rotation, G3D::Vector3 &position)
static void cleanVertices(G3D::Array< float > &verts, G3D::Array< int > &tris)
static void copyIndices(std::vector< VMAP::MeshTriangle > &source, G3D::Array< int > &dest, int offest, bool flip)
bool m_skipLiquid
Controls whether liquids are loaded.
void getHeightTriangle(int square, Spot triangle, int *indices, bool liquid=false)
Get the triangle's vector indices for a specific position.
void loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData &meshData)
void getLiquidCoord(int index, int index2, float xOffset, float yOffset, float *coord, float *v)
Get the liquid vector coordinate for a specific position.
bool loadVMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData &meshData)
void getHeightCoord(int index, Grid grid, float xOffset, float yOffset, float *coord, float *v)
Get the vector coordinate for a specific position.
void getLoopVars(Spot portion, int &loopStart, int &loopEnd, int &loopInc)
Sets loop variables for selecting only certain parts of a map's terrain.
static const float GRID_SIZE
static const float INVALID_MAP_LIQ_HEIGHT_MAX
static const float GRID_PART_SIZE
static const float INVALID_MAP_LIQ_HEIGHT
static const int V9_SIZE_SQ
static const int V8_SIZE_SQ
G3D::Array< float > liquidVerts
G3D::Array< float > offMeshConnectionRads
G3D::Array< unsigned char > offMeshConnectionDirs
G3D::Array< float > offMeshConnections
G3D::Array< unsigned short > offMeshConnectionsFlags
G3D::Array< float > solidVerts
G3D::Array< int > liquidTris
G3D::Array< int > solidTris
G3D::Array< unsigned char > offMeshConnectionsAreas
G3D::Array< uint8 > liquidType