Renderer/src/main/c/includes/fluid/queue/chunk.h
austin 78ed5b831e
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
chunk residual tracking
2024-12-11 21:08:00 -05:00

88 lines
1.4 KiB
C

#include <jni.h>
//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