#include //Must be included for public functions to be imported/exported on windows #include "public.h" #ifndef CHUNK_H #define CHUNK_H /** * The minimum fluid value */ #define MIN_FLUID_VALUE 0.0f /** * The maximum fluid value */ #define MAX_FLUID_VALUE 1.0f /** * The cutoff value for the bounds array */ #define BOUND_CUTOFF_VALUE 0.0f /** * Maximum value of bounds array for it to be considered a blocker */ #define BOUND_MAX_VALUE 1.0f /** * The dimension of a single chunk's array */ #define DIM 18 /** * The spacing between chunks */ #define CHUNK_SPACING 16 /** * A chunk */ typedef struct { float * d[27]; float * d0[27]; float * u[27]; float * v[27]; float * w[27]; float * u0[27]; float * v0[27]; float * w0[27]; float * bounds[27]; int chunkMask; jobject chunkJRaw; /** * The world x coordinate of this chunk */ int x; /** * The world y coordinate of this chunk */ int y; /** * The world z coordinate of this chunk */ int z; /** * The level of detail to simulate the chunk with * NOTE: This is not a spatial LOD. It is a simulation LOD */ int simLOD; /** * The convergence of this chunk */ float projectionResidual; /** * The number of iterations this chunk took to project */ int projectionIterations; } Chunk; #endif