载入中...
搜索中...
未找到
eve::hexmap::HexValues类 参考

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.

在文件 HexCell.h 第 38 行定义.

构造及析构函数说明

◆ HexValues() [1/2]

constexpr eve::hexmap::HexValues::HexValues ( )
constexprdefaultnoexcept

Constructs a HexValues.

◆ HexValues() [2/2]

constexpr eve::hexmap::HexValues::HexValues ( std::uint32_t  packed)
inlineexplicitconstexprnoexcept

Constructs a HexValues.

在文件 HexCell.h 第 43 行定义.

成员函数说明

◆ elevation()

constexpr std::int32_t eve::hexmap::HexValues::elevation ( ) const
inlineconstexprnoexcept

Elevation.

在文件 HexCell.h 第 49 行定义.

引用了 u.

被这些函数引用 isUnderwater() , 以及 viewElevation().

◆ farmLevel()

constexpr std::int32_t eve::hexmap::HexValues::farmLevel ( ) const
inlineconstexprnoexcept

Farm level.

在文件 HexCell.h 第 57 行定义.

◆ isUnderwater()

constexpr bool eve::hexmap::HexValues::isUnderwater ( ) const
inlineconstexprnoexcept

Whether the cell is flooded above its terrain surface.

在文件 HexCell.h 第 74 行定义.

引用了 elevation() , 以及 waterLevel().

◆ plantLevel()

constexpr std::int32_t eve::hexmap::HexValues::plantLevel ( ) const
inlineconstexprnoexcept

Plant level.

在文件 HexCell.h 第 59 行定义.

◆ raw()

constexpr std::uint32_t eve::hexmap::HexValues::raw ( ) const
inlineconstexprnoexcept

Raw.

在文件 HexCell.h 第 46 行定义.

◆ specialIndex()

constexpr std::int32_t eve::hexmap::HexValues::specialIndex ( ) const
inlineconstexprnoexcept

Special index.

在文件 HexCell.h 第 61 行定义.

被这些函数引用 eve::hexmap::HexMap::addRoad() , 以及 eve::hexmap::HexSphereMap::addRoad().

◆ terrainType()

constexpr std::int32_t eve::hexmap::HexValues::terrainType ( ) const
inlineconstexprnoexcept

Terrain type.

在文件 HexCell.h 第 65 行定义.

◆ urbanLevel()

constexpr std::int32_t eve::hexmap::HexValues::urbanLevel ( ) const
inlineconstexprnoexcept

Urban level.

在文件 HexCell.h 第 55 行定义.

◆ viewElevation()

constexpr std::int32_t eve::hexmap::HexValues::viewElevation ( ) const
inlineconstexprnoexcept

Elevation used for line of sight: the higher of land and water.

在文件 HexCell.h 第 70 行定义.

引用了 elevation() , 以及 waterLevel().

被这些函数引用 eve::hexmap::collectVisibleCells().

◆ waterLevel()

constexpr std::int32_t eve::hexmap::HexValues::waterLevel ( ) const
inlineconstexprnoexcept

Water level.

在文件 HexCell.h 第 53 行定义.

被这些函数引用 isUnderwater() , 以及 viewElevation().

◆ withElevation()

constexpr HexValues eve::hexmap::HexValues::withElevation ( std::int32_t  value) const
inlineconstexprnoexcept

在文件 HexCell.h 第 76 行定义.

引用了 u , 以及 value.

被这些函数引用 eve::hexmap::HexMap::reset().

◆ withFarmLevel()

constexpr HexValues eve::hexmap::HexValues::withFarmLevel ( std::int32_t  value) const
inlineconstexprnoexcept

With farm level.

在文件 HexCell.h 第 88 行定义.

引用了 value.

◆ withPlantLevel()

constexpr HexValues eve::hexmap::HexValues::withPlantLevel ( std::int32_t  value) const
inlineconstexprnoexcept

With plant level.

在文件 HexCell.h 第 92 行定义.

引用了 value.

◆ withSpecialIndex()

constexpr HexValues eve::hexmap::HexValues::withSpecialIndex ( std::int32_t  value) const
inlineconstexprnoexcept

With special index.

在文件 HexCell.h 第 96 行定义.

引用了 value.

被这些函数引用 eve::hexmap::HexMap::setOutgoingRiver() , 以及 eve::hexmap::HexSphereMap::setOutgoingRiver().

◆ withTerrainType()

constexpr HexValues eve::hexmap::HexValues::withTerrainType ( std::int32_t  value) const
inlineconstexprnoexcept

With terrain type.

在文件 HexCell.h 第 100 行定义.

引用了 value.

◆ withUrbanLevel()

constexpr HexValues eve::hexmap::HexValues::withUrbanLevel ( std::int32_t  value) const
inlineconstexprnoexcept

With urban level.

在文件 HexCell.h 第 84 行定义.

引用了 value.

◆ withWaterLevel()

constexpr HexValues eve::hexmap::HexValues::withWaterLevel ( std::int32_t  value) const
inlineconstexprnoexcept

With water level.

在文件 HexCell.h 第 80 行定义.

引用了 value.

被这些函数引用 eve::hexmap::HexMap::reset().


该类的文档由以下文件生成: