diff --git a/CMakeLists.txt b/CMakeLists.txt index 40bd390..27462cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,4 +3,4 @@ project(Informatikprojekt C) set(CMAKE_C_STANDARD 11) -add_executable(Informatikprojekt main.c) \ No newline at end of file +add_executable(Informatikprojekt main.c particlesystem.h) \ No newline at end of file diff --git a/particlesystem.h b/particlesystem.h new file mode 100644 index 0000000..3256cf7 --- /dev/null +++ b/particlesystem.h @@ -0,0 +1,49 @@ +/* + * A vector with three floats + */ +struct vector3f +{ + float x; + float y; + float z; +}; + +/* + * A particle has a position and a direction + */ +struct particle +{ + struct vector3f position; + struct vector3f direction; +}; + +/* + * An emitter has a position and contains an array of particles + */ +struct emitter +{ + struct vector3f position; + struct particle *particles; + int pamount; +}; + +/* + * A particle system consists of one or more emitter + */ +struct particle_system +{ + struct emitter *emitters; + int eamount; +}; + +/* + * + */ +int initParticle(struct vector3f pos, struct vector3f dir); + +/* + * + */ +int initVector3f(int x, int y, int z); + +