类 | |
| 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 |
| 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< Revealer > | revealers |
| int | nextRevealerId = 1 |
详细描述
成员函数说明
◆ addAngleShadow()
|
inline |
被这些函数引用 computeHexShadowcast().
◆ angleFullyCovered()
|
inline |
◆ applyAutoTopologyFromLayer()
|
inline |
引用了 eve::map::Hexagonal, layer, eve::map::Staggered, topology , 以及 topologyManual.
被这些函数引用 bindLayer() , 以及 syncFromLayer().
◆ bindLayer()
|
inline |
引用了 applyAutoTopologyFromLayer(), layer, mode, resize() , 以及 syncFromLayer().
◆ buildOpaqueRects()
|
inline |
引用了 cellOpaqueOnSlice(), height, inRadius2(), width, x , 以及 y.
被这些函数引用 computeRectangle().
◆ castLight()
|
inline |
引用了 castLight(), cellOpaqueOnSlice() , 以及 tryMark2().
被这些函数引用 castLight() , 以及 computeOrthoShadowcast().
◆ castRayLine()
|
inline |
引用了 cellOpaqueOnSlice(), n, topology, tryMark2(), x , 以及 y.
被这些函数引用 computeRaycast().
◆ cellOpaque2()
|
inline |
◆ cellOpaque3()
|
inline |
引用了 inBounds3(), index3(), opaque, x, y , 以及 z.
被这些函数引用 cellOpaqueOnSlice() , 以及 extendVertical().
◆ cellOpaqueOnSlice()
|
inline |
引用了 cellOpaque2(), cellOpaque3(), mode, x , 以及 y.
被这些函数引用 buildOpaqueRects(), castLight(), castRayLine(), computeHexShadowcast(), computePermissive(), losBresenham2() , 以及 losHexCube().
◆ clearAllMemory()
|
inline |
引用了 dirty, state , 以及 visibleList.
◆ compute()
|
inline |
引用了 computeRevealer(), dirty, resetVisibleKeepExplored() , 以及 revealers.
◆ computeHexShadowcast()
|
inline |
引用了 addAngleShadow(), angleFullyCovered(), cellOpaqueOnSlice(), eve::map::Fov::Impl::Revealer::facingDeg, eve::map::Fov::Impl::Revealer::halfAngleDeg, hexCellAngle(), inBounds2(), inRadius2(), passesHeightToTarget(), s, step, tryMark2(), eve::map::Fov::Impl::Revealer::useCone, x, eve::map::Fov::Impl::Revealer::x, y , 以及 eve::map::Fov::Impl::Revealer::y.
被这些函数引用 computeShadowcast().
◆ computeOrthoShadowcast()
|
inline |
◆ computePermissive()
|
inline |
引用了 c, cellOpaqueOnSlice(), eve::map::Fov::Impl::Revealer::facingDeg, eve::map::Fov::Impl::Revealer::halfAngleDeg, inBounds2(), inRadius2(), los2(), mode, tryMark2(), eve::map::Fov::Impl::Revealer::useCone, eve::map::Fov::Impl::Revealer::x , 以及 eve::map::Fov::Impl::Revealer::y.
被这些函数引用 computeRevealer().
◆ computeRaycast()
|
inline |
◆ computeRectangle()
|
inline |
引用了 a, b, buildOpaqueRects(), eve::map::Fov::Impl::Revealer::facingDeg, eve::map::Fov::Impl::Revealer::halfAngleDeg, height, index2(), inRadius2(), passesHeightToTarget(), tryMark2(), eve::map::Fov::Impl::Revealer::useCone, width, x, eve::map::Fov::Impl::Revealer::x, y , 以及 eve::map::Fov::Impl::Revealer::y.
被这些函数引用 computeRevealer().
◆ computeRevealer()
|
inline |
引用了 algorithm, computePermissive(), computeRaycast(), computeRectangle(), computeShadowcast(), effectiveRadiusOf(), eve::map::Fov::Impl::Revealer::enabled, extendVertical(), inBounds2(), inBounds3(), mode, eve::map::Fov::Impl::Revealer::x, eve::map::Fov::Impl::Revealer::y , 以及 eve::map::Fov::Impl::Revealer::z.
被这些函数引用 compute().
◆ computeShadowcast()
|
inline |
引用了 computeHexShadowcast(), computeOrthoShadowcast() , 以及 topology.
被这些函数引用 computeRevealer().
◆ effectiveRadiusOf()
|
inline |
◆ effectiveVerticalRange()
|
inline |
◆ elevAt()
|
inline |
引用了 elevation, inBounds2(), index2(), x , 以及 y.
被这些函数引用 losBresenham2() , 以及 losHexCube().
◆ extendVertical()
|
inline |
◆ findRevealer()
◆ findRevealerConst()
|
inline |
◆ hexCellAngle()
|
inline |
◆ inBounds2()
|
inline |
◆ inBounds3()
|
inline |
引用了 depth, inBounds2(), x, y , 以及 z.
被这些函数引用 cellOpaque3(), computeRevealer() , 以及 markVisible3().
◆ index2()
|
inline |
被这些函数引用 cellOpaque2(), computeRectangle(), elevAt() , 以及 markVisible2().
◆ index3()
|
inline |
引用了 height, width, x, y , 以及 z.
被这些函数引用 cellOpaque3(), extendVertical() , 以及 markVisible3().
◆ inRadius2()
|
inline |
引用了 metric, topology, x , 以及 y.
被这些函数引用 buildOpaqueRects(), computeHexShadowcast(), computePermissive(), computeRectangle() , 以及 tryMark2().
◆ inRadius3()
|
inline |
◆ los2()
|
inline |
引用了 losBresenham2(), losHexCube() , 以及 topology.
被这些函数引用 computePermissive() , 以及 passesHeightToTarget().
◆ losBresenham2()
|
inline |
引用了 cellOpaqueOnSlice(), cliffBlock, cornerPeek, elevAt(), eyeOffset, mode, x , 以及 y.
被这些函数引用 los2().
◆ losHexCube()
|
inline |
◆ markVisible2()
|
inline |
◆ markVisible3()
|
inline |
引用了 inBounds3(), index3(), markVisibleIdx(), x, y , 以及 z.
被这些函数引用 extendVertical() , 以及 tryMark2().
◆ markVisibleIdx()
|
inline |
◆ passesHeightToTarget()
|
inline |
被这些函数引用 computeHexShadowcast(), computeRectangle() , 以及 tryMark2().
◆ resetVisibleKeepExplored()
|
inline |
◆ resize()
|
inline |
◆ syncFromLayer()
|
inline |
引用了 applyAutoTopologyFromLayer(), blockEmpty, depth, dirty, height, eve::map::Fov::isOpaque(), layer, n, opaque, opaqueGids, resize(), eve::map::tileGid(), tiles, u , 以及 width.
被这些函数引用 bindLayer().
◆ tryMark2()
|
inline |
类成员变量说明
◆ algorithm
| Algorithm eve::map::Fov::Impl::algorithm = Algorithm::Shadowcast |
被这些函数引用 computeRevealer().
◆ blockEmpty
| bool eve::map::Fov::Impl::blockEmpty = true |
被这些函数引用 syncFromLayer().
◆ cliffBlock
| float eve::map::Fov::Impl::cliffBlock = 1.f |
被这些函数引用 losBresenham2() , 以及 losHexCube().
◆ cornerPeek
| bool eve::map::Fov::Impl::cornerPeek = false |
被这些函数引用 losBresenham2().
◆ depth
| int eve::map::Fov::Impl::depth = 1 |
被这些函数引用 effectiveVerticalRange(), extendVertical(), inBounds3(), resize() , 以及 syncFromLayer().
◆ detectionMargin
◆ dirty
| bool eve::map::Fov::Impl::dirty = true |
被这些函数引用 clearAllMemory(), compute(), resize() , 以及 syncFromLayer().
◆ elevation
| std::vector<float> eve::map::Fov::Impl::elevation |
◆ eyeOffset
| float eve::map::Fov::Impl::eyeOffset = 0.f |
被这些函数引用 losBresenham2() , 以及 losHexCube().
◆ height
| int eve::map::Fov::Impl::height = 0 |
被这些函数引用 buildOpaqueRects(), computeRectangle(), extendVertical(), inBounds2(), index3(), resize() , 以及 syncFromLayer().
◆ layer
| TileLayer* eve::map::Fov::Impl::layer = nullptr |
被这些函数引用 applyAutoTopologyFromLayer(), bindLayer() , 以及 syncFromLayer().
◆ metric
| RadiusMetric eve::map::Fov::Impl::metric = RadiusMetric::Euclidean |
被这些函数引用 inRadius2() , 以及 inRadius3().
◆ mode
| Mode eve::map::Fov::Impl::mode = Mode::Grid2D |
◆ nextRevealerId
◆ opaque
| std::vector<uint8_t> eve::map::Fov::Impl::opaque |
被这些函数引用 cellOpaque2(), cellOpaque3(), resize() , 以及 syncFromLayer().
◆ opaqueGids
| std::unordered_set<uint32_t> eve::map::Fov::Impl::opaqueGids |
被这些函数引用 syncFromLayer().
◆ perceptionRadiusScale
| float eve::map::Fov::Impl::perceptionRadiusScale = 0.f |
被这些函数引用 effectiveRadiusOf().
◆ revealers
| std::vector<Revealer> eve::map::Fov::Impl::revealers |
被这些函数引用 compute(), findRevealer() , 以及 findRevealerConst().
◆ state
| std::vector<CellState> eve::map::Fov::Impl::state |
被这些函数引用 clearAllMemory(), extendVertical(), markVisibleIdx(), resetVisibleKeepExplored() , 以及 resize().
◆ topology
| Topology eve::map::Fov::Impl::topology = Topology::Ortho |
◆ topologyManual
| bool eve::map::Fov::Impl::topologyManual = false |
被这些函数引用 applyAutoTopologyFromLayer().
◆ verticalRange
| int eve::map::Fov::Impl::verticalRange = -1 |
被这些函数引用 effectiveVerticalRange().
◆ visibleList
| std::vector<int> eve::map::Fov::Impl::visibleList |
被这些函数引用 clearAllMemory(), markVisibleIdx(), resetVisibleKeepExplored() , 以及 resize().
◆ width
| int eve::map::Fov::Impl::width = 0 |
被这些函数引用 buildOpaqueRects(), computeRectangle(), extendVertical(), inBounds2(), index2(), index3(), resize() , 以及 syncFromLayer().
该结构体的文档由以下文件生成:
- src/modules/map/Fov.cpp