define cellular simulator
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
This commit is contained in:
parent
5c44d36f25
commit
89b4fbb862
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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/
|
||||||
|
|||||||
19
src/main/c/includes/fluid/sim/cellular/cellular.h
Normal file
19
src/main/c/includes/fluid/sim/cellular/cellular.h
Normal 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
|
||||||
@ -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
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user