define cellular simulator
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2024-12-06 15:19:59 -05:00
parent 5c44d36f25
commit 89b4fbb862
7 changed files with 47 additions and 9 deletions

View File

@ -33,6 +33,7 @@
"sparsesimulator.h": "c", "sparsesimulator.h": "c",
"environment.h": "c", "environment.h": "c",
"simulator.h": "c", "simulator.h": "c",
"dispatcher.h": "c" "dispatcher.h": "c",
"cellular.h": "c"
} }
} }

View File

@ -1,3 +1,3 @@
#maven.buildNumber.plugin properties file #maven.buildNumber.plugin properties file
#Fri Dec 06 14:33:08 EST 2024 #Fri Dec 06 15:07:16 EST 2024
buildNumber=523 buildNumber=525

View File

@ -1253,6 +1253,7 @@ Refactor native test code under src/test
More test file refactoring More test file refactoring
Native fluid chunk dispatcher Native fluid chunk dispatcher
Dedicated native fluid simulator Dedicated native fluid simulator
Define cellular simulator

View File

@ -22,6 +22,6 @@ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE= -D CMAKE_INSTALL_PREFIX=$
cmake --build ${PWD}/out/build cmake --build ${PWD}/out/build
#copy to expected folder #copy to expected folder
mkdir ${PWD}/shared-folder mkdir -p ${PWD}/shared-folder
rm ${PWD}/shared-folder/libStormEngine${LIB_ENDING} rm ${PWD}/shared-folder/libStormEngine${LIB_ENDING}
cp ${PWD}/out/build/libStormEngine${LIB_ENDING} ${PWD}/shared-folder/ cp ${PWD}/out/build/libStormEngine${LIB_ENDING} ${PWD}/shared-folder/

View File

@ -0,0 +1,19 @@
#ifndef FLUID_SIMULATOR_CELLULAR_H
#define FLUID_SIMULATOR_CELLULAR_H
#include "public.h"
#include "fluid/queue/chunk.h"
#include "fluid/env/environment.h"
/**
* Simulates the cellular chunk queue
* @param environment The environment storing the simulation queues
*/
LIBRARY_API void fluid_cellular_simulate(Environment * environment);
#endif

View File

@ -0,0 +1,20 @@
#include "stb/stb_ds.h"
#include "fluid/sim/cellular/cellular.h"
/**
* Simulates the cellular chunk queue
* @param environment The environment storing the simulation queues
*/
LIBRARY_API void fluid_cellular_simulate(Environment * environment){
Chunk ** chunks = environment->queue.cellularQueue;
int chunkCount = stbds_arrlen(chunks);
for(int i = 0; i < chunkCount; i++){
Chunk * currentChunk = chunks[i];
//simulate here
}
}

View File

@ -5,6 +5,7 @@
#include "fluid/dispatch/dispatcher.h" #include "fluid/dispatch/dispatcher.h"
#include "fluid/sim/simulator.h" #include "fluid/sim/simulator.h"
#include "fluid/sim/grid/simulation.h" #include "fluid/sim/grid/simulation.h"
#include "fluid/sim/cellular/cellular.h"
#include "fluid/queue/chunk.h" #include "fluid/queue/chunk.h"
#include "fluid/env/environment.h" #include "fluid/env/environment.h"
@ -18,11 +19,7 @@ LIBRARY_API void fluid_simulate(Environment * environment){
int currentCount, i; int currentCount, i;
//cellular sim //cellular sim
currentCount = stbds_arrlen(queue.cellularQueue); fluid_cellular_simulate(environment);
for(i = 0; i < currentCount; i++){
Chunk * currentChunk = queue.cellularQueue[i];
//TODO: simulate here
}
//grid sim //grid sim
{ {