载入中...
搜索中...
未找到
eve::map::Fov::Impl结构体 参考

类

struct  AngleShadow
 
struct  Rect
 
struct  Revealer
 

Public 成员函数

int index2 (int x, int y) const
 
int index3 (int x, int y, int z) const
 
bool inBounds2 (int x, int y) const
 
bool inBounds3 (int x, int y, int z) const
 
int effectiveVerticalRange () const
 
int effectiveRadiusOf (const Revealer &r) const
 
bool inRadius2 (int ox, int oy, int x, int y, int radius) const
 
bool inRadius3 (int ox, int oy, int oz, int x, int y, int z, int radius) const
 
void applyAutoTopologyFromLayer ()
 
void resize (int w, int h, int d)
 
void bindLayer (TileLayer *l)
 
void syncFromLayer ()
 
bool cellOpaque2 (int x, int y) const
 
bool cellOpaque3 (int x, int y, int z) const
 
bool cellOpaqueOnSlice (int x, int y, int zSlice) const
 
float elevAt (int x, int y) const
 
void markVisibleIdx (int idx)
 
void markVisible2 (int x, int y)
 
void markVisible3 (int x, int y, int z)
 
void resetVisibleKeepExplored ()
 
void clearAllMemory ()
 
Revealer * findRevealer (int id)
 
const Revealer * findRevealerConst (int id) const
 
bool losBresenham2 (int x0, int y0, int x1, int y1, int zSlice, bool applyHeight) const
 
bool losHexCube (int x0, int y0, int x1, int y1, int zSlice, bool applyHeight) const
 
bool los2 (int x0, int y0, int x1, int y1, int zSlice, bool applyHeight) const
 
bool passesHeightToTarget (int ox, int oy, int tx, int ty) const
 
void tryMark2 (int ox, int oy, int x, int y, int zSlice, bool useCone, float facingDeg, float halfAngleDeg, int radius)
 
void castLight (int ox, int oy, int radius, int row, float startSlope, float endSlope, int xx, int xy, int yx, int yy, int zSlice, bool useCone, float facingDeg, float halfAngleDeg)
 
void computeOrthoShadowcast (const Revealer &r, int zSlice, int radius)
 
float hexCellAngle (int ox, int oy, int x, int y) const
 
bool angleFullyCovered (float a0, float a1, const std::vector< AngleShadow > &shadows) const
 
void addAngleShadow (std::vector< AngleShadow > &shadows, float a0, float a1) const
 
void computeHexShadowcast (const Revealer &r, int zSlice, int radius)
 
void computeShadowcast (const Revealer &r, int zSlice, int radius)
 
void castRayLine (int ox, int oy, int tx, int ty, int zSlice, bool useCone, float facingDeg, float halfAngleDeg, int radius)
 
void computeRaycast (const Revealer &r, int zSlice, int radius)
 
void computePermissive (const Revealer &r, int zSlice, int radius)
 
std::vector< Rect > buildOpaqueRects (int ox, int oy, int radius, int zSlice) const
 
void computeRectangle (const Revealer &r, int zSlice, int radius)
 
void extendVertical (const Revealer &r, int zSlice, int radius)
 
void computeRevealer (const Revealer &r)
 
void compute ()
 

Public 属性

int width = 0
 
int height = 0
 
int depth = 1
 
TileLayer * layer = nullptr
 
uint64_t layerRevision = 0
 
Algorithm algorithm = Algorithm::Shadowcast
 
RadiusMetric metric = RadiusMetric::Euclidean
 
Mode mode = Mode::Grid2D
 
Topology topology = Topology::Ortho
 
bool topologyManual = false
 
bool cornerPeek = false
 
bool blockEmpty = true
 
bool dirty = true
 
float cliffBlock = 1.f
 
float eyeOffset = 0.f
 
int verticalRange = -1
 
float perceptionRadiusScale = 0.f
 
float detectionMargin = 0.f
 
std::vector< uint8_t > opaque
 
std::vector< float > elevation
 
bool unobstructedHeightmap = false
 
std::vector< CellState > state
 
std::vector< int > visibleList
 
std::unordered_set< uint32_t > opaqueGids
 
std::vector< Revealer > revealers
 
std::unordered_map< int, std::size_t > revealerIndices
 
int nextRevealerId = 1
 

详细描述

在文件 Fov.cpp 第 198 行定义.

成员函数说明

◆ addAngleShadow()

void eve::map::Fov::Impl::addAngleShadow ( std::vector< AngleShadow > &  shadows,
float  a0,
float  a1 
) const
inline

在文件 Fov.cpp 第 557 行定义.

引用了 end , 以及 start.

被这些函数引用 computeHexShadowcast().

◆ angleFullyCovered()

bool eve::map::Fov::Impl::angleFullyCovered ( float  a0,
float  a1,
const std::vector< AngleShadow > &  shadows 
) const
inline

在文件 Fov.cpp 第 541 行定义.

引用了 mid , 以及 s.

被这些函数引用 computeHexShadowcast().

◆ applyAutoTopologyFromLayer()

void eve::map::Fov::Impl::applyAutoTopologyFromLayer ( )
inline

在文件 Fov.cpp 第 279 行定义.

引用了 eve::map::Hexagonal, layer, eve::map::Staggered, topology , 以及 topologyManual.

被这些函数引用 bindLayer() , 以及 syncFromLayer().

◆ bindLayer()

void eve::map::Fov::Impl::bindLayer ( TileLayer *  l)
inline

在文件 Fov.cpp 第 298 行定义.

引用了 applyAutoTopologyFromLayer(), layer, mode, resize() , 以及 syncFromLayer().

◆ buildOpaqueRects()

std::vector< Rect > eve::map::Fov::Impl::buildOpaqueRects ( int  ox,
int  oy,
int  radius,
int  zSlice 
) const
inline

在文件 Fov.cpp 第 728 行定义.

引用了 cellOpaqueOnSlice(), height, inRadius2(), ox, oy, radius, used, width, x, xMax, xMin , 以及 y.

被这些函数引用 computeRectangle().

◆ castLight()

void eve::map::Fov::Impl::castLight ( int  ox,
int  oy,
int  radius,
int  row,
float  startSlope,
float  endSlope,
int  xx,
int  xy,
int  yx,
int  yy,
int  zSlice,
bool  useCone,
float  facingDeg,
float  halfAngleDeg 
)
inline

在文件 Fov.cpp 第 488 行定义.

引用了 castLight(), cellOpaqueOnSlice(), dx, dy, ox, oy, radius , 以及 tryMark2().

被这些函数引用 castLight() , 以及 computeOrthoShadowcast().

◆ castRayLine()

void eve::map::Fov::Impl::castRayLine ( int  ox,
int  oy,
int  tx,
int  ty,
int  zSlice,
bool  useCone,
float  facingDeg,
float  halfAngleDeg,
int  radius 
)
inline

在文件 Fov.cpp 第 616 行定义.

引用了 cellOpaqueOnSlice(), dx, dy, n, ox, oy, radius, sx, sy, t, topology, tryMark2(), x , 以及 y.

被这些函数引用 computeRaycast().

◆ cellOpaque2()

bool eve::map::Fov::Impl::cellOpaque2 ( int  x,
int  y 
) const
inline

在文件 Fov.cpp 第 333 行定义.

引用了 inBounds2(), index2(), opaque, x , 以及 y.

被这些函数引用 cellOpaqueOnSlice().

◆ cellOpaque3()

bool eve::map::Fov::Impl::cellOpaque3 ( int  x,
int  y,
int  z 
) const
inline

在文件 Fov.cpp 第 338 行定义.

引用了 inBounds3(), index3(), opaque, x, y , 以及 z.

被这些函数引用 cellOpaqueOnSlice() , 以及 extendVertical().

◆ cellOpaqueOnSlice()

bool eve::map::Fov::Impl::cellOpaqueOnSlice ( int  x,
int  y,
int  zSlice 
) const
inline

◆ clearAllMemory()

void eve::map::Fov::Impl::clearAllMemory ( )
inline

在文件 Fov.cpp 第 380 行定义.

引用了 dirty, state , 以及 visibleList.

◆ compute()

void eve::map::Fov::Impl::compute ( )
inline

◆ computeHexShadowcast()

void eve::map::Fov::Impl::computeHexShadowcast ( const Revealer &  r,
int  zSlice,
int  radius 
)
inline

◆ computeOrthoShadowcast()

void eve::map::Fov::Impl::computeOrthoShadowcast ( const Revealer &  r,
int  zSlice,
int  radius 
)
inline

在文件 Fov.cpp 第 524 行定义.

引用了 castLight(), r, radius , 以及 tryMark2().

被这些函数引用 computeShadowcast().

◆ computePermissive()

void eve::map::Fov::Impl::computePermissive ( const Revealer &  r,
int  zSlice,
int  radius 
)
inline

在文件 Fov.cpp 第 694 行定义.

引用了 c, cellOpaqueOnSlice(), dx, dy, inBounds2(), inRadius2(), los2(), mode, r, radius, sx, sy , 以及 tryMark2().

被这些函数引用 computeRevealer().

◆ computeRaycast()

void eve::map::Fov::Impl::computeRaycast ( const Revealer &  r,
int  zSlice,
int  radius 
)
inline

在文件 Fov.cpp 第 660 行定义.

引用了 castRayLine(), q, r, radius, step, topology, tryMark2(), x , 以及 y.

被这些函数引用 computeRevealer().

◆ computeRectangle()

void eve::map::Fov::Impl::computeRectangle ( const Revealer &  r,
int  zSlice,
int  radius 
)
inline

在文件 Fov.cpp 第 771 行定义.

引用了 a, ang, angles, b, buildOpaqueRects(), corners, height, index2(), inRadius2(), inside, ox, oy, passesHeightToTarget(), r, radius, tryMark2(), width, x , 以及 y.

被这些函数引用 computeRevealer().

◆ computeRevealer()

void eve::map::Fov::Impl::computeRevealer ( const Revealer &  r)
inline

◆ computeShadowcast()

void eve::map::Fov::Impl::computeShadowcast ( const Revealer &  r,
int  zSlice,
int  radius 
)
inline

在文件 Fov.cpp 第 611 行定义.

引用了 computeHexShadowcast(), computeOrthoShadowcast(), r, radius , 以及 topology.

被这些函数引用 computeRevealer().

◆ effectiveRadiusOf()

int eve::map::Fov::Impl::effectiveRadiusOf ( const Revealer &  r) const
inline

在文件 Fov.cpp 第 262 行定义.

引用了 perceptionRadiusScale , 以及 r.

被这些函数引用 computeRevealer().

◆ effectiveVerticalRange()

int eve::map::Fov::Impl::effectiveVerticalRange ( ) const
inline

在文件 Fov.cpp 第 257 行定义.

引用了 depth , 以及 verticalRange.

被这些函数引用 extendVertical().

◆ elevAt()

float eve::map::Fov::Impl::elevAt ( int  x,
int  y 
) const
inline

在文件 Fov.cpp 第 348 行定义.

引用了 elevation, inBounds2(), index2(), x , 以及 y.

被这些函数引用 losBresenham2() , 以及 losHexCube().

◆ extendVertical()

void eve::map::Fov::Impl::extendVertical ( const Revealer &  r,
int  zSlice,
int  radius 
)
inline

在文件 Fov.cpp 第 855 行定义.

引用了 cellOpaque3(), depth, dir, effectiveVerticalRange(), height, idx, index3(), inRadius3(), markVisible3(), mode, r, radius, state, step, width, x, y , 以及 z.

被这些函数引用 computeRevealer().

◆ findRevealer()

Revealer * eve::map::Fov::Impl::findRevealer ( int  id)
inline

在文件 Fov.cpp 第 386 行定义.

引用了 found, revealerIndices , 以及 revealers.

◆ findRevealerConst()

const Revealer * eve::map::Fov::Impl::findRevealerConst ( int  id) const
inline

在文件 Fov.cpp 第 391 行定义.

引用了 found, revealerIndices , 以及 revealers.

◆ hexCellAngle()

float eve::map::Fov::Impl::hexCellAngle ( int  ox,
int  oy,
int  x,
int  y 
) const
inline

在文件 Fov.cpp 第 533 行定义.

引用了 ox, oy, px, py, x , 以及 y.

被这些函数引用 computeHexShadowcast().

◆ inBounds2()

bool eve::map::Fov::Impl::inBounds2 ( int  x,
int  y 
) const
inline

在文件 Fov.cpp 第 252 行定义.

引用了 height, width, x , 以及 y.

被这些函数引用 cellOpaque2(), computeHexShadowcast(), computePermissive(), computeRevealer(), elevAt(), inBounds3(), markVisible2() , 以及 tryMark2().

◆ inBounds3()

bool eve::map::Fov::Impl::inBounds3 ( int  x,
int  y,
int  z 
) const
inline

在文件 Fov.cpp 第 253 行定义.

引用了 depth, inBounds2(), x, y , 以及 z.

被这些函数引用 cellOpaque3(), computeRevealer() , 以及 markVisible3().

◆ index2()

int eve::map::Fov::Impl::index2 ( int  x,
int  y 
) const
inline

在文件 Fov.cpp 第 250 行定义.

引用了 width, x , 以及 y.

被这些函数引用 cellOpaque2(), computeRectangle(), elevAt() , 以及 markVisible2().

◆ index3()

int eve::map::Fov::Impl::index3 ( int  x,
int  y,
int  z 
) const
inline

在文件 Fov.cpp 第 251 行定义.

引用了 height, width, x, y , 以及 z.

被这些函数引用 cellOpaque3(), extendVertical() , 以及 markVisible3().

◆ inRadius2()

bool eve::map::Fov::Impl::inRadius2 ( int  ox,
int  oy,
int  x,
int  y,
int  radius 
) const
inline

在文件 Fov.cpp 第 267 行定义.

引用了 metric, ox, oy, radius, topology, x , 以及 y.

被这些函数引用 buildOpaqueRects(), computeHexShadowcast(), computePermissive(), computeRectangle() , 以及 tryMark2().

◆ inRadius3()

bool eve::map::Fov::Impl::inRadius3 ( int  ox,
int  oy,
int  oz,
int  x,
int  y,
int  z,
int  radius 
) const
inline

在文件 Fov.cpp 第 272 行定义.

引用了 metric, ox, oy, radius, topology, x, y , 以及 z.

被这些函数引用 extendVertical().

◆ los2()

bool eve::map::Fov::Impl::los2 ( int  x0,
int  y0,
int  x1,
int  y1,
int  zSlice,
bool  applyHeight 
) const
inline

在文件 Fov.cpp 第 468 行定义.

引用了 losBresenham2(), losHexCube() , 以及 topology.

被这些函数引用 computePermissive() , 以及 passesHeightToTarget().

◆ losBresenham2()

bool eve::map::Fov::Impl::losBresenham2 ( int  x0,
int  y0,
int  x1,
int  y1,
int  zSlice,
bool  applyHeight 
) const
inline

在文件 Fov.cpp 第 396 行定义.

引用了 cellOpaqueOnSlice(), cliffBlock, cornerPeek, dx, dy, elevAt(), eyeOffset, mode, nx, ny, sx, sy, x , 以及 y.

被这些函数引用 los2().

◆ losHexCube()

bool eve::map::Fov::Impl::losHexCube ( int  x0,
int  y0,
int  x1,
int  y1,
int  zSlice,
bool  applyHeight 
) const
inline

在文件 Fov.cpp 第 434 行定义.

引用了 cellOpaqueOnSlice(), cliffBlock, elevAt(), eyeOffset, mode, n, t, x , 以及 y.

被这些函数引用 los2().

◆ markVisible2()

void eve::map::Fov::Impl::markVisible2 ( int  x,
int  y 
)
inline

在文件 Fov.cpp 第 361 行定义.

引用了 inBounds2(), index2(), markVisibleIdx(), x , 以及 y.

被这些函数引用 tryMark2().

◆ markVisible3()

void eve::map::Fov::Impl::markVisible3 ( int  x,
int  y,
int  z 
)
inline

在文件 Fov.cpp 第 366 行定义.

引用了 inBounds3(), index3(), markVisibleIdx(), x, y , 以及 z.

被这些函数引用 extendVertical() , 以及 tryMark2().

◆ markVisibleIdx()

void eve::map::Fov::Impl::markVisibleIdx ( int  idx)
inline

在文件 Fov.cpp 第 353 行定义.

引用了 idx, state , 以及 visibleList.

被这些函数引用 markVisible2() , 以及 markVisible3().

◆ passesHeightToTarget()

bool eve::map::Fov::Impl::passesHeightToTarget ( int  ox,
int  oy,
int  tx,
int  ty 
) const
inline

在文件 Fov.cpp 第 473 行定义.

引用了 los2(), mode, ox, oy , 以及 unobstructedHeightmap.

被这些函数引用 computeHexShadowcast(), computeRectangle() , 以及 tryMark2().

◆ resetVisibleKeepExplored()

void eve::map::Fov::Impl::resetVisibleKeepExplored ( )
inline

在文件 Fov.cpp 第 371 行定义.

引用了 idx, state , 以及 visibleList.

被这些函数引用 compute().

◆ resize()

void eve::map::Fov::Impl::resize ( int  w,
int  h,
int  d 
)
inline

在文件 Fov.cpp 第 286 行定义.

引用了 d, depth, dirty, elevation, h, height, n, opaque, state, visibleList, w , 以及 width.

被这些函数引用 bindLayer() , 以及 syncFromLayer().

◆ syncFromLayer()

void eve::map::Fov::Impl::syncFromLayer ( )
inline

◆ tryMark2()

void eve::map::Fov::Impl::tryMark2 ( int  ox,
int  oy,
int  x,
int  y,
int  zSlice,
bool  useCone,
float  facingDeg,
float  halfAngleDeg,
int  radius 
)
inline

类成员变量说明

◆ algorithm

Algorithm eve::map::Fov::Impl::algorithm = Algorithm::Shadowcast

在文件 Fov.cpp 第 226 行定义.

被这些函数引用 computeRevealer().

◆ blockEmpty

bool eve::map::Fov::Impl::blockEmpty = true

在文件 Fov.cpp 第 232 行定义.

被这些函数引用 syncFromLayer().

◆ cliffBlock

float eve::map::Fov::Impl::cliffBlock = 1.f

在文件 Fov.cpp 第 234 行定义.

被这些函数引用 compute(), losBresenham2() , 以及 losHexCube().

◆ cornerPeek

bool eve::map::Fov::Impl::cornerPeek = false

在文件 Fov.cpp 第 231 行定义.

被这些函数引用 losBresenham2().

◆ depth

int eve::map::Fov::Impl::depth = 1

在文件 Fov.cpp 第 223 行定义.

被这些函数引用 effectiveVerticalRange(), extendVertical(), inBounds3(), resize() , 以及 syncFromLayer().

◆ detectionMargin

float eve::map::Fov::Impl::detectionMargin = 0.f

在文件 Fov.cpp 第 238 行定义.

◆ dirty

bool eve::map::Fov::Impl::dirty = true

在文件 Fov.cpp 第 233 行定义.

被这些函数引用 clearAllMemory(), compute(), resize() , 以及 syncFromLayer().

◆ elevation

std::vector<float> eve::map::Fov::Impl::elevation

在文件 Fov.cpp 第 241 行定义.

被这些函数引用 compute(), elevAt() , 以及 resize().

◆ eyeOffset

float eve::map::Fov::Impl::eyeOffset = 0.f

在文件 Fov.cpp 第 235 行定义.

被这些函数引用 compute(), losBresenham2() , 以及 losHexCube().

◆ height

int eve::map::Fov::Impl::height = 0

在文件 Fov.cpp 第 222 行定义.

被这些函数引用 buildOpaqueRects(), computeRectangle(), extendVertical(), inBounds2(), index3(), resize() , 以及 syncFromLayer().

◆ layer

TileLayer* eve::map::Fov::Impl::layer = nullptr

在文件 Fov.cpp 第 224 行定义.

被这些函数引用 applyAutoTopologyFromLayer(), bindLayer(), compute() , 以及 syncFromLayer().

◆ layerRevision

uint64_t eve::map::Fov::Impl::layerRevision = 0

在文件 Fov.cpp 第 225 行定义.

被这些函数引用 compute() , 以及 syncFromLayer().

◆ metric

RadiusMetric eve::map::Fov::Impl::metric = RadiusMetric::Euclidean

在文件 Fov.cpp 第 227 行定义.

被这些函数引用 inRadius2() , 以及 inRadius3().

◆ mode

Mode eve::map::Fov::Impl::mode = Mode::Grid2D

◆ nextRevealerId

int eve::map::Fov::Impl::nextRevealerId = 1

在文件 Fov.cpp 第 248 行定义.

◆ opaque

std::vector<uint8_t> eve::map::Fov::Impl::opaque

在文件 Fov.cpp 第 240 行定义.

被这些函数引用 cellOpaque2(), cellOpaque3(), compute(), resize() , 以及 syncFromLayer().

◆ opaqueGids

std::unordered_set<uint32_t> eve::map::Fov::Impl::opaqueGids

在文件 Fov.cpp 第 245 行定义.

被这些函数引用 syncFromLayer().

◆ perceptionRadiusScale

float eve::map::Fov::Impl::perceptionRadiusScale = 0.f

在文件 Fov.cpp 第 237 行定义.

被这些函数引用 effectiveRadiusOf().

◆ revealerIndices

std::unordered_map<int, std::size_t> eve::map::Fov::Impl::revealerIndices

在文件 Fov.cpp 第 247 行定义.

被这些函数引用 findRevealer() , 以及 findRevealerConst().

◆ revealers

std::vector<Revealer> eve::map::Fov::Impl::revealers

在文件 Fov.cpp 第 246 行定义.

被这些函数引用 compute(), findRevealer() , 以及 findRevealerConst().

◆ state

std::vector<CellState> eve::map::Fov::Impl::state

在文件 Fov.cpp 第 243 行定义.

被这些函数引用 clearAllMemory(), extendVertical(), markVisibleIdx(), resetVisibleKeepExplored() , 以及 resize().

◆ topology

Topology eve::map::Fov::Impl::topology = Topology::Ortho

◆ topologyManual

bool eve::map::Fov::Impl::topologyManual = false

在文件 Fov.cpp 第 230 行定义.

被这些函数引用 applyAutoTopologyFromLayer().

◆ unobstructedHeightmap

bool eve::map::Fov::Impl::unobstructedHeightmap = false

在文件 Fov.cpp 第 242 行定义.

被这些函数引用 compute() , 以及 passesHeightToTarget().

◆ verticalRange

int eve::map::Fov::Impl::verticalRange = -1

在文件 Fov.cpp 第 236 行定义.

被这些函数引用 effectiveVerticalRange().

◆ visibleList

std::vector<int> eve::map::Fov::Impl::visibleList

在文件 Fov.cpp 第 244 行定义.

被这些函数引用 clearAllMemory(), markVisibleIdx(), resetVisibleKeepExplored() , 以及 resize().

◆ width

int eve::map::Fov::Impl::width = 0

该结构体的文档由以下文件生成: