1
0
rwu_particles_informatikpro.../particlesystem.h

50 lines
662 B
C
Raw Normal View History

2019-12-16 18:22:52 +00:00
/*
* 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);