Initial Setup
This commit is contained in:
parent
03e21dc0e4
commit
8079f1809f
@ -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
49
particlesystem.h
Normal 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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user