numerics
Loading...
Searching...
No Matches
main.cpp File Reference

3D SPH fluid simulation – hose demo with scene rotation More...

#include "raylib.h"
#include "raymath.h"
#include "fluid3d.hpp"
#include <cmath>
#include <algorithm>

Go to the source code of this file.

Classes

struct  Hose
 

Functions

int main ()
 

Detailed Description

3D SPH fluid simulation – hose demo with scene rotation

Two water jets aimed at the centre of the domain: H – toggle hot hose (top-left corner, 80 degC) C – toggle cold hose (top-right corner, 5 degC)

Arrow keys orbit the camera AND physically tilt the scene so that gravity always points along the camera's "down" direction. Particles therefore fall toward whichever wall is currently at the bottom of the screen.

Controls: H / C – hot / cold hose on-off Arrow keys – rotate scene (gravity tilts with pitch) SPACE – pause / resume R – reset (clear particles, keep hose state)

  • / - – more / fewer substeps per frame ESC – quit

Definition in file main.cpp.

Function Documentation

◆ main()