格子型建筑放置世界(脚本可直接操作)。 更多...
#include <PlacementWorld.h>
Public 成员函数 | |
| PlacementWorld (int width, int height, float cellSize=32.f) | |
| 创建 width×height 的格子世界,cellSize 为像素/格。 | |
| ~PlacementWorld ()=default | |
| PlacementWorld (const PlacementWorld &)=delete | |
| PlacementWorld & | operator= (const PlacementWorld &)=delete |
| void | destroy () |
| 释放资源并使其失效。 | |
| std::string | getId () const |
| 世界 id(用于变更事件定位)。 | |
| void | setId (const std::string &id) |
| int | getWidth () const |
| 尺寸 / 格子大小 / 原点。 | |
| int | getHeight () const |
| float | getCellSize () const |
| void | setCellSize (float s) |
| float | getOriginX () const |
| float | getOriginY () const |
| void | setOrigin (float x, float y) |
| std::string | getSnapMode () const |
| 放置策略:吸附模式 / 校验规则。 | |
| void | setSnapMode (const std::string &mode) |
| std::string | getValidateRule () const |
| void | setValidateRule (const std::string &rule) |
| void | setExtra (const std::string &key, const std::string &value) |
| 世界级额外属性(键值)。 | |
| std::string | getExtra (const std::string &key, const std::string &fallback={}) const |
| const grid::GridConfig & | getGrid () const |
| grid::GridConfig & | getGrid () |
| void | setGridLayout (const std::string &layout) |
| std::string | getGridLayoutName () const |
| void | setGridPlane (const std::string &plane) |
| std::string | getGridPlaneName () const |
| void | setCellGap (float gapX, float gapY) |
| void | setHexSideLength (float s) |
| void | setStagger (const std::string &axis, const std::string &index) |
| void | setGridFromLayer (map::TileLayer *layer) |
| bool | hasGridFromLayer () const |
| int | worldToCellX (float worldX) const |
| 世界像素 ↔ 格子坐标。 | |
| int | worldToCellY (float worldY) const |
| float | cellToWorldX (int cellX) const |
| float | cellToWorldY (int cellY) const |
| void | cellToWorldPlane (int cellX, int cellY, float &px, float &py) const |
| void | cellToWorld3D (int cellX, int cellY, float elevation, float &worldX, float &worldY, float &worldZ) const |
| float | cellToWorld3DX (int cellX, int cellY, float elevation) const |
| float | cellToWorld3DY (int cellX, int cellY, float elevation) const |
| float | cellToWorld3DZ (int cellX, int cellY, float elevation) const |
| void | worldToCell3D (float worldX, float worldY, float worldZ, int &cellX, int &cellY) const |
| int | worldToCell3DX (float worldX, float worldY, float worldZ) const |
| int | worldToCell3DY (float worldX, float worldY, float worldZ) const |
| void | fillTerrain (int semantic) |
| 地形语义(占用检查用)。 | |
| void | setTerrain (int cellX, int cellY, int semantic) |
| int | getTerrain (int cellX, int cellY) const |
| bool | inBounds (int cellX, int cellY) const |
| void | bindTileLayer (map::TileLayer *layer) |
| map::TileLayer * | getTileLayer () const |
| void | clearTileLayer () |
| void | setTerrainGidMapJson (const std::string &json) |
| void | setTerrainGid (int gid, int semantic) |
| void | clearTerrainGidMap () |
| int | getOccupant (int cellX, int cellY) const |
| 占用查询:格子上建筑实例 / 是否为空。 | |
| int | getOccupantInChannel (const std::string &channel, int cellX, int cellY) const |
| int | getAnyOccupant (int cellX, int cellY) const |
| bool | isCellEmpty (int cellX, int cellY) const |
| bool | isCellEmptyInChannel (const std::string &channel, int cellX, int cellY) const |
| 已放置建筑实例查询。 | |
| int | getBuildingCount () const |
| bool | hasBuilding (int instanceId) const |
| std::string | getBuildingId (int instanceId) const |
| int | getBuildingCellX (int instanceId) const |
| int | getBuildingCellY (int instanceId) const |
| float | getBuildingWorldX (int instanceId) const |
| float | getBuildingWorldY (int instanceId) const |
| float | getBuildingWorldZ (int instanceId) const |
| float | getBuildingElevation (int instanceId) const |
| std::string | getBuildingChannel (int instanceId) const |
| float | getBuildingRotation (int instanceId) const |
| std::string | getBuildingProp (int instanceId, const std::string &key, const std::string &fallback={}) const |
| void | setBuildingProp (int instanceId, const std::string &key, const std::string &value) |
| bool | buildingHasTag (int instanceId, const std::string &tag) const |
| int | getBuildingInstanceAt (int index) const |
| 按插入顺序取实例 id。 | |
| bool | canPlace (const std::string &buildingId, int cellX, int cellY, float rotationDeg=0.f) |
| 便捷操作(转发 PlacementSystem):放置 / 移除 / 移动。 | |
| std::string | canPlaceReason (const std::string &buildingId, int cellX, int cellY, float rotationDeg=0.f) |
| int | placeAt (const std::string &buildingId, int cellX, int cellY, float rotationDeg=0.f) |
| int | placeAtWorld (const std::string &buildingId, float worldX, float worldY, float rotationDeg=0.f) |
| int | placeAtWorld3D (const std::string &buildingId, float worldX, float worldY, float worldZ, float rotationDeg=0.f) |
| int | placeGhost (Ghost *ghost) |
| bool | removeBuilding (int instanceId) |
| bool | moveBuilding (int instanceId, int cellX, int cellY, float rotationDeg=-1.f) |
| void | clearBuildings () |
| const std::vector< int > & | occupancy () const |
| std::vector< int > & | occupancy () |
| const std::vector< int > & | terrain () const |
| std::vector< int > & | terrain () |
| const std::unordered_map< std::string, std::vector< int > > & | allChannels () const |
| std::unordered_map< std::string, std::vector< int > > & | allChannels () |
| std::vector< int > & | channelOccupancy (const std::string &channel) |
| const std::unordered_map< int, PlacedBuilding > & | buildings () const |
| std::unordered_map< int, PlacedBuilding > & | buildings () |
友元 | |
| class | PlacementSystem |
详细描述
格子型建筑放置世界(脚本可直接操作)。
在文件 PlacementWorld.h 第 25 行定义.
构造及析构函数说明
◆ PlacementWorld() [1/2]
| eve::building::PlacementWorld::PlacementWorld | ( | int | width, |
| int | height, | ||
| float | cellSize = 32.f |
||
| ) |
创建 width×height 的格子世界,cellSize 为像素/格。
在文件 PlacementWorld.cpp 第 17 行定义.
引用了 eve::grid::GridConfig::cellH, eve::grid::GridConfig::cellW, eve::building::PlacementSystem::ensureBuiltins(), height , 以及 width.
◆ ~PlacementWorld()
|
default |
◆ PlacementWorld() [2/2]
|
delete |
成员函数说明
◆ allChannels() [1/2]
|
inline |
在文件 PlacementWorld.h 第 163 行定义.
◆ allChannels() [2/2]
|
inline |
在文件 PlacementWorld.h 第 160 行定义.
◆ bindTileLayer()
| void eve::building::PlacementWorld::bindTileLayer | ( | map::TileLayer * | layer | ) |
在文件 PlacementWorld.cpp 第 228 行定义.
引用了 layer , 以及 setGridFromLayer().
◆ buildingHasTag()
| bool eve::building::PlacementWorld::buildingHasTag | ( | int | instanceId, |
| const std::string & | tag | ||
| ) | const |
在文件 PlacementWorld.cpp 第 378 行定义.
◆ buildings() [1/2]
|
inline |
在文件 PlacementWorld.h 第 167 行定义.
◆ buildings() [2/2]
|
inline |
在文件 PlacementWorld.h 第 166 行定义.
被这些函数引用 eve::building::PlacementSystem::clearBuildings(), eve::building::PlacementSystem::moveBuilding(), eve::building::PlacementSystem::placeAt(), eve::building::PlacementSystem::placeAtWorld(), eve::building::PlacementSystem::placeAtWorld3D(), eve::building::PlacementSystem::placeGhost(), eve::building::PlacementSystem::removeBuilding() , 以及 eve::buildingfx::BuildingFx::sync().
◆ canPlace()
| bool eve::building::PlacementWorld::canPlace | ( | const std::string & | buildingId, |
| int | cellX, | ||
| int | cellY, | ||
| float | rotationDeg = 0.f |
||
| ) |
便捷操作(转发 PlacementSystem):放置 / 移除 / 移动。
在文件 PlacementWorld.cpp 第 390 行定义.
◆ canPlaceReason()
| std::string eve::building::PlacementWorld::canPlaceReason | ( | const std::string & | buildingId, |
| int | cellX, | ||
| int | cellY, | ||
| float | rotationDeg = 0.f |
||
| ) |
在文件 PlacementWorld.cpp 第 395 行定义.
◆ cellToWorld3D()
| void eve::building::PlacementWorld::cellToWorld3D | ( | int | cellX, |
| int | cellY, | ||
| float | elevation, | ||
| float & | worldX, | ||
| float & | worldY, | ||
| float & | worldZ | ||
| ) | const |
3D 换算:cell + 高度 -> 真实世界坐标。
在文件 PlacementWorld.cpp 第 141 行定义.
引用了 eve::grid::cellToWorld(), eve::grid::GridConfig::plane, px , 以及 eve::grid::XZ.
被这些函数引用 cellToWorld3DX(), cellToWorld3DY(), cellToWorld3DZ() , 以及 eve::buildingfx::BuildingFx::updateGhost().
◆ cellToWorld3DX()
| float eve::building::PlacementWorld::cellToWorld3DX | ( | int | cellX, |
| int | cellY, | ||
| float | elevation | ||
| ) | const |
在文件 PlacementWorld.cpp 第 156 行定义.
引用了 cellToWorld3D().
◆ cellToWorld3DY()
| float eve::building::PlacementWorld::cellToWorld3DY | ( | int | cellX, |
| int | cellY, | ||
| float | elevation | ||
| ) | const |
在文件 PlacementWorld.cpp 第 162 行定义.
引用了 cellToWorld3D().
◆ cellToWorld3DZ()
| float eve::building::PlacementWorld::cellToWorld3DZ | ( | int | cellX, |
| int | cellY, | ||
| float | elevation | ||
| ) | const |
在文件 PlacementWorld.cpp 第 168 行定义.
引用了 cellToWorld3D().
◆ cellToWorldPlane()
| void eve::building::PlacementWorld::cellToWorldPlane | ( | int | cellX, |
| int | cellY, | ||
| float & | px, | ||
| float & | py | ||
| ) | const |
平面坐标对(非正交布局下两个轴必须一起换算)。
在文件 PlacementWorld.cpp 第 137 行定义.
引用了 eve::grid::cellToWorld() , 以及 px.
被这些函数引用 eve::building::PlacementSystem::canPlaceElev(), eve::buildingfx::BuildingFx::drawGrid2D(), eve::building::PlacementSystem::ensureBuiltins(), eve::building::PlacementSystem::moveBuilding() , 以及 eve::building::PlacementSystem::placeAt().
◆ cellToWorldX()
| float eve::building::PlacementWorld::cellToWorldX | ( | int | cellX | ) | const |
在文件 PlacementWorld.cpp 第 125 行定义.
引用了 eve::grid::cellToWorld() , 以及 px.
◆ cellToWorldY()
| float eve::building::PlacementWorld::cellToWorldY | ( | int | cellY | ) | const |
在文件 PlacementWorld.cpp 第 131 行定义.
引用了 eve::grid::cellToWorld() , 以及 px.
◆ channelOccupancy()
| std::vector< int > & eve::building::PlacementWorld::channelOccupancy | ( | const std::string & | channel | ) |
取某通道占用数组;空通道返回默认 occupancy_,其它懒创建。
在文件 PlacementWorld.cpp 第 271 行定义.
◆ clearBuildings()
| void eve::building::PlacementWorld::clearBuildings | ( | ) |
在文件 PlacementWorld.cpp 第 429 行定义.
◆ clearTerrainGidMap()
| void eve::building::PlacementWorld::clearTerrainGidMap | ( | ) |
在文件 PlacementWorld.cpp 第 267 行定义.
◆ clearTileLayer()
| void eve::building::PlacementWorld::clearTileLayer | ( | ) |
在文件 PlacementWorld.cpp 第 237 行定义.
◆ destroy()
| void eve::building::PlacementWorld::destroy | ( | ) |
释放资源并使其失效。
在文件 PlacementWorld.cpp 第 28 行定义.
◆ fillTerrain()
| void eve::building::PlacementWorld::fillTerrain | ( | int | semantic | ) |
◆ getAnyOccupant()
| int eve::building::PlacementWorld::getAnyOccupant | ( | int | cellX, |
| int | cellY | ||
| ) | const |
◆ getBuildingCellX()
| int eve::building::PlacementWorld::getBuildingCellX | ( | int | instanceId | ) | const |
在文件 PlacementWorld.cpp 第 320 行定义.
◆ getBuildingCellY()
| int eve::building::PlacementWorld::getBuildingCellY | ( | int | instanceId | ) | const |
在文件 PlacementWorld.cpp 第 325 行定义.
◆ getBuildingChannel()
| std::string eve::building::PlacementWorld::getBuildingChannel | ( | int | instanceId | ) | const |
在文件 PlacementWorld.cpp 第 355 行定义.
◆ getBuildingCount()
| int eve::building::PlacementWorld::getBuildingCount | ( | ) | const |
在文件 PlacementWorld.cpp 第 309 行定义.
被这些函数引用 eve::buildingfx::BuildingFx::sync().
◆ getBuildingElevation()
| float eve::building::PlacementWorld::getBuildingElevation | ( | int | instanceId | ) | const |
垂直高度(平面法向)。
在文件 PlacementWorld.cpp 第 350 行定义.
◆ getBuildingId()
| std::string eve::building::PlacementWorld::getBuildingId | ( | int | instanceId | ) | const |
在文件 PlacementWorld.cpp 第 315 行定义.
◆ getBuildingInstanceAt()
| int eve::building::PlacementWorld::getBuildingInstanceAt | ( | int | index | ) | const |
◆ getBuildingProp()
| std::string eve::building::PlacementWorld::getBuildingProp | ( | int | instanceId, |
| const std::string & | key, | ||
| const std::string & | fallback = {} |
||
| ) | const |
在文件 PlacementWorld.cpp 第 365 行定义.
◆ getBuildingRotation()
| float eve::building::PlacementWorld::getBuildingRotation | ( | int | instanceId | ) | const |
在文件 PlacementWorld.cpp 第 360 行定义.
◆ getBuildingWorldX()
| float eve::building::PlacementWorld::getBuildingWorldX | ( | int | instanceId | ) | const |
在文件 PlacementWorld.cpp 第 330 行定义.
◆ getBuildingWorldY()
| float eve::building::PlacementWorld::getBuildingWorldY | ( | int | instanceId | ) | const |
◆ getBuildingWorldZ()
| float eve::building::PlacementWorld::getBuildingWorldZ | ( | int | instanceId | ) | const |
真实世界 Z:XY 平面 = elevation;XZ 平面 = 平面第二轴。
在文件 PlacementWorld.cpp 第 343 行定义.
引用了 eve::building::PlacedBuilding::elevation, eve::grid::GridConfig::plane, eve::building::PlacedBuilding::worldY , 以及 eve::grid::XZ.
◆ getCellSize()
|
inline |
在文件 PlacementWorld.h 第 44 行定义.
◆ getExtra()
| std::string eve::building::PlacementWorld::getExtra | ( | const std::string & | key, |
| const std::string & | fallback = {} |
||
| ) | const |
在文件 PlacementWorld.cpp 第 46 行定义.
◆ getGrid() [1/2]
|
inline |
在文件 PlacementWorld.h 第 63 行定义.
◆ getGrid() [2/2]
|
inline |
◆ getGridLayoutName()
| std::string eve::building::PlacementWorld::getGridLayoutName | ( | ) | const |
在文件 PlacementWorld.cpp 第 57 行定义.
引用了 eve::grid::GridConfig::layout , 以及 eve::grid::GridConfig::layoutName().
◆ getGridPlaneName()
| std::string eve::building::PlacementWorld::getGridPlaneName | ( | ) | const |
在文件 PlacementWorld.cpp 第 65 行定义.
引用了 eve::grid::GridConfig::plane , 以及 eve::grid::GridConfig::planeName().
◆ getHeight()
|
inline |
在文件 PlacementWorld.h 第 43 行定义.
被这些函数引用 eve::buildingfx::BuildingFx::drawGrid2D() , 以及 eve::building::PlacementSystem::ensureBuiltins().
◆ getId()
|
inline |
世界 id(用于变更事件定位)。
在文件 PlacementWorld.h 第 38 行定义.
被这些函数引用 eve::building::PlacementSystem::moveBuilding(), eve::building::PlacementSystem::placeAt() , 以及 eve::building::PlacementSystem::removeBuilding().
◆ getOccupant()
| int eve::building::PlacementWorld::getOccupant | ( | int | cellX, |
| int | cellY | ||
| ) | const |
占用查询:格子上建筑实例 / 是否为空。
默认通道("")占用。
在文件 PlacementWorld.cpp 第 278 行定义.
被这些函数引用 eve::building::PlacementSession::execute() , 以及 isCellEmpty().
◆ getOccupantInChannel()
| int eve::building::PlacementWorld::getOccupantInChannel | ( | const std::string & | channel, |
| int | cellX, | ||
| int | cellY | ||
| ) | const |
在文件 PlacementWorld.cpp 第 282 行定义.
引用了 idx , 以及 inBounds().
被这些函数引用 getAnyOccupant(), getOccupant() , 以及 isCellEmptyInChannel().
◆ getOriginX()
|
inline |
在文件 PlacementWorld.h 第 47 行定义.
◆ getOriginY()
|
inline |
在文件 PlacementWorld.h 第 48 行定义.
◆ getSnapMode()
|
inline |
◆ getTerrain()
| int eve::building::PlacementWorld::getTerrain | ( | int | cellX, |
| int | cellY | ||
| ) | const |
手动 setTerrain 优先;绑定 tilemap 后未覆盖的格由 GID 映射懒解析。
在文件 PlacementWorld.cpp 第 207 行定义.
引用了 idx , 以及 inBounds().
◆ getTileLayer()
|
inline |
在文件 PlacementWorld.h 第 105 行定义.
◆ getValidateRule()
|
inline |
在文件 PlacementWorld.h 第 54 行定义.
◆ getWidth()
|
inline |
尺寸 / 格子大小 / 原点。
在文件 PlacementWorld.h 第 42 行定义.
被这些函数引用 eve::buildingfx::BuildingFx::drawGrid2D() , 以及 eve::building::PlacementSystem::ensureBuiltins().
◆ hasBuilding()
| bool eve::building::PlacementWorld::hasBuilding | ( | int | instanceId | ) | const |
在文件 PlacementWorld.cpp 第 311 行定义.
◆ hasGridFromLayer()
|
inline |
在文件 PlacementWorld.h 第 73 行定义.
◆ inBounds()
| bool eve::building::PlacementWorld::inBounds | ( | int | cellX, |
| int | cellY | ||
| ) | const |
在文件 PlacementWorld.cpp 第 222 行定义.
被这些函数引用 getOccupantInChannel(), getTerrain() , 以及 setTerrain().
◆ isCellEmpty()
| bool eve::building::PlacementWorld::isCellEmpty | ( | int | cellX, |
| int | cellY | ||
| ) | const |
在文件 PlacementWorld.cpp 第 301 行定义.
引用了 getOccupant().
◆ isCellEmptyInChannel()
| bool eve::building::PlacementWorld::isCellEmptyInChannel | ( | const std::string & | channel, |
| int | cellX, | ||
| int | cellY | ||
| ) | const |
◆ moveBuilding()
| bool eve::building::PlacementWorld::moveBuilding | ( | int | instanceId, |
| int | cellX, | ||
| int | cellY, | ||
| float | rotationDeg = -1.f |
||
| ) |
在文件 PlacementWorld.cpp 第 425 行定义.
◆ occupancy() [1/2]
|
inline |
在文件 PlacementWorld.h 第 157 行定义.
◆ occupancy() [2/2]
|
inline |
在文件 PlacementWorld.h 第 156 行定义.
◆ operator=()
|
delete |
◆ placeAt()
| int eve::building::PlacementWorld::placeAt | ( | const std::string & | buildingId, |
| int | cellX, | ||
| int | cellY, | ||
| float | rotationDeg = 0.f |
||
| ) |
在文件 PlacementWorld.cpp 第 402 行定义.
◆ placeAtWorld()
| int eve::building::PlacementWorld::placeAtWorld | ( | const std::string & | buildingId, |
| float | worldX, | ||
| float | worldY, | ||
| float | rotationDeg = 0.f |
||
| ) |
在文件 PlacementWorld.cpp 第 407 行定义.
◆ placeAtWorld3D()
| int eve::building::PlacementWorld::placeAtWorld3D | ( | const std::string & | buildingId, |
| float | worldX, | ||
| float | worldY, | ||
| float | worldZ, | ||
| float | rotationDeg = 0.f |
||
| ) |
在文件 PlacementWorld.cpp 第 412 行定义.
◆ placeGhost()
| int eve::building::PlacementWorld::placeGhost | ( | Ghost * | ghost | ) |
在文件 PlacementWorld.cpp 第 417 行定义.
◆ removeBuilding()
| bool eve::building::PlacementWorld::removeBuilding | ( | int | instanceId | ) |
在文件 PlacementWorld.cpp 第 421 行定义.
◆ setBuildingProp()
| void eve::building::PlacementWorld::setBuildingProp | ( | int | instanceId, |
| const std::string & | key, | ||
| const std::string & | value | ||
| ) |
在文件 PlacementWorld.cpp 第 371 行定义.
引用了 value.
◆ setCellGap()
| void eve::building::PlacementWorld::setCellGap | ( | float | gapX, |
| float | gapY | ||
| ) |
在文件 PlacementWorld.cpp 第 69 行定义.
引用了 eve::grid::GridConfig::cellGapX , 以及 eve::grid::GridConfig::cellGapY.
◆ setCellSize()
| void eve::building::PlacementWorld::setCellSize | ( | float | s | ) |
在文件 PlacementWorld.cpp 第 30 行定义.
引用了 eve::grid::GridConfig::cellH, eve::grid::GridConfig::cellW , 以及 s.
◆ setExtra()
| void eve::building::PlacementWorld::setExtra | ( | const std::string & | key, |
| const std::string & | value | ||
| ) |
◆ setGridFromLayer()
| void eve::building::PlacementWorld::setGridFromLayer | ( | map::TileLayer * | layer | ) |
复用 TileLayer 的投影(orientation / stagger / hex / 尺寸 / 原点)。
在文件 PlacementWorld.cpp 第 83 行定义.
引用了 c, eve::grid::GridConfig::cellH, eve::grid::GridConfig::cellW, eve::grid::Even, eve::grid::Hexagon, eve::map::Hexagonal, eve::grid::GridConfig::hexSideLength, eve::grid::Isometric, eve::map::Isometric, layer, eve::grid::GridConfig::layout, eve::grid::Odd, eve::map::Odd, eve::grid::GridConfig::originX, eve::grid::GridConfig::originY, eve::map::Orthogonal, eve::grid::Rectangle, eve::grid::GridConfig::staggerAxis, eve::grid::Staggered, eve::map::Staggered, eve::grid::GridConfig::staggerIndex, eve::grid::X, eve::grid::Y , 以及 eve::map::Y.
被这些函数引用 bindTileLayer().
◆ setGridLayout()
| void eve::building::PlacementWorld::setGridLayout | ( | const std::string & | layout | ) |
在文件 PlacementWorld.cpp 第 53 行定义.
引用了 eve::grid::GridConfig::layout, layout , 以及 eve::grid::GridConfig::layoutFromName().
◆ setGridPlane()
| void eve::building::PlacementWorld::setGridPlane | ( | const std::string & | plane | ) |
在文件 PlacementWorld.cpp 第 61 行定义.
引用了 eve::grid::GridConfig::plane , 以及 eve::grid::GridConfig::planeFromName().
◆ setHexSideLength()
| void eve::building::PlacementWorld::setHexSideLength | ( | float | s | ) |
在文件 PlacementWorld.cpp 第 74 行定义.
引用了 eve::grid::GridConfig::hexSideLength , 以及 s.
◆ setId()
|
inline |
在文件 PlacementWorld.h 第 39 行定义.
引用了 id.
◆ setOrigin()
| void eve::building::PlacementWorld::setOrigin | ( | float | x, |
| float | y | ||
| ) |
在文件 PlacementWorld.cpp 第 37 行定义.
引用了 eve::grid::GridConfig::originX, eve::grid::GridConfig::originY, x , 以及 y.
◆ setSnapMode()
|
inline |
在文件 PlacementWorld.h 第 53 行定义.
◆ setStagger()
| void eve::building::PlacementWorld::setStagger | ( | const std::string & | axis, |
| const std::string & | index | ||
| ) |
◆ setTerrain()
| void eve::building::PlacementWorld::setTerrain | ( | int | cellX, |
| int | cellY, | ||
| int | semantic | ||
| ) |
在文件 PlacementWorld.cpp 第 200 行定义.
引用了 idx, inBounds() , 以及 semantic.
◆ setTerrainGid()
| void eve::building::PlacementWorld::setTerrainGid | ( | int | gid, |
| int | semantic | ||
| ) |
在文件 PlacementWorld.cpp 第 263 行定义.
引用了 semantic.
◆ setTerrainGidMapJson()
| void eve::building::PlacementWorld::setTerrainGidMapJson | ( | const std::string & | json | ) |
在文件 PlacementWorld.cpp 第 244 行定义.
◆ setValidateRule()
|
inline |
在文件 PlacementWorld.h 第 55 行定义.
◆ terrain() [1/2]
|
inline |
在文件 PlacementWorld.h 第 159 行定义.
◆ terrain() [2/2]
|
inline |
在文件 PlacementWorld.h 第 158 行定义.
◆ worldToCell3D()
| void eve::building::PlacementWorld::worldToCell3D | ( | float | worldX, |
| float | worldY, | ||
| float | worldZ, | ||
| int & | cellX, | ||
| int & | cellY | ||
| ) | const |
3D 拾取:真实世界坐标 -> 最近格子。
在文件 PlacementWorld.cpp 第 174 行定义.
引用了 eve::grid::GridConfig::plane, px, eve::grid::worldToCell() , 以及 eve::grid::XZ.
被这些函数引用 worldToCell3DX() , 以及 worldToCell3DY().
◆ worldToCell3DX()
| int eve::building::PlacementWorld::worldToCell3DX | ( | float | worldX, |
| float | worldY, | ||
| float | worldZ | ||
| ) | const |
在文件 PlacementWorld.cpp 第 181 行定义.
引用了 cx, cy , 以及 worldToCell3D().
◆ worldToCell3DY()
| int eve::building::PlacementWorld::worldToCell3DY | ( | float | worldX, |
| float | worldY, | ||
| float | worldZ | ||
| ) | const |
在文件 PlacementWorld.cpp 第 187 行定义.
引用了 cx, cy , 以及 worldToCell3D().
◆ worldToCellX()
| int eve::building::PlacementWorld::worldToCellX | ( | float | worldX | ) | const |
世界像素 ↔ 格子坐标。
worldX 恒为平面 X 轴。
在文件 PlacementWorld.cpp 第 113 行定义.
引用了 cx, cy , 以及 eve::grid::worldToCell().
被这些函数引用 eve::building::PlacementSystem::ensureBuiltins() , 以及 eve::building::PlacementSystem::snapWithMode().
◆ worldToCellY()
| int eve::building::PlacementWorld::worldToCellY | ( | float | worldY | ) | const |
worldY 为平面第二轴(XY 平面 = 世界 Y;XZ 平面 = 世界 Z)。
在文件 PlacementWorld.cpp 第 119 行定义.
引用了 cx, cy , 以及 eve::grid::worldToCell().
被这些函数引用 eve::building::PlacementSystem::ensureBuiltins() , 以及 eve::building::PlacementSystem::snapWithMode().
友元及相关函数文档
◆ PlacementSystem
|
friend |
在文件 PlacementWorld.h 第 170 行定义.
该类的文档由以下文件生成:
- src/modules/building/PlacementWorld.h
- src/modules/building/PlacementWorld.cpp