Axmol Engine 2.4.0-258ceca
|
TerrainData This TerrainData struct warp all parameter that Terrain need to create. More...
#include <Terrain.h>
Public Member Functions | |
TerrainData () | |
empty constructor | |
TerrainData (std::string_view heightMapsrc, std::string_view textureSrc, const Vec2 &chunksize=Vec2(32, 32), float mapHeight=2, float mapScale=0.1) | |
constructor, this constructor construct a simple terrain which only have 1 detailmap | |
TerrainData (std::string_view heightMapsrc, std::string_view alphamap, const DetailMap &detail1, const DetailMap &detail2, const DetailMap &detail3, const DetailMap &detail4, const Vec2 &chunksize=Vec2(32, 32), float mapHeight=2, float mapScale=0.1) | |
constructor, this constructor construct a terrain which have 4 detailmaps, 1 alpha map | |
TerrainData (std::string_view heightMapsrc, std::string_view alphamap, const DetailMap &detail1, const DetailMap &detail2, const DetailMap &detail3, const Vec2 &chunksize=Vec2(32, 32), float mapHeight=2, float mapScale=0.1) | |
constructor, this constructor construct a terrain which have 3 detailmaps, 1 alpha map | |
Public Attributes | |
Vec2 | _chunkSize |
determine the chunk size,chunk is the minimal subdivision of the Terrain | |
std::string | _heightMapSrc |
height Map source path | |
std::string | _alphaMapSrc |
the source path of the alpha map | |
DetailMap | _detailMaps [4] |
detail maps | |
float | _mapHeight |
terrain Maximum height | |
float | _mapScale |
terrain scale factor,you can combine setScale later. | |
int | _detailMapAmount |
the amount of detailmap | |
float | _skirtHeightRatio |
the skirt height ratio, only effect when terrain use skirt to fix crack | |
TerrainData This TerrainData struct warp all parameter that Terrain need to create.