/*-----------------------------------------------------------------------------* | headerfile TLTMesh.h | | | | version 1.00 | | date: (17.04.2007) | | | | author: Michal Švantner | | | | Some structures used for Tiled Terrain | | Writen for Irrlicht engine version 1.3 | *-----------------------------------------------------------------------------*/ #ifndef TLTMESH_H #define TLTMESH_H #include using namespace irr; // dynamic 2d array template class array2d { T** data; u32 w, h; public: array2d() : w(0), h(0) {} array2d(int width, int height) : w(width), h(height) { data = new T*[w]; for(int i=0; i Vertex[4]; }; // structure which holds some data about spot on tiled terrain struct TlTData { f32 Height; core::vector3df Normal; video::SColor Color; }; // structure which is used as meshbuffer for Tiled Terrain struct TlTSector { // position relative to whole mesh of which sector is part in tiles core::vector2d Offset; // dimension of sector in tiles core::dimension2d Size; // array of vertices core::array Vertex; // array of indices core::array Index; // axis aligned bounding box core::aabbox3d BoundingBox; // update texture flag bool UpdateTexture; // update vertices flag bool UpdateVertices; // vissibility flag bool isVissible; }; #endif