Cocos2d-x  4.0.0
Public Member Functions | Public Attributes | List of all members
Terrain::TerrainData Struct Reference

*TerrainData *This TerrainData struct warp all parameter that Terrain need to create More...

Public Member Functions

 TerrainData ()
 empty constructor
 
 TerrainData (const std::string &heightMapsrc, const std::string &textureSrc, const Size &chunksize=Size(32, 32), float mapHeight=2, float mapScale=0.1)
 constructor, this constructor construct a simple terrain which only have 1 detailmap
 
 TerrainData (const std::string &heightMapsrc, const std::string &alphamap, const DetailMap &detail1, const DetailMap &detail2, const DetailMap &detail3, const DetailMap &detail4, const Size &chunksize=Size(32, 32), float mapHeight=2, float mapScale=0.1)
 constructor, this constructor construct a terrain which have 4 detailmaps, 1 alpha map
 
 TerrainData (const std::string &heightMapsrc, const std::string &alphamap, const DetailMap &detail1, const DetailMap &detail2, const DetailMap &detail3, const Size &chunksize=Size(32, 32), float mapHeight=2, float mapScale=0.1)
 constructor, this constructor construct a terrain which have 3 detailmaps, 1 alpha map
 

Public Attributes

Size _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
 

Detailed Description

*TerrainData *This TerrainData struct warp all parameter that Terrain need to create

Member Data Documentation

float _mapScale

terrain scale factor,you can combine setScale later.


The documentation for this struct was generated from the following file: