|
My Project
|
the editable terrain regions associated with a terrain tile. More...
#include <TerrainRegions.h>
Public Types | |
| typedef std::map< string, CRegionLayer * > | RegionLayer_Map_Type |
Public Member Functions | |
| void | SetSize (float fWidth, float fHeight) |
| set the region size in meters. More... | |
| DWORD | GetValue (const string &sLayerName, float x, float y) |
| get value of a given region layer | |
| DWORD | GetValue (CRegionLayer *pLayer, float x, float y) |
| get value of a given region layer | |
| void | LoadRegion (const string &sLayerName, const char *filename) |
| Load a given region from file. More... | |
| CRegionLayer * | GetRegion (const string &sLayerName) |
| get a region layer object by its name, in case we want to access to low level functins. More... | |
| RegionLayer_Map_Type & | GetLayers () |
| get the layers map. More... | |
| int | GetNumOfRegions () |
| get number terrain regions | |
| void | SetCurrentRegionIndex (int nRegion) |
| set terrain region index, so that we can later call GetCurrentRegionName() and GetCurrentRegionFilepath(), to access region properties. | |
| int | GetCurrentRegionIndex () |
| Get terrain region index, so that we can later call GetCurrentRegionName() and GetCurrentRegionFilepath(), to access region properties. More... | |
| void | SetCurrentRegionName (const string &name) |
| set the currently selected region name. More... | |
| const string & | GetCurrentRegionName () |
| get the currently selected region name. More... | |
| void | SetCurrentRegionFilepath (const string &filename) |
| set the current region file path. More... | |
| const string & | GetCurrentRegionFilepath () |
| get the current region file path. More... | |
the editable terrain regions associated with a terrain tile.
This can be used for marking sound regions, walkable area regions, vegation regions, atomosphere regions, game zones, etc.
| const string & CTerrainRegions::GetCurrentRegionFilepath | ( | ) |
get the current region file path.
| int CTerrainRegions::GetCurrentRegionIndex | ( | ) |
Get terrain region index, so that we can later call GetCurrentRegionName() and GetCurrentRegionFilepath(), to access region properties.
-1 if nothing is selected.
| const string & CTerrainRegions::GetCurrentRegionName | ( | ) |
get the currently selected region name.
|
inline |
get the layers map.
| CRegionLayer * CTerrainRegions::GetRegion | ( | const string & | sLayerName | ) |
get a region layer object by its name, in case we want to access to low level functins.
return NULL if it does not exist.
| void CTerrainRegions::LoadRegion | ( | const string & | sLayerName, |
| const char * | filename | ||
| ) |
Load a given region from file.
If a region already exit, we will ignore.
| void CTerrainRegions::SetCurrentRegionFilepath | ( | const string & | filename | ) |
set the current region file path.
| void CTerrainRegions::SetCurrentRegionName | ( | const string & | name | ) |
set the currently selected region name.
The current region Index is changed to the current selected one or -1 if invalid. please note that: this does not create the region layer
| void CTerrainRegions::SetSize | ( | float | fWidth, |
| float | fHeight | ||
| ) |
set the region size in meters.
1.8.12