Changeset 6621 in orxonox.OLD for trunk/src/lib/particles/particle_system.h
- Timestamp:
- Jan 19, 2006, 11:46:28 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/particles/particle_system.h
r6612 r6621 26 26 #define PARTICLE_MULTI_MASK 0x100000 //!< A Mask if they are Multi-partilces 27 27 28 //! An enumerator for the different types of particles.29 typedef enum PARTICLE_TYPE30 {31 PARTICLE_DOT = PARTICLE_DOT_MASK,32 PARTICLE_SPARK = PARTICLE_SPARK_MASK,33 PARTICLE_SPRITE = PARTICLE_SPRITE_MASK,34 PARTICLE_MULTI_SPRITE = PARTICLE_SPRITE_MASK | PARTICLE_MULTI_MASK,35 PARTICLE_MODEL = PARTICLE_MODEL_MASK,36 PARTICLE_MULTI_MODE = PARTICLE_MODEL_MASK | PARTICLE_MULTI_MASK37 };38 39 28 #define PARTICLE_DEFAULT_MAX_COUNT 200 //!< A default count of particles in the system. 40 #define PARTICLE_DEFAULT_TYPE PARTICLE_SPRITE //!< A default type of the system.41 29 42 30 // FORWARD DECLARATION … … 69 57 70 58 public: 71 ParticleSystem(unsigned int maxCount = PARTICLE_DEFAULT_MAX_COUNT, 72 PARTICLE_TYPE type = PARTICLE_DEFAULT_TYPE); 59 ParticleSystem(unsigned int maxCount = PARTICLE_DEFAULT_MAX_COUNT); 73 60 ParticleSystem(const TiXmlElement* root); 74 61 virtual ~ParticleSystem(); … … 77 64 virtual void loadParams(const TiXmlElement* root); 78 65 79 void setType(const char* particleType);80 void setType(PARTICLE_TYPE particleType, int count = 0);81 66 void setMaterial(Material* material); 82 67 void setMaterialTexture(const char* textureFile); … … 91 76 void setColor(float lifeCycleTime, float red, float green, float blue, float alpha); 92 77 93 /** @returns the Type of the particles */94 inline PARTICLE_TYPE getType() const { return this->particleType; };95 78 /** @returns the Material that lies on this particles */ 96 79 inline const Material* getMaterial() const { return this->material; }; … … 113 96 114 97 virtual void applyField(Field* field); 115 /** \brief this is an empty function, because the Physics are implemented in tick @param dt: useless here */98 /** @brief this is an empty function, because the Physics are implemented in tick @param dt: useless here */ 116 99 virtual void tickPhys(float dt) {}; 117 100 … … 119 102 120 103 virtual void tick(float dt); 121 virtual void draw() const ;104 virtual void draw() const = 0; 122 105 123 106 void debug() const; 124 107 125 pr ivate:108 protected: 126 109 float conserve; //!< How much energy gets conserved to the next Tick. 127 110 float lifeSpan; //!< Initial lifetime of a Particle. … … 132 115 int maxCount; //!< The maximum count of Particles. 133 116 int count; //!< The current count of Particles. 134 PARTICLE_TYPE particleType; //!< A type for all the Particles135 117 Material* material; //!< A Material for all the Particles. 136 118 Particle* particles; //!< A list of particles of this System.
Note: See TracChangeset
for help on using the changeset viewer.