-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSimulationBackend.cs
More file actions
45 lines (40 loc) · 1.4 KB
/
Copy pathSimulationBackend.cs
File metadata and controls
45 lines (40 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
namespace lifeviz;
internal interface ISimulationBackend : IDisposable
{
int Columns { get; }
int Rows { get; }
int Depth { get; }
double AspectRatio { get; }
GameOfLifeEngine.LifeMode Mode { get; }
GameOfLifeEngine.BinningMode BinMode { get; }
int RDepth { get; }
int GDepth { get; }
int BDepth { get; }
GameOfLifeEngine.InjectionMode InjectMode { get; }
void Configure(int requestedRows, int requestedDepth, double? aspectRatio = null);
void SetBinningMode(GameOfLifeEngine.BinningMode mode);
void SetInjectionMode(GameOfLifeEngine.InjectionMode mode);
void SetMode(GameOfLifeEngine.LifeMode mode);
void Randomize();
void Step();
void FillColorBuffer(byte[] targetBuffer);
void InjectFrame(bool[,] frame);
void InjectRgbFrame(bool[,] red, bool[,] green, bool[,] blue);
}
internal interface IGpuSimulationSurfaceBackend : ISimulationBackend
{
bool TryInjectCompositeSurface(
GpuCompositeSurface? compositeSurface,
double min,
double max,
bool invertThreshold,
GameOfLifeEngine.InjectionMode mode,
double noiseProbability,
int period,
int pulseStep,
bool invertInput,
double hueShiftDegrees = 0.0);
bool TryGetSharedColorTexture(out IntPtr sharedHandle, out int width, out int height);
bool TryGetColorSurface(out GpuCompositeSurface? surface);
}