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


Public Member Functions | |
| AverageShareTemperatureWorldUpdater (double temperatureExchangeCoefficient, std::shared_ptr< ITemperatureWorldBoundable< ITemperatureWorld >> world, std::shared_ptr< ITimerBlockable< ITimer >> timer) | |
| void | update () override |
| bool | canAddNearChunk (Edge edge, const std::shared_ptr< ITemperatureWorldBoundable< ITemperatureWorld >> &chunk) const noexceptoverride |
| void | addNearChunk (Edge edge, std::shared_ptr< ITemperatureWorldBoundable< ITemperatureWorld >> chunk) override |
Public Member Functions inherited from IUpdater | |
| virtual | ~IUpdater () noexcept=default |
Protected Member Functions | |
| void | _checkThenShareTemperature (double dt, const std::shared_ptr< ITemperatureWorldBoundable< ITemperatureWorld >> &firstWorld, Coord x, Coord y, Coord z, const std::shared_ptr< ITemperatureWorldBoundable< ITemperatureWorld >> &secondWorld, Coord nextX, Coord nextY, Coord nextZ) |
| void | _shareTemperature (double dt, const std::shared_ptr< ITemperatureWorldBoundable< ITemperatureWorld >> &firstWorld, Coord x, Coord y, Coord z, const std::shared_ptr< ITemperatureWorldBoundable< ITemperatureWorld >> &secondWorld, Coord nextX, Coord nextY, Coord nextZ) |
Protected Attributes | |
| double | _temperatureExchangeCoefficient |
| std::shared_ptr < ITemperatureWorldBoundable < ITemperatureWorld > > | _world |
| std::shared_ptr < ITimerBlockable< ITimer > > | _timer |
| std::shared_ptr < ITemperatureWorldBoundable < ITemperatureWorld > > | _nearRightChunk |
| std::shared_ptr < ITemperatureWorldBoundable < ITemperatureWorld > > | _nearUpChunk |
| std::shared_ptr < ITemperatureWorldBoundable < ITemperatureWorld > > | _nearFarChunk |
Implementation of temperature world updater.
How it works for every two cells:
| AverageShareTemperatureWorldUpdater::AverageShareTemperatureWorldUpdater | ( | double | temperatureExchangeCoefficient, |
| std::shared_ptr< ITemperatureWorldBoundable< ITemperatureWorld >> | world, | ||
| std::shared_ptr< ITimerBlockable< ITimer >> | timer | ||
| ) |
|
protected |


|
protected |


|
overridevirtual |
Adds chunk to near chunks collection on specified edge.
| otherChunk | Near chunk. |
Implements IUpdaterTemperatureWorldSemiChunkUpdatableMixin.

|
overridevirtualnoexcept |
Tells whether it's possible to add this chunk to near chunks collection on specified edge. This method is thread-safe.
| otherChunk | Near chunk. |
Implements IUpdaterTemperatureWorldSemiChunkUpdatableMixin.

|
overridevirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
1.8.6