1
0

Initial Setup

This commit is contained in:
Niklas Birk 2019-12-16 19:22:52 +01:00
parent 03e21dc0e4
commit 8079f1809f
2 changed files with 50 additions and 1 deletions

View File

@ -3,4 +3,4 @@ project(Informatikprojekt C)
set(CMAKE_C_STANDARD 11)
add_executable(Informatikprojekt main.c)
add_executable(Informatikprojekt main.c particlesystem.h)

49
particlesystem.h Normal file
View File

@ -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);