Represents a cell in the simulation grid. A cell is a fundamental unit in the simulation that can contain water, obstacles, and has physical properties that determine how water interacts with it.
Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
Value members
Abstract methods
The current absorption rate of the cell.
The current absorption rate of the cell.
Attributes
The base altitude of the cell.
The base altitude of the cell.
Attributes
The dimensions of the cell (assumes cubic cells).
The dimensions of the cell (assumes cubic cells).
Attributes
The obstacles present in this cell.
The obstacles present in this cell.
Attributes
The physics engine used to calculate water behavior in this cell.
The physics engine used to calculate water behavior in this cell.
Attributes
Updates the water volume in the cell based on incoming water.
Updates the water volume in the cell based on incoming water.
Value parameters
- incomingWater
-
the volume of incoming water to add
Attributes
- Returns
-
a new Cell instance with updated water volume and absorption
The current volume of water in the cell.
The current volume of water in the cell.
Attributes
Concrete methods
Calculates the maximum volume of water the cell can hold considering obstacles.
Calculates the maximum volume of water the cell can hold considering obstacles.
Attributes
Calculates how much more water the cell can accept before being full.
Calculates how much more water the cell can accept before being full.
Attributes
- Returns
-
the remaining capacity for water
Calculates the total height of the cell including altitude and water.
Calculates the total height of the cell including altitude and water.
Attributes
- Returns
-
the combined altitude and water height
Calculates the current height of water in the cell.
Calculates the current height of water in the cell.
Attributes
- Returns
-
the calculated water height
Calculates the current speed of water flow in the cell.
Calculates the current speed of water flow in the cell.
Attributes
- Returns
-
the calculated water speed