Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3925 in orxonox.OLD for orxonox/branches/particleEngine/src/lib


Ignore:
Timestamp:
Apr 21, 2005, 4:11:01 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/particleEngine: added the ParticleSystem class

Location:
orxonox/branches/particleEngine/src/lib/graphics/particles
Files:
1 edited
2 copied

Legend:

Unmodified
Added
Removed
  • orxonox/branches/particleEngine/src/lib/graphics/particles/particle_engine.h

    r3923 r3925  
    1010
    1111// FORWARD DEFINITION
     12template<class T> class tList;
     13class ParticleSystem;
     14
    1215
    1316//! A default singleton class.
     
    1821  virtual ~ParticleEngine(void);
    1922
     23  void tick(float dt);
     24
    2025 private:
    2126  ParticleEngine(void);
    2227  static ParticleEngine* singletonRef;
     28
     29  tList<ParticleSystem>* partSysList;
    2330};
    2431
  • orxonox/branches/particleEngine/src/lib/graphics/particles/particle_system.cc

    r3924 r3925  
    1 
    2 
    31/*
    42   orxonox - the future of 3D-vertical-scrollers
     
    1210
    1311   ### File Specific:
    14    main-programmer: ...
     12   main-programmer: Benjamin Grauer
    1513   co-programmer: ...
    1614*/
     
    1816#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
    1917
    20 #include "proto_class.h"
    21 
    22 #include "stdincl.h" // maybe
     18#include "particle_system.h"
    2319
    2420using namespace std;
     
    2925   \todo this constructor is not jet implemented - do it
    3026*/
    31 ProtoClass::ProtoClass ()
     27ParticleSystem::ParticleSystem ()
    3228{
    33    this->setClassName ("ProtoClass");
     29   this->setClassName ("ParticleSystem");
    3430}
    3531
     
    3935
    4036*/
    41 ProtoClass::~ProtoClass ()
     37ParticleSystem::~ParticleSystem ()
    4238{
    4339  // delete what has to be deleted here
    4440}
    4541
    46 /**
    47    \brief nonsense - delete this method
    48    \param realy nothing to give
    49    \returns true or false - probably nothing?
    50 
    51    this is just to show the doxygen abilities (this for example is an extension for a long comment)
    52 */
    53 bool ProtoClass::doNonSense (int nothing) {}
  • orxonox/branches/particleEngine/src/lib/graphics/particles/particle_system.h

    r3924 r3925  
    11/*!
    2     \file proto_class.h
    3     \brief Definition of the proto class template, used quickly start work
    4     \todo Example: this shows how to use simply add a Marker that here has to be done something.
     2    \file particle_system.h
    53
    6     The Protoclass exists, to help you quikly getting the run for how to develop in orxonox.
    7     It is an example for the CODING-CONVENTION, and a starting-point for every class.
    84*/
    95
    10 #ifndef _PROTO_CLASS_H
    11 #define _PROTO_CLASS_H
     6#ifndef _PARTICLE_SYSTEM_H
     7#define _PARTICLE_SYSTEM_H
    128
    13 #include "what realy has to be included"
    149#include "base_object.h"
    15 
    16 // FORWARD DEFINITION \\
    17 class someClassWeNeed;
     10#include "vector.h"
     11// FORWARD DEFINITION
    1812
    1913
    20 /*class Test;*/ /* forward definition of class Test (without including it here!)*/
     14//! A struct for one Particle
     15typedef struct Particle
     16{
     17  float timeToLive;
     18  Vector position;
     19  Quaternion rotation;
     20 
     21 
     22};
    2123
    22 //! A default class that aids you to start creating a new class
    23 /**
    24    here can be some longer description of this class
    25 */
    26 class ProtoClass : public BaseObject {
     24//! A class to handle particle Systems
     25class ParticleSystem : public BaseObject {
    2726
    2827 public:
    29   ProtoClass();
    30   virtual ~ProtoClass();
     28  ParticleSystem();
     29  virtual ~ParticleSystem();
    3130
    32   bool doNonSense (int nothing);
    3331
    3432 private:
    35   int nonSense;  //!< doxygen tag here like this for all the variables - delete this variable if you use this
     33
     34  int particleCount;
     35
     36  Particle* particles;
    3637
    3738};
    3839
    39 #endif /* _PROTO_CLASS_H */
     40#endif /* _PARTICLE_SYSTEM_H */
Note: See TracChangeset for help on using the changeset viewer.