468 {
469 char blockId[5];
470 blockId[4] = 0;
471 int blocksize;
472 int readOperation = 0;
473
476
477 Vector3 vec1, vec2;
479
482
484
485
491 for (
uint32 b = 0; b < branches; ++b)
492 {
494
496 }
497
498
504 if (nindexes > 0)
505 {
509 for (
uint32 i = 0; i < nindexes; i += 3)
510 {
511 triangles.push_back(MeshTriangle(indexarray[i], indexarray[i + 1], indexarray[i + 2]));
512 }
513
514 delete[] indexarray;
515 }
516
517
523
524 if (nvectors > 0)
525 {
526 float* vectorarray = new float[nvectors * 3];
528 for (
uint32 i = 0; i < nvectors; ++i)
529 {
530 vertexArray.push_back( Vector3(vectorarray + 3 * i));
531 }
532
533 delete[] vectorarray;
534 }
535
538 {
545 {
553 }
554 else
555 {
556 liquid =
new WmoLiquid(0, 0, Vector3::zero(), liquidType);
558 }
559 }
560
561 return true;
562 }
#define READ_OR_RETURN_WITH_DELETE(V, S)
Definition: TileAssembler.cpp:462
#define READ_OR_RETURN(V, S)
Definition: TileAssembler.cpp:460
#define CMP_OR_RETURN(V, S)
Definition: TileAssembler.cpp:464
std::uint32_t uint32
Definition: Define.h:107
std::uint16_t uint16
Definition: Define.h:108
uint32 mogpflags
Definition: TileAssembler.h:68
G3D::AABox bounds
Definition: TileAssembler.h:71
uint32 GroupWMOID
Definition: TileAssembler.h:69
uint32 liquidflags
Definition: TileAssembler.h:72
std::vector< G3D::Vector3 > vertexArray
Definition: TileAssembler.h:74
std::vector< MeshTriangle > triangles
Definition: TileAssembler.h:73
float * GetHeightStorage()
Definition: WorldModel.h:54
uint8 * GetFlagsStorage()
Definition: WorldModel.h:55
float pos_z
Definition: wmo.h:104
float pos_y
Definition: wmo.h:103
int ytiles
Definition: wmo.h:101
int xverts
Definition: wmo.h:101
int yverts
Definition: wmo.h:101
float pos_x
Definition: wmo.h:102
int xtiles
Definition: wmo.h:101