CASimEngine
An engine to run cellular automata simulations over a collection of voxels.
import CASimEngine
Module information
- Declarations
- 30
- Symbols
- 31
Overview
The library provides the structure drive a cellular automata simulation in 3-dimensions using voxels. The library provides a structure for rules, which you add to a simulation to run. The engine provides a computed property, voxels
, to access the results as you increment the simulation. Call tick(deltaTime:)
to increment the simulation.
Creating a Simulation Engine
class CASimulationEngine<T>
A cellular automata simulation engine.
Writing Simulation Rules
protocol CASimulationRule<VoxelType>
A type that processes voxels within a cellular automata simulation.
enum CARuleScope
The set of voxels for a rule to process.
struct CARuleResult
A type that represents the result of processing a simulation rule.
Receiving Diagnostics from Rules
struct CADiagnostic
A diagnostic event from processing a single voxel.
struct CADetailedDiagnostic<T>
A detailed diagnostic event from processing a single voxel.