载入中...
搜索中...
未找到

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.

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

构造及析构函数说明

◆ HexFlags() [1/2]

constexpr eve::hexmap::HexFlags::HexFlags ( )
constexprdefaultnoexcept

Constructs a HexFlags.

◆ HexFlags() [2/2]

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

Constructs a HexFlags.

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

成员函数说明

◆ direction()

static constexpr HexFlags eve::hexmap::HexFlags::direction ( HexDirection  d)
inlinestaticconstexprnoexcept

Direction.

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

引用了 d.

◆ has()

constexpr bool eve::hexmap::HexFlags::has ( HexFlags  other) const
inlineconstexprnoexcept

True when active.

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

引用了 u.

被这些函数引用 hasRiverIn(), hasRiverOut() , 以及 hasRoad().

◆ hasAnyRiverIn()

constexpr bool eve::hexmap::HexFlags::hasAnyRiverIn ( ) const
inlineconstexprnoexcept

Whether any river flows into this cell.

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

引用了 u.

被这些函数引用 hasRiver().

◆ hasAnyRiverOut()

constexpr bool eve::hexmap::HexFlags::hasAnyRiverOut ( ) const
inlineconstexprnoexcept

Whether any river leaves this cell.

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

引用了 u.

被这些函数引用 hasRiver().

◆ hasNone()

constexpr bool eve::hexmap::HexFlags::hasNone ( HexFlags  other) const
inlineconstexprnoexcept

True when none.

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

引用了 u.

◆ hasRiver()

constexpr bool eve::hexmap::HexFlags::hasRiver ( ) const
inlineconstexprnoexcept

Whether this cell has any river connection at all.

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

引用了 hasAnyRiverIn() , 以及 hasAnyRiverOut().

◆ hasRiverBeginOrEnd()

constexpr bool eve::hexmap::HexFlags::hasRiverBeginOrEnd ( ) const
inlineconstexprnoexcept

Whether the cell is a river source or sink (exactly one connection).

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

引用了 n , 以及 v.

◆ hasRiverIn()

constexpr bool eve::hexmap::HexFlags::hasRiverIn ( HexDirection  d) const
inlineconstexprnoexcept

True when river in.

True when active.

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

引用了 d, direction , 以及 has().

被这些函数引用 hasRiverThrough().

◆ hasRiverOut()

constexpr bool eve::hexmap::HexFlags::hasRiverOut ( HexDirection  d) const
inlineconstexprnoexcept

True when river out.

True when active.

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

引用了 d, direction , 以及 has().

被这些函数引用 hasRiverThrough().

◆ hasRiverThrough()

constexpr bool eve::hexmap::HexFlags::hasRiverThrough ( HexDirection  d) const
inlineconstexprnoexcept

Whether a river enters and/or leaves through d.

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

引用了 d, hasRiverIn() , 以及 hasRiverOut().

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

◆ hasRoad() [1/2]

constexpr bool eve::hexmap::HexFlags::hasRoad ( ) const
inlineconstexprnoexcept

Whether this cell has any road.

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

引用了 u.

◆ hasRoad() [2/2]

constexpr bool eve::hexmap::HexFlags::hasRoad ( HexDirection  d) const
inlineconstexprnoexcept

True when road.

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

引用了 d, direction , 以及 has().

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

◆ isExplorable()

constexpr bool eve::hexmap::HexFlags::isExplorable ( ) const
inlineconstexprnoexcept

True when explorable.

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

引用了 u.

◆ isExplored()

constexpr bool eve::hexmap::HexFlags::isExplored ( ) const
inlineconstexprnoexcept

True when explored.

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

引用了 u.

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

◆ isWalled()

constexpr bool eve::hexmap::HexFlags::isWalled ( ) const
inlineconstexprnoexcept

True when walled.

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

引用了 u.

◆ raw()

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

Raw.

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

◆ riverMask()

static constexpr HexFlags eve::hexmap::HexFlags::riverMask ( )
inlinestaticconstexprnoexcept

Mask of every river bit.

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

◆ roadMask()

static constexpr HexFlags eve::hexmap::HexFlags::roadMask ( )
inlinestaticconstexprnoexcept

Mask of every road bit.

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

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

◆ with()

constexpr HexFlags eve::hexmap::HexFlags::with ( HexFlags  other) const
inlineconstexprnoexcept

With.

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

被这些函数引用 withExplorable(), withExplored(), withRiverIn(), withRiverOut(), withRoad() , 以及 withWalled().

◆ withExplorable()

constexpr HexFlags eve::hexmap::HexFlags::withExplorable ( bool  value) const
inlineconstexprnoexcept

With explorable.

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

引用了 value, with() , 以及 without().

◆ withExplored()

constexpr HexFlags eve::hexmap::HexFlags::withExplored ( bool  value) const
inlineconstexprnoexcept

With explored.

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

引用了 value, with() , 以及 without().

◆ without()

constexpr HexFlags eve::hexmap::HexFlags::without ( HexFlags  other) const
inlineconstexprnoexcept

Without.

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

被这些函数引用 withExplorable(), withExplored(), withoutRiverIn(), withoutRiverOut(), withoutRoad() , 以及 withWalled().

◆ withoutRiverIn()

constexpr HexFlags eve::hexmap::HexFlags::withoutRiverIn ( HexDirection  d) const
inlineconstexprnoexcept

◆ withoutRiverOut()

constexpr HexFlags eve::hexmap::HexFlags::withoutRiverOut ( HexDirection  d) const
inlineconstexprnoexcept

◆ withoutRoad()

constexpr HexFlags eve::hexmap::HexFlags::withoutRoad ( HexDirection  d) const
inlineconstexprnoexcept

◆ withRiverIn()

constexpr HexFlags eve::hexmap::HexFlags::withRiverIn ( HexDirection  d) const
inlineconstexprnoexcept

With river in.

With.

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

引用了 d, direction , 以及 with().

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

◆ withRiverOut()

constexpr HexFlags eve::hexmap::HexFlags::withRiverOut ( HexDirection  d) const
inlineconstexprnoexcept

With river out.

With.

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

引用了 d, direction , 以及 with().

◆ withRoad()

constexpr HexFlags eve::hexmap::HexFlags::withRoad ( HexDirection  d) const
inlineconstexprnoexcept

With road.

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

引用了 d, direction , 以及 with().

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

◆ withWalled()

constexpr HexFlags eve::hexmap::HexFlags::withWalled ( bool  value) const
inlineconstexprnoexcept

With walled.

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

引用了 value, with() , 以及 without().


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