|
OpenEnroth 731eccc
|
#include <OutdoorTerrain.h>
Classes | |
| struct | TileGeometry |
Public Member Functions | |
| OutdoorTerrain () | |
| void | createDebugTerrain () |
| void | changeSeason (int month) |
| float | heightByGrid (Pointi gridPos) const |
| float | heightByPos (const Vec3f &pos) const |
| Vec3i | vertexByGridUnsafe (Pointi gridPos) const |
| int | tileIdByGrid (Pointi gridPos) const |
| const TileData & | tileDataByGrid (Pointi gridPos) const |
| Tileset | tilesetByGrid (Pointi gridPos) const |
| Tileset | tilesetByPos (const Vec3f &pos) const |
| bool | isWaterByGrid (Pointi gridPos) const |
| bool | isWaterByPos (const Vec3f &pos) const |
| bool | isWaterOrShoreByGrid (Pointi gridPos) const |
| Vec3f | normalByPos (const Vec3f &pos) const |
| const std::array< Vec3f, 2 > & | normalsByGridUnsafe (Pointi gridPos) const |
| bool | isSlopeTooHighByPos (const Vec3f &pos) const |
Private Member Functions | |
| void | recalculateNormals () |
| void | recalculateTransitions (Image< int16_t > *tileMap) |
| TileGeometry | tileGeometryByGrid (Pointi gridPos) const |
Private Attributes | |
| std::array< Tileset, 4 > | _tilesets |
| Image< uint8_t > | _heightMap |
| Image< int16_t > | _tileMap |
| Image< int16_t > | _originalTileMap |
| Image< std::array< Vec3f, 2 > > | _normalMap |
Friends | |
| void | reconstruct (const OutdoorLocation_MM7 &src, OutdoorTerrain *dst) |
Terrain for outdoor location.
Contains geometry & tile data, and provides some convenience methods for accessing it.
All methods do bounds checking, so this class effectively presents a view into a location that's infinite in size. Methods ending with -Unsafe don't do bounds checking.
| OutdoorTerrain::OutdoorTerrain | ( | ) |
| void OutdoorTerrain::changeSeason | ( | int | month | ) |
| void OutdoorTerrain::createDebugTerrain | ( | ) |
| float OutdoorTerrain::heightByGrid | ( | Pointi | gridPos | ) | const |
| gridPos | Grid coordinates. |
gridPos. | float OutdoorTerrain::heightByPos | ( | const Vec3f & | pos | ) | const |
| pos | World coordinates, only xy component is used by this function. |
| bool OutdoorTerrain::isSlopeTooHighByPos | ( | const Vec3f & | pos | ) | const |
| pos | World coordinates, only xy component is used by this function. |
| bool OutdoorTerrain::isWaterByGrid | ( | Pointi | gridPos | ) | const |
| gridPos | Grid coordinates. |
gridPos is a water tile. Note that shore tiles are different from water tiles. | bool OutdoorTerrain::isWaterByPos | ( | const Vec3f & | pos | ) | const |
| bool OutdoorTerrain::isWaterOrShoreByGrid | ( | Pointi | gridPos | ) | const |
| pos | World coordinates, only xy component is used by this function. |
z > 0).
|
private |
|
private |
| gridPos | Grid coordinates. |
gridPos.
|
private |
| int OutdoorTerrain::tileIdByGrid | ( | Pointi | gridPos | ) | const |
| gridPos | Grid coordinates. |
gridPos that can then be used to get tile data from TileTable. | gridPos | Grid coordinates. |
gridPos, or Tileset_NULL if the tile is invalid.
|
friend |
|
private |
|
private |
|
private |
|
private |