载入中...
搜索中...
未找到
TileMap3D.cpp
浏览该文件的文档.
113 const auto pushBoxTile = [&](float cx, float cz, float topY, float botY, float tu0, float tv0, float tu1, float tv1,
Definition Graphics.h:125
virtual Mesh * newMeshFromArrays(const float *posXYZ, const float *nrmXYZ, const float *uvST, int vertexCount, const uint32_t *indices, int indexCount)=0
Upload a triangle mesh from packed CPU arrays. Owned by Graphics. posXYZ required (vertexCount*3)....
void setWallUV(float u0, float v0, float u1, float v1)
UV sub-rectangle of the atlas used for extruded side walls.
Definition TileMap3D.cpp:68
graphics::Mesh * buildMesh(graphics::Graphics *gfx, map::TileLayer *layer)
Build and upload the terrain mesh from a tile layer.
Definition TileMap3D.cpp:81
void setTint(float r, float g, float b, float a=1.f)
Tint multiplier applied to the whole terrain.
Definition TileMap3D.cpp:74
void setHeightScale(float scale)
World units per unit of tile "height" metadata (default 1).
Definition TileMap3D.cpp:63
void setSideDepth(float depth)
Downward side-wall depth in world units (default 6).
Definition TileMap3D.cpp:58
graphics::Renderable3D * buildRenderable(graphics::Graphics *gfx, map::TileLayer *layer)
Build a scene-ready Renderable3D carrying the extruded terrain. The returned entity is already regist...
Definition TileMap3D.cpp:183
ECS tile layer entity. Script mutates tile GIDs / tileset / draw; TileRenderSystem batch-draws atlas ...
Definition TileLayer.h:32
Definition Hd2dTarget.h:13
uint32_t tileGid(uint32_t raw)
Strip Tiled flip / rotate flags; keep low 28 bits.
Definition TileLayer.h:383