Public 成员函数 | |
| Impl (MaterialCatalog ownedCatalog=MaterialCatalog::builtIn()) | |
| const Chunk * | findChunk (int x, int y) const noexcept |
| Chunk * | findChunk (int x, int y) noexcept |
| Chunk & | ensureChunk (int x, int y) |
| bool | isMobile (MaterialId material) const noexcept |
| MaterialState | materialState (MaterialId material) const noexcept |
| void | rebuildMaterialRuntimeTables () |
| bool | canDisplace (MaterialId source, MaterialId target) const noexcept |
| std::span< const std::uint16_t > | reactionRules (MaterialId source, MaterialId target) const noexcept |
| std::uint8_t | thermalConductivity (MaterialId material) const noexcept |
| std::uint16_t | heatCapacity (MaterialId material) const noexcept |
| void | addActivity (Chunk &chunk, const PixelCell &cell) const noexcept |
| void | removeActivity (Chunk &chunk, const PixelCell &cell) const noexcept |
| void | rebuildActivity (Chunk &chunk) const noexcept |
| void | refreshTemperatureBounds (Chunk &chunk) const noexcept |
| PixelCell | get (int x, int y) const noexcept |
| PixelCell | normalizeCell (PixelCell cell) const noexcept |
| std::uint64_t | updatedAt (int x, int y) const noexcept |
| void | wakeAround (int x, int y) |
| void | put (int x, int y, PixelCell cell, std::uint64_t updatedTick, bool markUpdated=true) |
| void | putNormalizedWithinChunk (Chunk &chunk, std::size_t index, const PixelCell &cell, std::uint64_t updatedTick, bool markUpdated=true) |
| void | putWithinChunk (Chunk &chunk, std::size_t index, PixelCell cell, std::uint64_t updatedTick, bool markUpdated=true) |
| bool | moveOrSwap (int x, int y, int tx, int ty, std::uint64_t currentTick) |
| bool | moveOrSwapKnownSource (int x, int y, PixelCell source, int tx, int ty, std::uint64_t currentTick) |
| bool | moveOrSwapWithinChunk (ChunkCoord coord, Chunk &chunk, int sourceX, int sourceY, PixelCell source, int targetX, int targetY, std::uint64_t currentTick) |
| bool | pseudoBit (int x, int y, std::uint64_t currentTick) const noexcept |
Public 属性 | |
| std::unordered_map< ChunkCoord, Chunk, ChunkCoordHash > | chunks |
| std::unordered_map< ChunkCoord, std::uint64_t, ChunkCoordHash > | removedChunks |
| MaterialCatalog | catalog |
| std::vector< std::uint8_t > | canDisplaceTable |
| std::vector< MaterialState > | materialStates |
| std::vector< std::uint8_t > | thermalConductivities |
| std::vector< std::uint16_t > | heatCapacities |
| std::vector< std::vector< std::uint16_t > > | reactionRulesByPair |
| std::size_t | materialRuntimeCount = 0 |
| std::uint64_t | seed = 1 |
| std::uint64_t | revision = 0 |
| std::uint64_t | tick = 0 |
| std::uint64_t | lastEditSequence = 0 |
| std::uint64_t | worldId = nextPixelWorldId.fetch_add(1, std::memory_order_relaxed) |
| std::uint64_t | epoch = 1 |
| std::uint64_t | nextFragmentId = 1 |
| bool | paused = false |
详细描述
在文件 PixelWorld.cpp 第 93 行定义.
构造及析构函数说明
◆ Impl()
|
inlineexplicit |
在文件 PixelWorld.cpp 第 94 行定义.
成员函数说明
◆ addActivity()
|
inlinenoexcept |
在文件 PixelWorld.cpp 第 203 行定义.
引用了 eve::pixelworld::Air, cell, isMobile() , 以及 material.
被这些函数引用 put(), putNormalizedWithinChunk() , 以及 rebuildActivity().
◆ canDisplace()
|
inlinenoexcept |
在文件 PixelWorld.cpp 第 178 行定义.
引用了 canDisplaceTable, materialRuntimeCount, source , 以及 target.
被这些函数引用 moveOrSwapKnownSource() , 以及 moveOrSwapWithinChunk().
◆ ensureChunk()
|
inline |
◆ findChunk() [1/2]
|
inlinenoexcept |
◆ findChunk() [2/2]
|
inlinenoexcept |
◆ get()
|
inlinenoexcept |
在文件 PixelWorld.cpp 第 255 行定义.
引用了 findChunk(), x , 以及 y.
被这些函数引用 moveOrSwap() , 以及 moveOrSwapKnownSource().
◆ heatCapacity()
|
inlinenoexcept |
在文件 PixelWorld.cpp 第 198 行定义.
引用了 heatCapacities, index , 以及 material.
◆ isMobile()
|
inlinenoexcept |
在文件 PixelWorld.cpp 第 129 行定义.
引用了 eve::pixelworld::Empty, index, eve::pixelworld::Liquid, material, materialStates, eve::pixelworld::Powder , 以及 state.
被这些函数引用 addActivity() , 以及 removeActivity().
◆ materialState()
|
inlinenoexcept |
在文件 PixelWorld.cpp 第 136 行定义.
引用了 eve::pixelworld::Empty, index, material , 以及 materialStates.
◆ moveOrSwap()
|
inline |
在文件 PixelWorld.cpp 第 335 行定义.
引用了 get(), moveOrSwapKnownSource(), source, x , 以及 y.
◆ moveOrSwapKnownSource()
|
inline |
在文件 PixelWorld.cpp 第 340 行定义.
引用了 canDisplace(), get(), put(), source, target, wakeAround(), x , 以及 y.
被这些函数引用 moveOrSwap().
◆ moveOrSwapWithinChunk()
|
inline |
在文件 PixelWorld.cpp 第 350 行定义.
引用了 canDisplace(), eve::pixelworld::kPixelChunkSize, revision, source, sourceX, target, targetX , 以及 wakeAround().
◆ normalizeCell()
◆ pseudoBit()
|
inlinenoexcept |
◆ put()
|
inline |
在文件 PixelWorld.cpp 第 299 行定义.
引用了 addActivity(), cell, ensureChunk(), index, normalizeCell(), removeActivity(), removedChunks, revision, x , 以及 y.
被这些函数引用 moveOrSwapKnownSource().
◆ putNormalizedWithinChunk()
|
inline |
在文件 PixelWorld.cpp 第 316 行定义.
引用了 addActivity(), cell, index, removeActivity() , 以及 revision.
被这些函数引用 putWithinChunk().
◆ putWithinChunk()
|
inline |
在文件 PixelWorld.cpp 第 330 行定义.
引用了 cell, index, normalizeCell() , 以及 putNormalizedWithinChunk().
◆ reactionRules()
|
inlinenoexcept |
在文件 PixelWorld.cpp 第 185 行定义.
引用了 materialRuntimeCount, reactionRulesByPair, source , 以及 target.
◆ rebuildActivity()
|
inlinenoexcept |
在文件 PixelWorld.cpp 第 231 行定义.
引用了 addActivity() , 以及 cell.
被这些函数引用 eve::pixelworld::PixelWorld::applyChunkBatch() , 以及 eve::pixelworld::PixelWorld::restoreSnapshot().
◆ rebuildMaterialRuntimeTables()
|
inline |
在文件 PixelWorld.cpp 第 141 行定义.
引用了 canDisplaceTable, catalog, eve::pixelworld::MaterialCatalog::definition(), eve::pixelworld::MaterialCatalog::definitions(), eve::pixelworld::Empty, first, eve::pixelworld::Gas, heatCapacities, eve::pixelworld::Liquid, materialRuntimeCount, materialStates, reactionRulesByPair, eve::pixelworld::MaterialCatalog::reactions(), reactions, second, source, eve::pixelworld::MaterialDefinition::state, target , 以及 thermalConductivities.
被这些函数引用 Impl().
◆ refreshTemperatureBounds()
|
inlinenoexcept |
在文件 PixelWorld.cpp 第 243 行定义.
引用了 eve::pixelworld::Air , 以及 cell.
◆ removeActivity()
|
inlinenoexcept |
在文件 PixelWorld.cpp 第 217 行定义.
引用了 eve::pixelworld::Air, cell, isMobile() , 以及 material.
被这些函数引用 put() , 以及 putNormalizedWithinChunk().
◆ thermalConductivity()
|
inlinenoexcept |
在文件 PixelWorld.cpp 第 193 行定义.
引用了 index, material , 以及 thermalConductivities.
◆ updatedAt()
|
inlinenoexcept |
在文件 PixelWorld.cpp 第 285 行定义.
引用了 findChunk(), x , 以及 y.
◆ wakeAround()
|
inline |
在文件 PixelWorld.cpp 第 290 行定义.
引用了 chunks, cx, cy, found, ox, oy, x , 以及 y.
被这些函数引用 moveOrSwapKnownSource() , 以及 moveOrSwapWithinChunk().
类成员变量说明
◆ canDisplaceTable
| std::vector<std::uint8_t> eve::pixelworld::PixelWorld::Impl::canDisplaceTable |
在文件 PixelWorld.cpp 第 102 行定义.
被这些函数引用 canDisplace() , 以及 rebuildMaterialRuntimeTables().
◆ catalog
| MaterialCatalog eve::pixelworld::PixelWorld::Impl::catalog |
在文件 PixelWorld.cpp 第 101 行定义.
被这些函数引用 normalizeCell(), rebuildMaterialRuntimeTables() , 以及 eve::pixelworld::PixelWorld::restoreSnapshot().
◆ chunks
| std::unordered_map<ChunkCoord, Chunk, ChunkCoordHash> eve::pixelworld::PixelWorld::Impl::chunks |
◆ epoch
| std::uint64_t eve::pixelworld::PixelWorld::Impl::epoch = 1 |
在文件 PixelWorld.cpp 第 113 行定义.
被这些函数引用 eve::pixelworld::PixelWorld::applyChunkBatch() , 以及 eve::pixelworld::PixelWorld::restoreSnapshot().
◆ heatCapacities
| std::vector<std::uint16_t> eve::pixelworld::PixelWorld::Impl::heatCapacities |
在文件 PixelWorld.cpp 第 105 行定义.
被这些函数引用 heatCapacity() , 以及 rebuildMaterialRuntimeTables().
◆ lastEditSequence
| std::uint64_t eve::pixelworld::PixelWorld::Impl::lastEditSequence = 0 |
在文件 PixelWorld.cpp 第 111 行定义.
被这些函数引用 eve::pixelworld::PixelWorld::applyChunkBatch() , 以及 eve::pixelworld::PixelWorld::restoreSnapshot().
◆ materialRuntimeCount
| std::size_t eve::pixelworld::PixelWorld::Impl::materialRuntimeCount = 0 |
在文件 PixelWorld.cpp 第 107 行定义.
被这些函数引用 canDisplace(), reactionRules() , 以及 rebuildMaterialRuntimeTables().
◆ materialStates
| std::vector<MaterialState> eve::pixelworld::PixelWorld::Impl::materialStates |
在文件 PixelWorld.cpp 第 103 行定义.
被这些函数引用 isMobile(), materialState() , 以及 rebuildMaterialRuntimeTables().
◆ nextFragmentId
| std::uint64_t eve::pixelworld::PixelWorld::Impl::nextFragmentId = 1 |
在文件 PixelWorld.cpp 第 114 行定义.
被这些函数引用 eve::pixelworld::PixelWorld::applyChunkBatch() , 以及 eve::pixelworld::PixelWorld::restoreSnapshot().
◆ paused
| bool eve::pixelworld::PixelWorld::Impl::paused = false |
在文件 PixelWorld.cpp 第 115 行定义.
被这些函数引用 eve::pixelworld::PixelWorld::applyChunkBatch() , 以及 eve::pixelworld::PixelWorld::restoreSnapshot().
◆ reactionRulesByPair
| std::vector<std::vector<std::uint16_t> > eve::pixelworld::PixelWorld::Impl::reactionRulesByPair |
在文件 PixelWorld.cpp 第 106 行定义.
被这些函数引用 reactionRules() , 以及 rebuildMaterialRuntimeTables().
◆ removedChunks
| std::unordered_map<ChunkCoord, std::uint64_t, ChunkCoordHash> eve::pixelworld::PixelWorld::Impl::removedChunks |
在文件 PixelWorld.cpp 第 100 行定义.
被这些函数引用 eve::pixelworld::PixelWorld::applyChunkBatch() , 以及 put().
◆ revision
| std::uint64_t eve::pixelworld::PixelWorld::Impl::revision = 0 |
◆ seed
| std::uint64_t eve::pixelworld::PixelWorld::Impl::seed = 1 |
在文件 PixelWorld.cpp 第 108 行定义.
被这些函数引用 pseudoBit() , 以及 eve::pixelworld::PixelWorld::restoreSnapshot().
◆ thermalConductivities
| std::vector<std::uint8_t> eve::pixelworld::PixelWorld::Impl::thermalConductivities |
在文件 PixelWorld.cpp 第 104 行定义.
被这些函数引用 rebuildMaterialRuntimeTables() , 以及 thermalConductivity().
◆ tick
| std::uint64_t eve::pixelworld::PixelWorld::Impl::tick = 0 |
在文件 PixelWorld.cpp 第 110 行定义.
被这些函数引用 eve::pixelworld::PixelWorld::applyChunkBatch() , 以及 eve::pixelworld::PixelWorld::restoreSnapshot().
◆ worldId
| std::uint64_t eve::pixelworld::PixelWorld::Impl::worldId = nextPixelWorldId.fetch_add(1, std::memory_order_relaxed) |
在文件 PixelWorld.cpp 第 112 行定义.
被这些函数引用 eve::pixelworld::PixelWorld::applyChunkBatch() , 以及 eve::pixelworld::PixelWorld::restoreSnapshot().
该结构体的文档由以下文件生成:
- src/modules/pixelworld/PixelWorld.cpp