1 #pragma once 2 // Description: 3 // Structure to keep particle information. 4 // 5 // Copyright (C) 2001 Frank Becker 6 // 7 // This program is free software; you can redistribute it and/or modify it under 8 // the terms of the GNU General Public License as published by the Free Software 9 // Foundation; either version 2 of the License, or (at your option) any later 10 // version. 11 // 12 // This program is distributed in the hope that it will be useful, but WITHOUT 13 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 14 // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details 15 // 16 17 #include <string> 18 #include <Point.hpp> 19 20 class ParticleType; 21 22 struct ParticleInfo 23 { 24 //values for current game step position 25 vec3 position; 26 vec3 velocity; 27 vec3 color; 28 vec3 extra; 29 30 //previous game step values for interpolation 31 vec3 prevPosition; 32 vec3 prevVelocity; 33 vec3 prevColor; 34 vec3 prevExtra; 35 36 Point3D points[4]; //E.g.: Bezier curve data 37 38 float tod; //time of death 39 float radius; //radius for collision detection 40 41 int damage; //damage the particle inflicts 42 43 std::string text; //some text associated with the particle 44 45 ParticleInfo *next; 46 ParticleType *particle; 47 48 ParticleInfo *related; //used for swarm leader 49 }; 50