Changeset 4836 in orxonox.OLD for orxonox/trunk/src/lib/particles
- Timestamp:
- Jul 12, 2005, 12:33:16 AM (19 years ago)
- Location:
- orxonox/trunk/src/lib/particles
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/particles/particle_emitter.cc
r4746 r4836 31 31 32 32 /** 33 \briefstandard constructor33 * standard constructor 34 34 */ 35 35 ParticleEmitter::ParticleEmitter(const Vector& direction, float angle, float emissionRate, … … 47 47 48 48 /** 49 \briefconstructs and loads a ParticleEmitter from a XML-element50 \param root the XML-element to load from49 * constructs and loads a ParticleEmitter from a XML-element 50 * @param root the XML-element to load from 51 51 */ 52 52 ParticleEmitter::ParticleEmitter(const TiXmlElement* root) … … 61 61 62 62 /** 63 \briefstandard destructor63 * standard destructor 64 64 65 65 removes the EmitterSystem from the ParticleEngine … … 87 87 88 88 /** 89 \briefloads a ParticleEmitter from a XML-element90 \param root the XML-element to load from89 * loads a ParticleEmitter from a XML-element 90 * @param root the XML-element to load from 91 91 */ 92 92 void ParticleEmitter::loadParams(const TiXmlElement* root) … … 120 120 121 121 /** 122 \briefthis start the emitter122 * this start the emitter 123 123 */ 124 124 void ParticleEmitter::start() {} … … 126 126 127 127 /** 128 \briefthis stops the emitter128 * this stops the emitter 129 129 */ 130 130 void ParticleEmitter::stop() {} … … 135 135 136 136 /** 137 \param type the new Type of this emitter137 * @param type the new Type of this emitter 138 138 */ 139 139 void ParticleEmitter::setType(EMITTER_TYPE type) … … 143 143 144 144 /** 145 \briefsets the type of emitter146 \param type the type as a const char*145 * sets the type of emitter 146 * @param type the type as a const char* 147 147 dot: EMITTER_DOT, plane: EMITTER_PLANE, cube: EMITTER_CUBE, sphere, EMITTER_SPHERE; 148 148 */ … … 172 172 173 173 /** 174 \briefsets a new size to the emitter174 * sets a new size to the emitter 175 175 */ 176 176 void ParticleEmitter::setSize(float emitterSize) … … 183 183 184 184 /** 185 \briefset the emission rate186 \param emissionRate: sets the number of particles emitted per second185 * set the emission rate 186 * @param emissionRate: sets the number of particles emitted per second 187 187 188 188 if you want to change the value of this variable during emission time (to make it more dynamic) … … 198 198 199 199 /** 200 \briefhow much of the speed from the ParticleEmitter should flow onto the ParticleSystem201 \param value a Value between zero and one200 * how much of the speed from the ParticleEmitter should flow onto the ParticleSystem 201 * @param value a Value between zero and one 202 202 203 203 if you want to change the value of this variable during emission time (to make it more dynamic) … … 215 215 216 216 /** 217 \briefset the angle of the emitter218 \param angle around the direction in which there are particles to be emitted219 \param randomAngle A random spread-angle, the +- randomness of this option217 * set the angle of the emitter 218 * @param angle around the direction in which there are particles to be emitted 219 * @param randomAngle A random spread-angle, the +- randomness of this option 220 220 221 221 if you want to change the value of this variable during emission time (to make it more dynamic) … … 229 229 230 230 /** 231 \briefsets the initial velocity of all particles emitted232 \param velocity The starting velocity of the emitted particles233 \param randomVelocity A random starting velocity, the +- randomness of this option231 * sets the initial velocity of all particles emitted 232 * @param velocity The starting velocity of the emitted particles 233 * @param randomVelocity A random starting velocity, the +- randomness of this option 234 234 235 235 if you want to change the value of this variable during emission time (to make it more dynamic) … … 243 243 244 244 /** 245 \briefsets the initial Momentum of all particles emitted246 \param momentum the new Momentum (just a float for being not too complicated).247 \param randomMomentum variation from the given value.245 * sets the initial Momentum of all particles emitted 246 * @param momentum the new Momentum (just a float for being not too complicated). 247 * @param randomMomentum variation from the given value. 248 248 */ 249 249 void ParticleEmitter::setEmissionMomentum(float momentum, float randomMomentum) … … 254 254 255 255 /** 256 \briefthis set the time to life of a particle, after which it will die257 \param dt: the time to live in seconds258 \param system: the system into which to emitt256 * this set the time to life of a particle, after which it will die 257 * @param dt: the time to live in seconds 258 * @param system: the system into which to emitt 259 259 260 260 if you want to change the value of this variable during emission time (to make it more dynamic) … … 308 308 309 309 /** 310 \briefoutputs some nice debug information310 * outputs some nice debug information 311 311 */ 312 312 void ParticleEmitter::debug() const -
orxonox/trunk/src/lib/particles/particle_emitter.h
r4746 r4836 1 1 /*! 2 2 \file particle_emitter.h 3 \briefDefinition of a ParticleEmitter3 * Definition of a ParticleEmitter 4 4 */ 5 5 … … 58 58 void setDirection(float x, float y, float z) { this->direction = Vector(x,y,z); }; //!< todo this should be done via PNODE 59 59 60 /** \returns the type of the emitter */60 /** @returns the type of the emitter */ 61 61 inline EMITTER_TYPE getType() const { return this->type; }; 62 /** \returns the Type as a const char * */62 /** @returns the Type as a const char * */ 63 63 const char* getTypeC() const; 64 /** \returns the Size of the emitter */64 /** @returns the Size of the emitter */ 65 65 inline float getSize() const { return this->emitterSize; }; 66 /** \returns the emissionRate */66 /** @returns the emissionRate */ 67 67 inline float getEmissionRate() const { return this->emissionRate; }; 68 /** \returns the inherit-speed-factor */68 /** @returns the inherit-speed-factor */ 69 69 inline float getInheritSpeed() const { return this->inheritSpeed; }; 70 /** \returns the SpreadAngle of the emitter */70 /** @returns the SpreadAngle of the emitter */ 71 71 inline float getSpread() const { return this->angle; }; 72 /** \returns the EmissionVelocity of the emitter */72 /** @returns the EmissionVelocity of the emitter */ 73 73 inline float getEmissionVelocity() const { return this->velocity; }; 74 /** \returns the EmissionMomentum of this emitter */74 /** @returns the EmissionMomentum of this emitter */ 75 75 inline float getEmissionMomentum() const { return this->momentum; }; 76 76 -
orxonox/trunk/src/lib/particles/particle_engine.cc
r4834 r4836 29 29 30 30 /** 31 \briefstandard constructor31 * standard constructor 32 32 */ 33 33 ParticleEngine::ParticleEngine () … … 42 42 43 43 /** 44 \briefthe singleton reference to this class44 * the singleton reference to this class 45 45 */ 46 46 ParticleEngine* ParticleEngine::singletonRef = NULL; 47 47 48 48 /** 49 \briefdeletes all the system, emitters, connections and Lists49 * deletes all the system, emitters, connections and Lists 50 50 */ 51 51 ParticleEngine::~ParticleEngine () … … 84 84 /** 85 85 \brief loads the ParticleEngines settings and connections between particles and emitters 86 \param root the XML-element to load this from.86 * @param root the XML-element to load this from. 87 87 */ 88 88 void ParticleEngine::loadParams(const TiXmlElement* root) … … 98 98 99 99 /** 100 \briefAdds a System to the System list.100 * Adds a System to the System list. 101 101 102 102 this is done automatically when creating a ParticleSystem … … 108 108 109 109 /** 110 \briefAdds an emitter to the emitterList110 * Adds an emitter to the emitterList 111 111 112 112 this is done automatically when creating a ParticleEmitter … … 119 119 /** 120 120 \brief Connects a ParticleSystem to a ParticleSystem thus emitting Particles. 121 \param emitter the Emitter to connect to the System122 \param system the System to connect to the Emitter121 * @param emitter the Emitter to connect to the System 122 * @param system the System to connect to the Emitter 123 123 */ 124 124 void ParticleEngine::addConnection(const char* emitter, const char* system) … … 139 139 140 140 /** 141 \briefConnects a ParticleSystem to a ParticleSystem thus emitting Particles.142 \param emitter the Emitter to connect to the System143 \param system the System to connect to the Emitter141 * Connects a ParticleSystem to a ParticleSystem thus emitting Particles. 142 * @param emitter the Emitter to connect to the System 143 * @param system the System to connect to the Emitter 144 144 */ 145 145 void ParticleEngine::addConnection(ParticleEmitter* emitter, ParticleSystem* system) … … 171 171 172 172 /** 173 \briefRemoves a system from the systemList and also removes all Connections to the System174 \param system The ParticleSystem to delete173 * Removes a system from the systemList and also removes all Connections to the System 174 * @param system The ParticleSystem to delete 175 175 */ 176 176 bool ParticleEngine::removeSystem(ParticleSystem* system) … … 192 192 193 193 /** 194 \briefremoves an emitter from the emitterList and also from all Connections it is attached to.195 \param emitter the ParticleEmitter to remove.194 * removes an emitter from the emitterList and also from all Connections it is attached to. 195 * @param emitter the ParticleEmitter to remove. 196 196 */ 197 197 bool ParticleEngine::removeEmitter(ParticleEmitter* emitter) … … 213 213 214 214 /** 215 \briefremoves a Connection between an Emitter and a System216 \param emitter The emitter of the connection to remove217 \param system The system of the connection to remove218 \returns true, if the connection was broken, false if the conntection was not found215 * removes a Connection between an Emitter and a System 216 * @param emitter The emitter of the connection to remove 217 * @param system The system of the connection to remove 218 * @returns true, if the connection was broken, false if the conntection was not found 219 219 220 220 only if both system and emitter are in the connection the Connection will be broken … … 240 240 241 241 /** 242 \briefremoves a Connection between an Emitter and a System243 \param connection the connection to remove242 * removes a Connection between an Emitter and a System 243 * @param connection the connection to remove 244 244 245 245 \see bool ParticleEngine::breakConnection(ParticleEmitter* emitter, ParticleSystem* system) … … 253 253 254 254 /** 255 \briefthis function ticks all the ParticleSystems, so an animation will flow256 \param dt passed since last tick255 * this function ticks all the ParticleSystems, so an animation will flow 256 * @param dt passed since last tick 257 257 */ 258 258 void ParticleEngine::tick(float dt) … … 280 280 281 281 /** 282 \briefdraws all the systems and their Particles.282 * draws all the systems and their Particles. 283 283 */ 284 284 void ParticleEngine::draw() const … … 296 296 297 297 /** 298 \param systemName the name of the system to search for299 \returns the system called by systemName or NULL if not found298 * @param systemName the name of the system to search for 299 * @returns the system called by systemName or NULL if not found 300 300 */ 301 301 ParticleSystem* ParticleEngine::getSystemByName(const char* systemName) const … … 317 317 318 318 /** 319 \param number the n-th system to return320 \returns the system called by number or NULL if not found319 * @param number the n-th system to return 320 * @returns the system called by number or NULL if not found 321 321 */ 322 322 ParticleSystem* ParticleEngine::getSystemByNumber(unsigned int number) const … … 340 340 341 341 /** 342 \param emitterName the name of the emitter to search for343 \returns the emitter called by emitterName or NULL if not found342 * @param emitterName the name of the emitter to search for 343 * @returns the emitter called by emitterName or NULL if not found 344 344 */ 345 345 ParticleEmitter* ParticleEngine::getEmitterByName(const char* emitterName) const … … 362 362 363 363 /** 364 \param number the n-th emitter to return365 \returns the emitter called by number or NULL if not found364 * @param number the n-th emitter to return 365 * @returns the emitter called by number or NULL if not found 366 366 */ 367 367 ParticleEmitter* ParticleEngine::getEmitterByNumber(unsigned int number) const … … 385 385 386 386 /** 387 \briefoutputs some nice debug information387 * outputs some nice debug information 388 388 */ 389 389 void ParticleEngine::debug() -
orxonox/trunk/src/lib/particles/particle_engine.h
r4746 r4836 1 1 /*! 2 2 \file particle_engine.h 3 \briefDefinition of the ParticleEngine3 * Definition of the ParticleEngine 4 4 */ 5 5 … … 34 34 public: 35 35 virtual ~ParticleEngine(); 36 /** \returns a Pointer to the only object of this Class */36 /** @returns a Pointer to the only object of this Class */ 37 37 inline static ParticleEngine* getInstance() { if (!singletonRef) singletonRef = new ParticleEngine(); return singletonRef; }; 38 38 -
orxonox/trunk/src/lib/particles/particle_system.cc
r4827 r4836 35 35 36 36 /** 37 \briefstandard constructor38 \param maxCount the Count of particles in the System39 \param type The Type of the ParticleSystem37 * standard constructor 38 * @param maxCount the Count of particles in the System 39 * @param type The Type of the ParticleSystem 40 40 */ 41 41 ParticleSystem::ParticleSystem (unsigned int maxCount, PARTICLE_TYPE type) … … 49 49 /** 50 50 \brief creates a Particle System out of a XML-element 51 \param root: the XML-element to load from51 * @param root: the XML-element to load from 52 52 */ 53 53 ParticleSystem::ParticleSystem(const TiXmlElement* root) … … 59 59 60 60 /** 61 \briefstandard deconstructor61 * standard deconstructor 62 62 */ 63 63 ParticleSystem::~ParticleSystem() … … 147 147 148 148 /** 149 \param maxCount the maximum count of particles that can be emitted149 * @param maxCount the maximum count of particles that can be emitted 150 150 */ 151 151 void ParticleSystem::setMaxCount(int maxCount) … … 156 156 157 157 /** 158 \param particleType the type of particles in this System159 \param count how many particles (in PARTICLE_MULTI-mode)160 \todo this will be different158 * @param particleType the type of particles in this System 159 * @param count how many particles (in PARTICLE_MULTI-mode) 160 @todo this will be different 161 161 */ 162 162 void ParticleSystem::setType(const char* particleType) … … 173 173 174 174 /** 175 \param particleType the type of particles in this System176 \param count how many particles (in PARTICLE_MULTI-mode)177 \todo this will be different175 * @param particleType the type of particles in this System 176 * @param count how many particles (in PARTICLE_MULTI-mode) 177 @todo this will be different 178 178 */ 179 179 void ParticleSystem::setType(PARTICLE_TYPE particleType, int count) … … 205 205 // setting properties 206 206 /** 207 \briefsets the material to an external material208 \param material: the material to set this material to.207 * sets the material to an external material 208 * @param material: the material to set this material to. 209 209 210 210 !! important if the extern material gets deleted it MUST be unregistered here or segfault !! … … 216 216 217 217 /** 218 \briefSets the lifespan of newly created particles218 * Sets the lifespan of newly created particles 219 219 */ 220 220 void ParticleSystem::setLifeSpan(float lifeSpan, float randomLifeSpan) … … 225 225 226 226 /** 227 \briefsets the conserve Factor of newly created particles227 * sets the conserve Factor of newly created particles 228 228 */ 229 229 void ParticleSystem::setConserve(float conserve) … … 241 241 ///////////////////////////// 242 242 /** 243 \briefsets a key in the radius-animation on a per-particle basis244 \param lifeCycleTime the time (partilceLifeTime/particleAge) [0-1]245 \param radius the radius at this position246 \param randRadius the randRadius at this position243 * sets a key in the radius-animation on a per-particle basis 244 * @param lifeCycleTime the time (partilceLifeTime/particleAge) [0-1] 245 * @param radius the radius at this position 246 * @param randRadius the randRadius at this position 247 247 */ 248 248 void ParticleSystem::setRadius(float lifeCycleTime, float radius, float randRadius) … … 253 253 254 254 /** 255 \briefsets a key in the mass-animation on a per-particle basis256 \param lifeCycleTime the time (partilceLifeTime/particleAge) [0-1]257 \param mass the mass at this position258 \param randMass the randomMass at this position255 * sets a key in the mass-animation on a per-particle basis 256 * @param lifeCycleTime the time (partilceLifeTime/particleAge) [0-1] 257 * @param mass the mass at this position 258 * @param randMass the randomMass at this position 259 259 */ 260 260 void ParticleSystem::setMass(float lifeCycleTime, float mass, float randMass) … … 265 265 266 266 /** 267 \briefsets a key in the color-animation on a per-particle basis268 \param lifeCycleTime: the time (partilceLifeTime/particleAge) [0-1]269 \param red: red270 \param green: green271 \param blue: blue272 \param alpha: alpha267 * sets a key in the color-animation on a per-particle basis 268 * @param lifeCycleTime: the time (partilceLifeTime/particleAge) [0-1] 269 * @param red: red 270 * @param green: green 271 * @param blue: blue 272 * @param alpha: alpha 273 273 */ 274 274 void ParticleSystem::setColor(float lifeCycleTime, float red, float green, float blue, float alpha) … … 281 281 282 282 /** 283 \briefticks the system.284 \param dt the time to tick all the Particles of the System283 * ticks the system. 284 * @param dt the time to tick all the Particles of the System 285 285 286 286 this is used to get all the particles some motion … … 350 350 351 351 /** 352 \briefapplies some force to a Particle.353 \param field the Field to apply.352 * applies some force to a Particle. 353 * @param field the Field to apply. 354 354 */ 355 355 void ParticleSystem::applyField(Field* field) … … 365 365 366 366 /** 367 * \returns the count of Faces of this ParticleSystem367 * @returns the count of Faces of this ParticleSystem 368 368 */ 369 369 unsigned int ParticleSystem::getFaceCount() const … … 383 383 384 384 /** 385 \briefdraws all the Particles of this System385 * draws all the Particles of this System 386 386 387 387 The Cases in this Function all do the same: … … 410 410 { 411 411 glColor4fv(drawPart->color); 412 //! \todo implement a faster code for the look-at Camera algorithm.413 414 const PNode* camera = State::getCamera(); //!< \todo MUST be different412 //! @todo implement a faster code for the look-at Camera algorithm. 413 414 const PNode* camera = State::getCamera(); //!< @todo MUST be different 415 415 Vector cameraPos = camera->getAbsCoor(); 416 416 Vector cameraTargetPos = State::getCameraTarget()->getAbsCoor(); … … 515 515 516 516 /** 517 \briefadds a new Particle to the System518 \param position the initial position, where the particle gets emitted.519 \param velocity the initial velocity of the particle.520 \param orientation the initial orientation of the Paritcle.521 \param momentum the initial momentum of the Particle (the speed of its rotation).522 \param data some more data given by the emitter517 * adds a new Particle to the System 518 * @param position the initial position, where the particle gets emitted. 519 * @param velocity the initial velocity of the particle. 520 * @param orientation the initial orientation of the Paritcle. 521 * @param momentum the initial momentum of the Particle (the speed of its rotation). 522 * @param data some more data given by the emitter 523 523 */ 524 524 void ParticleSystem::addParticle(const Vector& position, const Vector& velocity, const Quaternion& orientation, const Quaternion& momentum, unsigned int data) … … 566 566 particles->momentum = momentum; 567 567 568 // particle->rotation = ; //! \todo rotation is once again something to be done.568 // particle->rotation = ; //! @todo rotation is once again something to be done. 569 569 particles->massRand = 2*(float)rand()/RAND_MAX -1; 570 570 particles->radiusRand = 2* (float)rand()/RAND_MAX -1; … … 579 579 580 580 /** 581 \briefoutputs some nice debug information581 * outputs some nice debug information 582 582 */ 583 583 void ParticleSystem::debug() const -
orxonox/trunk/src/lib/particles/particle_system.h
r4746 r4836 89 89 void setColor(float lifeCycleTime, float red, float green, float blue, float alpha); 90 90 91 /** \returns the Type of the particles */91 /** @returns the Type of the particles */ 92 92 inline PARTICLE_TYPE getType() const { return this->particleType; }; 93 /** \returns the Material that lies on this particles */93 /** @returns the Material that lies on this particles */ 94 94 inline const Material* getMaterial() const { return this->material; }; 95 /** \returns the lifespan of the particles */95 /** @returns the lifespan of the particles */ 96 96 inline float getLifeSpan() const { return this->lifeSpan; }; 97 /** \returns the starting-radius of the particles */97 /** @returns the starting-radius of the particles */ 98 98 inline float getStartRadius() { return this->radiusAnim.getValue(0.0); }; 99 /** \returns the end-radius of the particles */99 /** @returns the end-radius of the particles */ 100 100 inline float getEndRadius() { return this->radiusAnim.getValue(1.0); }; 101 /** \returns the conserve-factor of the particles */101 /** @returns the conserve-factor of the particles */ 102 102 inline float getConserve() const { return this->conserve; }; 103 /** \returns the initial mass of the particles */103 /** @returns the initial mass of the particles */ 104 104 inline float getMass() const { return this->initialMass; }; 105 105 … … 108 108 109 109 virtual void applyField(Field* field); 110 /** \brief this is an empty function, because the Physics are implemented in tick \param dt: useless here */110 /** \brief this is an empty function, because the Physics are implemented in tick @param dt: useless here */ 111 111 virtual void tickPhys(float dt) {}; 112 112 -
orxonox/trunk/src/lib/particles/quick_animation.cc
r4746 r4836 28 28 29 29 /** 30 \briefstandard constructor30 * standard constructor 31 31 */ 32 32 QuickAnimation::QuickAnimation () … … 43 43 44 44 /** 45 \briefdeletes all the deconstructor stuff45 * deletes all the deconstructor stuff 46 46 */ 47 47 QuickAnimation::~QuickAnimation () … … 60 60 61 61 /** 62 \briefadds a new entry to the list of keyframes63 \param position the position to add the key to64 \param value the Value to set for the position65 \returns false if the key existed already for a given position62 * adds a new entry to the list of keyframes 63 * @param position the position to add the key to 64 * @param value the Value to set for the position 65 * @returns false if the key existed already for a given position 66 66 */ 67 67 void QuickAnimation::addEntry(float position, float value) … … 128 128 129 129 /** 130 \briefchanges an entry in the region of position131 \param position the Position of an existing keyframe132 \param region a deviation of the existing keyframe (like a delta in witch to search for133 \param value the new Value130 * changes an entry in the region of position 131 * @param position the Position of an existing keyframe 132 * @param region a deviation of the existing keyframe (like a delta in witch to search for 133 * @param value the new Value 134 134 135 135 if the Entry at the in the region of the specified position is found, it will be changed. 136 136 Otherwise a new KeyFrame will be created with value at position. 137 \todo rimplement137 @todo rimplement 138 138 */ 139 139 void QuickAnimation::changeEntry(float position, float value, float region) … … 202 202 203 203 /** 204 \briefreturns the value of the animation at a certain position205 \param position the position to get the value from :)204 * returns the value of the animation at a certain position 205 * @param position the position to get the value from :) 206 206 */ 207 207 float QuickAnimation::getValue(float position) … … 226 226 227 227 /** 228 \briefoutputs some nice information about this class228 * outputs some nice information about this class 229 229 */ 230 230 void QuickAnimation::debug() -
orxonox/trunk/src/lib/particles/quick_animation.h
r4746 r4836 1 1 /*! 2 2 \file quick_animation.h 3 \briefDefinition of the QuickAnimation-class3 * Definition of the QuickAnimation-class 4 4 5 5 */ … … 43 43 44 44 void removeEntry(float position); 45 /** \todo implemente those functions45 /** @todo implemente those functions 46 46 bool moveEntry(float position); 47 47 */
Note: See TracChangeset
for help on using the changeset viewer.