Packed boolean cell state (roads, rivers, walls, exploration). 更多...
#include <HexCell.h>
Public 成员函数 | |
| constexpr | HexFlags () noexcept=default |
| Constructs a HexFlags. | |
| constexpr | HexFlags (std::uint32_t packed) noexcept |
| Constructs a HexFlags. | |
| constexpr std::uint32_t | raw () const noexcept |
| Raw. | |
| constexpr bool | has (HexFlags other) const noexcept |
| True when active. | |
| constexpr bool | hasNone (HexFlags other) const noexcept |
| True when none. | |
| constexpr HexFlags | with (HexFlags other) const noexcept |
| With. | |
| constexpr HexFlags | without (HexFlags other) const noexcept |
| Without. | |
| constexpr bool | hasRoad (HexDirection d) const noexcept |
| True when road. | |
| constexpr bool | hasRiverIn (HexDirection d) const noexcept |
| True when river in. | |
| constexpr bool | hasRiverOut (HexDirection d) const noexcept |
| True when river out. | |
| constexpr bool | hasAnyRiverIn () const noexcept |
| Whether any river flows into this cell. | |
| constexpr bool | hasAnyRiverOut () const noexcept |
| Whether any river leaves this cell. | |
| constexpr bool | hasRiver () const noexcept |
| Whether this cell has any river connection at all. | |
| constexpr bool | hasRoad () const noexcept |
| Whether this cell has any road. | |
| constexpr bool | hasRiverThrough (HexDirection d) const noexcept |
Whether a river enters and/or leaves through d. | |
| constexpr bool | hasRiverBeginOrEnd () const noexcept |
| Whether the cell is a river source or sink (exactly one connection). | |
| constexpr bool | isWalled () const noexcept |
| True when walled. | |
| constexpr bool | isExplored () const noexcept |
| True when explored. | |
| constexpr bool | isExplorable () const noexcept |
| True when explorable. | |
| constexpr HexFlags | withRoad (HexDirection d) const noexcept |
| With road. | |
| constexpr HexFlags | withoutRoad (HexDirection d) const noexcept |
| Without road. | |
| constexpr HexFlags | withRiverIn (HexDirection d) const noexcept |
| With river in. | |
| constexpr HexFlags | withoutRiverIn (HexDirection d) const noexcept |
| Without river in. | |
| constexpr HexFlags | withRiverOut (HexDirection d) const noexcept |
| With river out. | |
| constexpr HexFlags | withoutRiverOut (HexDirection d) const noexcept |
| Without river out. | |
| constexpr HexFlags | withWalled (bool value) const noexcept |
| With walled. | |
| constexpr HexFlags | withExplored (bool value) const noexcept |
| With explored. | |
| constexpr HexFlags | withExplorable (bool value) const noexcept |
| With explorable. | |
静态 Public 成员函数 | |
| static constexpr HexFlags | direction (HexDirection d) noexcept |
| Direction. | |
| static constexpr HexFlags | riverMask () noexcept |
| Mask of every river bit. | |
| static constexpr HexFlags | roadMask () noexcept |
| Mask of every road bit. | |
详细描述
Packed boolean cell state (roads, rivers, walls, exploration).
Bits 0-5 are roads per direction, 6-11 incoming rivers, 12-17 outgoing rivers, 18 walled, 20 explored and 21 explorable. Direction bit order matches HexDirection, so the direction helpers are plain shifts.
构造及析构函数说明
◆ HexFlags() [1/2]
|
constexprdefaultnoexcept |
Constructs a HexFlags.
◆ HexFlags() [2/2]
|
inlineexplicitconstexprnoexcept |
成员函数说明
◆ direction()
|
inlinestaticconstexprnoexcept |
◆ has()
|
inlineconstexprnoexcept |
◆ hasAnyRiverIn()
|
inlineconstexprnoexcept |
◆ hasAnyRiverOut()
|
inlineconstexprnoexcept |
◆ hasNone()
|
inlineconstexprnoexcept |
◆ hasRiver()
|
inlineconstexprnoexcept |
Whether this cell has any river connection at all.
引用了 hasAnyRiverIn() , 以及 hasAnyRiverOut().
◆ hasRiverBeginOrEnd()
|
inlineconstexprnoexcept |
◆ hasRiverIn()
|
inlineconstexprnoexcept |
◆ hasRiverOut()
|
inlineconstexprnoexcept |
◆ hasRiverThrough()
|
inlineconstexprnoexcept |
Whether a river enters and/or leaves through d.
引用了 d, hasRiverIn() , 以及 hasRiverOut().
被这些函数引用 eve::hexmap::HexMap::addRoad() , 以及 eve::hexmap::HexSphereMap::addRoad().
◆ hasRoad() [1/2]
|
inlineconstexprnoexcept |
◆ hasRoad() [2/2]
|
inlineconstexprnoexcept |
◆ isExplorable()
|
inlineconstexprnoexcept |
◆ isExplored()
|
inlineconstexprnoexcept |
◆ isWalled()
|
inlineconstexprnoexcept |
◆ raw()
|
inlineconstexprnoexcept |
◆ riverMask()
|
inlinestaticconstexprnoexcept |
◆ roadMask()
|
inlinestaticconstexprnoexcept |
Mask of every road bit.
被这些函数引用 eve::hexmap::HexMap::removeRoads() , 以及 eve::hexmap::HexSphereMap::removeRoads().
◆ with()
With.
被这些函数引用 withExplorable(), withExplored(), withRiverIn(), withRiverOut(), withRoad() , 以及 withWalled().
◆ withExplorable()
|
inlineconstexprnoexcept |
◆ withExplored()
|
inlineconstexprnoexcept |
◆ without()
Without.
被这些函数引用 withExplorable(), withExplored(), withoutRiverIn(), withoutRiverOut(), withoutRoad() , 以及 withWalled().
◆ withoutRiverIn()
|
inlineconstexprnoexcept |
Without river in.
Without.
引用了 d, direction , 以及 without().
被这些函数引用 eve::hexmap::HexMap::removeRiver(), eve::hexmap::HexSphereMap::removeRiver(), eve::hexmap::HexMap::setOutgoingRiver() , 以及 eve::hexmap::HexSphereMap::setOutgoingRiver().
◆ withoutRiverOut()
|
inlineconstexprnoexcept |
Without river out.
Without.
引用了 d, direction , 以及 without().
被这些函数引用 eve::hexmap::HexMap::removeRiver(), eve::hexmap::HexSphereMap::removeRiver(), eve::hexmap::HexMap::setOutgoingRiver() , 以及 eve::hexmap::HexSphereMap::setOutgoingRiver().
◆ withoutRoad()
|
inlineconstexprnoexcept |
Without road.
引用了 d, direction , 以及 without().
被这些函数引用 eve::hexmap::HexMap::removeRoads(), eve::hexmap::HexSphereMap::removeRoads(), eve::hexmap::HexMap::setOutgoingRiver() , 以及 eve::hexmap::HexSphereMap::setOutgoingRiver().
◆ withRiverIn()
|
inlineconstexprnoexcept |
With river in.
With.
被这些函数引用 eve::hexmap::HexMap::setOutgoingRiver() , 以及 eve::hexmap::HexSphereMap::setOutgoingRiver().
◆ withRiverOut()
|
inlineconstexprnoexcept |
◆ withRoad()
|
inlineconstexprnoexcept |
With road.
被这些函数引用 eve::hexmap::HexMap::addRoad() , 以及 eve::hexmap::HexSphereMap::addRoad().
◆ withWalled()
|
inlineconstexprnoexcept |
该类的文档由以下文件生成:
- src/modules/hexmap/HexCell.h