载入中...
搜索中...
未找到
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 ()
 
RevealerfindRevealer (int id)
 
const RevealerfindRevealerConst (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< RectbuildOpaqueRects (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
 
TileLayerlayer = nullptr
 
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
 
std::vector< CellState > state
 
std::vector< int > visibleList
 
std::unordered_set< uint32_t > opaqueGids
 
std::vector< Revealerrevealers
 
int nextRevealerId = 1
 

详细描述

在文件 Fov.cpp196 行定义.

成员函数说明

◆ addAngleShadow()

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

在文件 Fov.cpp550 行定义.

被这些函数引用 computeHexShadowcast().

◆ angleFullyCovered()

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

在文件 Fov.cpp534 行定义.

引用了 s.

被这些函数引用 computeHexShadowcast().

◆ applyAutoTopologyFromLayer()

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

在文件 Fov.cpp274 行定义.

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

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

◆ bindLayer()

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

在文件 Fov.cpp293 行定义.

引用了 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.cpp721 行定义.

引用了 cellOpaqueOnSlice(), height, inRadius2(), width, x , 以及 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.cpp481 行定义.

引用了 castLight(), cellOpaqueOnSlice() , 以及 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.cpp609 行定义.

引用了 cellOpaqueOnSlice(), n, topology, tryMark2(), x , 以及 y.

被这些函数引用 computeRaycast().

◆ cellOpaque2()

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

在文件 Fov.cpp322 行定义.

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

被这些函数引用 cellOpaqueOnSlice().

◆ cellOpaque3()

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

在文件 Fov.cpp327 行定义.

引用了 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.cpp369 行定义.

引用了 dirty, state , 以及 visibleList.

◆ compute()

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

在文件 Fov.cpp896 行定义.

引用了 computeRevealer(), dirty, resetVisibleKeepExplored() , 以及 revealers.

◆ computeHexShadowcast()

◆ computeOrthoShadowcast()

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

◆ computePermissive()

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

◆ computeRaycast()

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

◆ computeRectangle()

◆ computeRevealer()

◆ computeShadowcast()

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

在文件 Fov.cpp604 行定义.

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

被这些函数引用 computeRevealer().

◆ effectiveRadiusOf()

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

◆ effectiveVerticalRange()

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

在文件 Fov.cpp252 行定义.

引用了 depth , 以及 verticalRange.

被这些函数引用 extendVertical().

◆ elevAt()

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

在文件 Fov.cpp337 行定义.

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

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

◆ extendVertical()

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

◆ findRevealer()

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

在文件 Fov.cpp375 行定义.

引用了 revealers.

◆ findRevealerConst()

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

在文件 Fov.cpp382 行定义.

引用了 revealers.

◆ hexCellAngle()

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

在文件 Fov.cpp526 行定义.

引用了 px, x , 以及 y.

被这些函数引用 computeHexShadowcast().

◆ inBounds2()

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

在文件 Fov.cpp247 行定义.

引用了 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.cpp248 行定义.

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

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

◆ index2()

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

在文件 Fov.cpp245 行定义.

引用了 width, x , 以及 y.

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

◆ index3()

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

在文件 Fov.cpp246 行定义.

引用了 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.cpp262 行定义.

引用了 metric, 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.cpp267 行定义.

引用了 metric, 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.cpp461 行定义.

引用了 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.cpp389 行定义.

引用了 cellOpaqueOnSlice(), cliffBlock, cornerPeek, elevAt(), eyeOffset, mode, 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.cpp427 行定义.

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

被这些函数引用 los2().

◆ markVisible2()

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

在文件 Fov.cpp350 行定义.

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

被这些函数引用 tryMark2().

◆ markVisible3()

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

在文件 Fov.cpp355 行定义.

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

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

◆ markVisibleIdx()

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

在文件 Fov.cpp342 行定义.

引用了 idx, state , 以及 visibleList.

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

◆ passesHeightToTarget()

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

在文件 Fov.cpp466 行定义.

引用了 los2() , 以及 mode.

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

◆ resetVisibleKeepExplored()

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

在文件 Fov.cpp360 行定义.

引用了 idx, state , 以及 visibleList.

被这些函数引用 compute().

◆ resize()

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

在文件 Fov.cpp281 行定义.

引用了 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.cpp223 行定义.

被这些函数引用 computeRevealer().

◆ blockEmpty

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

在文件 Fov.cpp229 行定义.

被这些函数引用 syncFromLayer().

◆ cliffBlock

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

在文件 Fov.cpp231 行定义.

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

◆ cornerPeek

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

在文件 Fov.cpp228 行定义.

被这些函数引用 losBresenham2().

◆ depth

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

在文件 Fov.cpp221 行定义.

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

◆ detectionMargin

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

在文件 Fov.cpp235 行定义.

◆ dirty

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

在文件 Fov.cpp230 行定义.

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

◆ elevation

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

在文件 Fov.cpp238 行定义.

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

◆ eyeOffset

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

在文件 Fov.cpp232 行定义.

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

◆ height

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

在文件 Fov.cpp220 行定义.

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

◆ layer

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

在文件 Fov.cpp222 行定义.

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

◆ metric

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

在文件 Fov.cpp224 行定义.

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

◆ mode

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

◆ nextRevealerId

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

在文件 Fov.cpp243 行定义.

◆ opaque

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

在文件 Fov.cpp237 行定义.

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

◆ opaqueGids

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

在文件 Fov.cpp241 行定义.

被这些函数引用 syncFromLayer().

◆ perceptionRadiusScale

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

在文件 Fov.cpp234 行定义.

被这些函数引用 effectiveRadiusOf().

◆ revealers

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

在文件 Fov.cpp242 行定义.

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

◆ state

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

在文件 Fov.cpp239 行定义.

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

◆ topology

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

◆ topologyManual

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

在文件 Fov.cpp227 行定义.

被这些函数引用 applyAutoTopologyFromLayer().

◆ verticalRange

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

在文件 Fov.cpp233 行定义.

被这些函数引用 effectiveVerticalRange().

◆ visibleList

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

在文件 Fov.cpp240 行定义.

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

◆ width

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

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