Cocos2d-x  v3.17
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Terrain::TerrainData Struct Reference

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

Public Member Functions

 TerrainData ()
 empty constructor
 
 TerrainData ()
 empty constructor
 
 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 ( var heightMapsrc, var textureSrc, var 32, var 2, var 1)
 constructor, this constructor construct a simple terrain which only have 1 detailmap
 
 TerrainData ( local heightMapsrc, local textureSrc, local 32, local 2, local 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 ( var heightMapsrc, var alphamap, var detail1, var detail2, var detail3, var detail4, var 32, var 2, var 1)
 constructor, this constructor construct a terrain which have 4 detailmaps, 1 alpha map
 
 TerrainData ( local heightMapsrc, local alphamap, local detail1, local detail2, local detail3, local detail4, local 32, local 2, local 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
 
var _alphaMapSrc
 the source path of the alpha map
 
local _alphaMapSrc
 the source path of the alpha map
 
DetailMap _detailMaps [4]
 detail maps
 
var _detailMaps ()
 detail maps
 
local _detailMaps ()
 detail maps
 
float _mapHeight
 terrain Maximum height
 
var _mapHeight
 terrain Maximum height
 
local _mapHeight
 terrain Maximum height
 
float _mapScale
 terrain scale factor,you can combine setScale later. More...
 
var _mapScale
 terrain scale factor,you can combine setScale later. More...
 
local _mapScale
 terrain scale factor,you can combine setScale later. More...
 
int _detailMapAmount
 the amount of detailmap
 
var _detailMapAmount
 the amount of detailmap
 
local _detailMapAmount
 the amount of detailmap
 
float _skirtHeightRatio
 the skirt height ratio, only effect when terrain use skirt to fix crack
 
var _skirtHeightRatio
 the skirt height ratio, only effect when terrain use skirt to fix crack
 
local _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.

var _mapScale

terrain scale factor,you can combine setScale later.

local _mapScale

terrain scale factor,you can combine setScale later.


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