![]() |
Recast
1
Game with custom magic
|
#include <ChunkedTemperatureWorld.hpp>


Public Member Functions | |
| ChunkedTemperatureWorld () | |
| bool | hasChunk (Coord x, Coord y, Coord z) const noexceptoverride |
| std::shared_ptr < ITemperatureWorldBoundable < ITemperatureWorld > > | getChunk (Coord x, Coord y, Coord z) const override |
| void | foreachChunk (ForeachChunkFn func) const override |
| bool | has (Coord x, Coord y, Coord z) const noexceptoverride |
| Temperature | get (Coord x, Coord y, Coord z) const override |
| void | set (Coord x, Coord y, Coord z, Temperature temperature) override |
| void | amplify (Coord x, Coord y, Coord z, Temperature temperature) override |
| void | addChunk (std::shared_ptr< ITemperatureWorldBoundable< ITemperatureWorld >> chunk) override |
| void | removeChunk (std::shared_ptr< ITemperatureWorldBoundable< ITemperatureWorld >> chunk) override |
| Coord | previousCoordX (Coord x) const noexceptoverride |
| Coord | previousCoordY (Coord y) const noexceptoverride |
| Coord | previousCoordZ (Coord z) const noexceptoverride |
| Coord | nextCoordX (Coord x) const noexceptoverride |
| Coord | nextCoordY (Coord y) const noexceptoverride |
| Coord | nextCoordZ (Coord z) const noexceptoverride |
Public Member Functions inherited from ITemperatureWorld | |
| virtual | ~ITemperatureWorld () noexcept=default |
Protected Attributes | |
| std::list< std::shared_ptr < ITemperatureWorldBoundable < ITemperatureWorld > > > | _chunks |
Additional Inherited Members | |
Public Types inherited from ITemperatureWorldChunkableMixin | |
| using | ForeachChunkFn = std::function< void(const std::shared_ptr< ITemperatureWorldBoundable< ITemperatureWorld >> &)> |
Implementation of temperature world divided by chunks. It's backed by std::list.
| ChunkedTemperatureWorld::ChunkedTemperatureWorld | ( | ) |
|
overridevirtual |
Adds a chunk to this temperature world.
| chunk | Chunk to add. |
Implements ITemperatureWorldChunkableMutableMixin.
Reimplemented in ScalingGeneratableChunkedTemperatureWorld, and GeneratableChunkedTemperatureWorld.

|
overridevirtual |
Adds or substracts temperature value from existing temperature value at the point.
| x | X coordinate. |
| y | Y coordinate. |
| z | Z coordinate. |
| temperature | Temperature difference. |
Implements ITemperatureWorld.
|
overridevirtual |
Loops over each chunk.
| func | Function to execute at each chunk. |
Implements ITemperatureWorldChunkableMixin.
|
overridevirtual |
Returns temperature at the point.
| x | X coordinate. |
| y | Y coordinate. |
| z | Z coordinate. |
Implements ITemperatureWorld.
|
overridevirtual |
Retrieves chunk which holds this point.
| x | X coordinate. |
| y | Y coordinate. |
| z | Z coordinate. |
Implements ITemperatureWorldChunkableMixin.
Tells whether temperature at the point is accessible. This method doesn't throw exceptions.
| x | X coordinate. |
| y | Y coordinate. |
| z | Z coordinate. |
Implements ITemperatureWorld.
Tells whether the chunk which holds this point exists. This method doesn't throw exceptions.
| x | X coordinate. |
| y | Y coordinate. |
| z | Z coordinate. |
Implements ITemperatureWorldChunkableMixin.
| x | Current coordinate by x axis. |
Implements ITemperatureWorld.
| y | Current coordinate by y axis. |
Implements ITemperatureWorld.
| z | Current coordinate by z axis. |
Implements ITemperatureWorld.
| x | Current coordinate by x axis. |
Implements ITemperatureWorld.
| y | Current coordinate by y axis. |
Implements ITemperatureWorld.
| z | Current coordinate by z axis. |
Implements ITemperatureWorld.
|
overridevirtual |
Removes chunk from this temperature world.
| chunk | Chunk to remove. |
Implements ITemperatureWorldChunkableMutableMixin.
Reimplemented in ScalingGeneratableChunkedTemperatureWorld, and GeneratableChunkedTemperatureWorld.

|
overridevirtual |
Sets temperature at the point.
| x | X coordinate. |
| y | Y coordinate. |
| z | Z coordinate. |
| temperature | Temperature to set. |
Implements ITemperatureWorld.
|
protected |
1.8.6