Packed numeric cell state. 更多...
#include <HexCell.h>
Public 成员函数 | |
| constexpr | HexValues () noexcept=default |
| Constructs a HexValues. | |
| constexpr | HexValues (std::uint32_t packed) noexcept |
| Constructs a HexValues. | |
| constexpr std::uint32_t | raw () const noexcept |
| Raw. | |
| constexpr std::int32_t | elevation () const noexcept |
| Elevation. | |
| constexpr std::int32_t | waterLevel () const noexcept |
| Water level. | |
| constexpr std::int32_t | urbanLevel () const noexcept |
| Urban level. | |
| constexpr std::int32_t | farmLevel () const noexcept |
| Farm level. | |
| constexpr std::int32_t | plantLevel () const noexcept |
| Plant level. | |
| constexpr std::int32_t | specialIndex () const noexcept |
| Special index. | |
| constexpr std::int32_t | terrainType () const noexcept |
| Terrain type. | |
| constexpr std::int32_t | viewElevation () const noexcept |
| Elevation used for line of sight: the higher of land and water. | |
| constexpr bool | isUnderwater () const noexcept |
| Whether the cell is flooded above its terrain surface. | |
| constexpr HexValues | withElevation (std::int32_t value) const noexcept |
| constexpr HexValues | withWaterLevel (std::int32_t value) const noexcept |
| With water level. | |
| constexpr HexValues | withUrbanLevel (std::int32_t value) const noexcept |
| With urban level. | |
| constexpr HexValues | withFarmLevel (std::int32_t value) const noexcept |
| With farm level. | |
| constexpr HexValues | withPlantLevel (std::int32_t value) const noexcept |
| With plant level. | |
| constexpr HexValues | withSpecialIndex (std::int32_t value) const noexcept |
| With special index. | |
| constexpr HexValues | withTerrainType (std::int32_t value) const noexcept |
| With terrain type. | |
详细描述
Packed numeric cell state.
Bit layout (most significant first): TTTTTTTT SSSSSSSS PPFFUUWW WWWEEEEE where T is the terrain type, S the special-feature index, P the plant level, F the farm level, U the urban level, W the water level and E the elevation (stored biased by 15 so five bits cover [-15, 16]).
- 注解
- This is a transient in-memory record; it is not a persistence format.
构造及析构函数说明
◆ HexValues() [1/2]
|
constexprdefaultnoexcept |
Constructs a HexValues.
◆ HexValues() [2/2]
|
inlineexplicitconstexprnoexcept |
成员函数说明
◆ elevation()
|
inlineconstexprnoexcept |
◆ farmLevel()
|
inlineconstexprnoexcept |
◆ isUnderwater()
|
inlineconstexprnoexcept |
Whether the cell is flooded above its terrain surface.
引用了 elevation() , 以及 waterLevel().
◆ plantLevel()
|
inlineconstexprnoexcept |
◆ raw()
|
inlineconstexprnoexcept |
◆ specialIndex()
|
inlineconstexprnoexcept |
Special index.
被这些函数引用 eve::hexmap::HexMap::addRoad() , 以及 eve::hexmap::HexSphereMap::addRoad().
◆ terrainType()
|
inlineconstexprnoexcept |
◆ urbanLevel()
|
inlineconstexprnoexcept |
◆ viewElevation()
|
inlineconstexprnoexcept |
Elevation used for line of sight: the higher of land and water.
引用了 elevation() , 以及 waterLevel().
被这些函数引用 eve::hexmap::collectVisibleCells().
◆ waterLevel()
|
inlineconstexprnoexcept |
◆ withElevation()
|
inlineconstexprnoexcept |
◆ withFarmLevel()
|
inlineconstexprnoexcept |
◆ withPlantLevel()
|
inlineconstexprnoexcept |
◆ withSpecialIndex()
|
inlineconstexprnoexcept |
With special index.
引用了 value.
被这些函数引用 eve::hexmap::HexMap::setOutgoingRiver() , 以及 eve::hexmap::HexSphereMap::setOutgoingRiver().
◆ withTerrainType()
|
inlineconstexprnoexcept |
◆ withUrbanLevel()
|
inlineconstexprnoexcept |
◆ withWaterLevel()
|
inlineconstexprnoexcept |
该类的文档由以下文件生成:
- src/modules/hexmap/HexCell.h