#include <WorldModel.h>
107 iHeight =
new float[(width+1)*(height+1)];
float * iHeight
(tilesX + 1)*(tilesY + 1) height values
Definition: WorldModel.h:68
uint8 * iFlags
info if liquid tile is used
Definition: WorldModel.h:69
G3D::Vector3 iCorner
the lower corner
Definition: WorldModel.h:66
uint32 iTilesX
number of tiles in x direction, each
Definition: WorldModel.h:64
uint32 iType
liquid type
Definition: WorldModel.h:67
uint8_t uint8
Definition: Define.h:152
uint32 iTilesY
Definition: WorldModel.h:65
float * iHeight
(tilesX + 1)*(tilesY + 1) height values
Definition: WorldModel.h:68
uint8 * iFlags
info if liquid tile is used
Definition: WorldModel.h:69
VMAP::WmoLiquid::~WmoLiquid |
( |
| ) |
|
float * iHeight
(tilesX + 1)*(tilesY + 1) height values
Definition: WorldModel.h:68
uint8 * iFlags
info if liquid tile is used
Definition: WorldModel.h:69
VMAP::WmoLiquid::WmoLiquid |
( |
| ) |
|
|
inlineprivate |
float * iHeight
(tilesX + 1)*(tilesY + 1) height values
Definition: WorldModel.h:68
arena_t NULL
Definition: jemalloc_internal.h:624
uint8 * iFlags
info if liquid tile is used
Definition: WorldModel.h:69
G3D::Vector3 iCorner
the lower corner
Definition: WorldModel.h:66
uint32 iTilesX
number of tiles in x direction, each
Definition: WorldModel.h:64
uint32 iType
liquid type
Definition: WorldModel.h:67
uint32 iTilesY
Definition: WorldModel.h:65
uint32 VMAP::WmoLiquid::GetFileSize |
( |
| ) |
|
200 return 2 *
sizeof(
uint32) +
uint32 iTilesX
number of tiles in x direction, each
Definition: WorldModel.h:64
uint32 iTilesY
Definition: WorldModel.h:65
uint32_t uint32
Definition: g3dmath.h:168
uint8* VMAP::WmoLiquid::GetFlagsStorage |
( |
| ) |
|
|
inline |
uint8 * iFlags
info if liquid tile is used
Definition: WorldModel.h:69
float* VMAP::WmoLiquid::GetHeightStorage |
( |
| ) |
|
|
inline |
float * iHeight
(tilesX + 1)*(tilesY + 1) height values
Definition: WorldModel.h:68
153 if (tx_f < 0.0f || tx >=
iTilesX)
157 if (ty_f < 0.0f || ty >=
iTilesY)
166 float dx = tx_f - (float)tx;
167 float dy = ty_f - (float)ty;
185 float sx =
iHeight[tx+1 + ty * rowOffset] -
iHeight[tx + ty * rowOffset];
186 float sy = iHeight[tx+1 + (ty+1) * rowOffset] - iHeight[tx+1 + ty * rowOffset];
187 liqHeight = iHeight[tx + ty * rowOffset] + dx * sx + dy * sy;
191 float sx =
iHeight[tx+1 + (ty+1) * rowOffset] -
iHeight[tx + (ty+1) * rowOffset];
192 float sy =
iHeight[tx + (ty+1) * rowOffset] -
iHeight[tx + ty * rowOffset];
193 liqHeight =
iHeight[tx + ty * rowOffset] + dx * sx + dy * sy;
float x
Definition: Vector3.h:62
float * iHeight
(tilesX + 1)*(tilesY + 1) height values
Definition: WorldModel.h:68
uint8 * iFlags
info if liquid tile is used
Definition: WorldModel.h:69
float y
Definition: Vector3.h:62
#define LIQUID_TILE_SIZE
Definition: VMapDefinitions.h:24
G3D::Vector3 iCorner
the lower corner
Definition: WorldModel.h:66
uint32 iTilesX
number of tiles in x direction, each
Definition: WorldModel.h:64
uint32_t uint32
Definition: Define.h:150
uint32 iTilesY
Definition: WorldModel.h:65
uint32_t uint32
Definition: g3dmath.h:168
G3D::Vector3 iCorner
the lower corner
Definition: WorldModel.h:66
uint32 iTilesX
number of tiles in x direction, each
Definition: WorldModel.h:64
uint32 iTilesY
Definition: WorldModel.h:65
uint32 VMAP::WmoLiquid::GetType |
( |
| ) |
const |
|
inline |
uint32 iType
liquid type
Definition: WorldModel.h:67
float * iHeight
(tilesX + 1)*(tilesY + 1) height values
Definition: WorldModel.h:68
uint8 * iFlags
info if liquid tile is used
Definition: WorldModel.h:69
G3D::Vector3 iCorner
the lower corner
Definition: WorldModel.h:66
uint32 iTilesX
number of tiles in x direction, each
Definition: WorldModel.h:64
uint32 iType
liquid type
Definition: WorldModel.h:67
uint8_t uint8
Definition: Define.h:152
uint32 iTilesY
Definition: WorldModel.h:65
bool VMAP::WmoLiquid::readFromFile |
( |
FILE * |
rf, |
|
|
WmoLiquid *& |
liquid |
|
) |
| |
|
static |
230 if (fread(&liquid->iTilesX,
sizeof(
uint32), 1, rf) == 1 &&
231 fread(&liquid->iTilesY,
sizeof(
uint32), 1, rf) == 1 &&
232 fread(&liquid->iCorner,
sizeof(
Vector3), 1, rf) == 1 &&
233 fread(&liquid->iType,
sizeof(
uint32), 1, rf) == 1)
235 uint32 size = (liquid->iTilesX + 1) * (liquid->iTilesY + 1);
236 liquid->iHeight =
new float[size];
237 if (fread(liquid->iHeight,
sizeof(
float), size, rf) == size)
239 size = liquid->iTilesX * liquid->iTilesY;
240 liquid->iFlags =
new uint8[size];
241 result = fread(liquid->iFlags,
sizeof(
uint8), size, rf) == size;
WmoLiquid()
Definition: WorldModel.h:63
uint32_t uint32
Definition: Define.h:150
uint8_t uint8
Definition: Define.h:152
bool VMAP::WmoLiquid::writeToFile |
( |
FILE * |
wf | ) |
|
215 if (fwrite(
iHeight,
sizeof(
float), size, wf) == size)
218 result = fwrite(
iFlags,
sizeof(
uint8), size, wf) == size;
float * iHeight
(tilesX + 1)*(tilesY + 1) height values
Definition: WorldModel.h:68
uint8 * iFlags
info if liquid tile is used
Definition: WorldModel.h:69
G3D::Vector3 iCorner
the lower corner
Definition: WorldModel.h:66
uint32 iTilesX
number of tiles in x direction, each
Definition: WorldModel.h:64
uint32_t uint32
Definition: Define.h:150
uint32 iType
liquid type
Definition: WorldModel.h:67
uint8_t uint8
Definition: Define.h:152
uint32 iTilesY
Definition: WorldModel.h:65
uint8* VMAP::WmoLiquid::iFlags |
|
private |
info if liquid tile is used
float* VMAP::WmoLiquid::iHeight |
|
private |
(tilesX + 1)*(tilesY + 1) height values
uint32 VMAP::WmoLiquid::iTilesX |
|
private |
number of tiles in x direction, each
uint32 VMAP::WmoLiquid::iTilesY |
|
private |
The documentation for this class was generated from the following files: