Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4338 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
May 27, 2005, 9:16:53 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: merged branches/physics back to the trunk
merged with command
svn merge -r 3866:HEAD . ../../trunk/
many conflict that i tried to resolv
@patrick: i hope i did not interfere with your stuff :/

Location:
orxonox/trunk
Files:
25 edited
27 copied

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/configure

    r4265 r4338  
    79627962## OUTPUT CONFIGURE ##
    79637963######################
    7964                                                                                                                                   ac_config_files="$ac_config_files Makefile src/Makefile src/lib/Makefile src/lib/graphics/Makefile src/lib/graphics/importer/Makefile src/lib/gui/Makefile src/lib/gui/console/Makefile src/lib/gui/gui/Makefile src/lib/tinyxml/Makefile src/subprojects/Makefile src/subprojects/testmain/Makefile src/subprojects/importer/Makefile src/subprojects/gui/Makefile"
     7964                                                                                                                                                      ac_config_files="$ac_config_files Makefile src/Makefile src/lib/Makefile src/lib/graphics/Makefile src/lib/graphics/importer/Makefile src/lib/physics/Makefile src/lib/gui/Makefile src/lib/gui/console/Makefile src/lib/gui/gui/Makefile src/lib/tinyxml/Makefile src/subprojects/Makefile src/subprojects/testmain/Makefile src/subprojects/importer/Makefile src/subprojects/particles/Makefile src/subprojects/gui/Makefile"
    79657965
    79667966
     
    85618561  "src/lib/graphics/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/lib/graphics/Makefile" ;;
    85628562  "src/lib/graphics/importer/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/lib/graphics/importer/Makefile" ;;
     8563  "src/lib/physics/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/lib/physics/Makefile" ;;
    85638564  "src/lib/gui/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/lib/gui/Makefile" ;;
    85648565  "src/lib/gui/console/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/lib/gui/console/Makefile" ;;
     
    85688569  "src/subprojects/testmain/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/subprojects/testmain/Makefile" ;;
    85698570  "src/subprojects/importer/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/subprojects/importer/Makefile" ;;
     8571  "src/subprojects/particles/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/subprojects/particles/Makefile" ;;
    85708572  "src/subprojects/gui/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/subprojects/gui/Makefile" ;;
    85718573  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
  • orxonox/trunk/configure.ac

    r4265 r4338  
    519519                 src/lib/graphics/Makefile
    520520                 src/lib/graphics/importer/Makefile
     521                 src/lib/physics/Makefile
    521522                 src/lib/gui/Makefile
    522523                 src/lib/gui/console/Makefile
     
    526527                 src/subprojects/testmain/Makefile
    527528                 src/subprojects/importer/Makefile
     529                 src/subprojects/particles/Makefile
    528530                 src/subprojects/gui/Makefile
    529531                 ])
  • orxonox/trunk/src/Makefile.am

    r4326 r4338  
    1515AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/math
    1616AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/tinyxml
     17AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/physics
     18AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/physics/fields
    1719AM_CXXFLAGS+=-I$(MAINSRCDIR)/defs
    1820AM_CXXFLAGS+=-I$(MAINSRCDIR)/font
     
    3537
    3638orxonox_DEPENDENCIES = lib/gui/gui/libORXgui.a \
    37                        lib/tinyxml/libtinyxml.a
     39                       lib/physics/libORXphysics.a \
     40                       lib/tinyxml/libtinyxml.a
     41
    3842orxonox_LDADD = lib/gui/gui/libORXgui.a \
     43                lib/physics/libORXphysics.a \
    3944                lib/tinyxml/libtinyxml.a \
    4045                $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
     46
    4147
    4248orxonox_SOURCES= orxonox.cc \
     
    5561                 util/loading/factory.cc \
    5662                 util/loading/load_param.cc \
     63                 util/state.cc \
    5764                 story_entities/story_entity.cc \
    5865                 story_entities/campaign.cc \
     
    112119                 util/object_manager.h \
    113120                 util/garbage_collector.h \
     121                 util/state.h \
    114122                 story_entities/story_entity.h \
    115123                 story_entities/story_def.h \
  • orxonox/trunk/src/Makefile.in

    r4326 r4338  
    6060        garbage_collector.$(OBJEXT) list.$(OBJEXT) \
    6161        resource_manager.$(OBJEXT) factory.$(OBJEXT) \
    62         load_param.$(OBJEXT) story_entity.$(OBJEXT) campaign.$(OBJEXT) \
    63         world.$(OBJEXT) world_entity.$(OBJEXT) camera.$(OBJEXT) \
    64         player.$(OBJEXT) environment.$(OBJEXT) skysphere.$(OBJEXT) \
    65         skybox.$(OBJEXT) terrain.$(OBJEXT) weapon.$(OBJEXT) \
    66         projectile.$(OBJEXT) satellite.$(OBJEXT) \
     62        load_param.$(OBJEXT) state.$(OBJEXT) story_entity.$(OBJEXT) \
     63        campaign.$(OBJEXT) world.$(OBJEXT) world_entity.$(OBJEXT) \
     64        camera.$(OBJEXT) player.$(OBJEXT) environment.$(OBJEXT) \
     65        skysphere.$(OBJEXT) skybox.$(OBJEXT) terrain.$(OBJEXT) \
     66        weapon.$(OBJEXT) projectile.$(OBJEXT) satellite.$(OBJEXT) \
    6767        character_attributes.$(OBJEXT) test_gun.$(OBJEXT) \
    6868        test_bullet.$(OBJEXT) test_entity.$(OBJEXT) p_node.$(OBJEXT) \
     
    110110@AMDEP_TRUE@    ./$(DEPDIR)/resource_manager.Po \
    111111@AMDEP_TRUE@    ./$(DEPDIR)/satellite.Po ./$(DEPDIR)/skybox.Po \
    112 @AMDEP_TRUE@    ./$(DEPDIR)/skysphere.Po \
     112@AMDEP_TRUE@    ./$(DEPDIR)/skysphere.Po ./$(DEPDIR)/state.Po \
    113113@AMDEP_TRUE@    ./$(DEPDIR)/story_entity.Po \
    114114@AMDEP_TRUE@    ./$(DEPDIR)/substring.Po ./$(DEPDIR)/terrain.Po \
     
    247247target_vendor = @target_vendor@
    248248MAINSRCDIR = .
    249 AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/graphics/particles -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/gui/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/lib/tinyxml -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai -I$(MAINSRCDIR)/util -I$(MAINSRCDIR)/util/animation -I$(MAINSRCDIR)/util/common -I$(MAINSRCDIR)/util/loading -I$(MAINSRCDIR)/util/track -I$(MAINSRCDIR)/subprojects
     249AM_CXXFLAGS = -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/graphics/particles -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/gui/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/lib/tinyxml -I$(MAINSRCDIR)/lib/physics -I$(MAINSRCDIR)/lib/physics/fields -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai -I$(MAINSRCDIR)/util -I$(MAINSRCDIR)/util/animation -I$(MAINSRCDIR)/util/common -I$(MAINSRCDIR)/util/loading -I$(MAINSRCDIR)/util/track -I$(MAINSRCDIR)/subprojects
    250250orxonox_DEPENDENCIES = lib/gui/gui/libORXgui.a \
    251                        lib/tinyxml/libtinyxml.a
     251                       lib/physics/libORXphysics.a \
     252                       lib/tinyxml/libtinyxml.a
    252253
    253254orxonox_LDADD = lib/gui/gui/libORXgui.a \
     255                lib/physics/libORXphysics.a \
    254256                lib/tinyxml/libtinyxml.a \
    255257                $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
     
    270272                 util/loading/factory.cc \
    271273                 util/loading/load_param.cc \
     274                 util/state.cc \
    272275                 story_entities/story_entity.cc \
    273276                 story_entities/campaign.cc \
     
    327330                 util/object_manager.h \
    328331                 util/garbage_collector.h \
     332                 util/state.h \
    329333                 story_entities/story_entity.h \
    330334                 story_entities/story_def.h \
     
    509513@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skybox.Po@am__quote@
    510514@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skysphere.Po@am__quote@
     515@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state.Po@am__quote@
    511516@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/story_entity.Po@am__quote@
    512517@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/substring.Po@am__quote@
     
    747752@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    748753@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o load_param.obj `if test -f 'util/loading/load_param.cc'; then $(CYGPATH_W) 'util/loading/load_param.cc'; else $(CYGPATH_W) '$(srcdir)/util/loading/load_param.cc'; fi`
     754
     755state.o: util/state.cc
     756@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT state.o -MD -MP -MF "$(DEPDIR)/state.Tpo" -c -o state.o `test -f 'util/state.cc' || echo '$(srcdir)/'`util/state.cc; \
     757@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/state.Tpo" "$(DEPDIR)/state.Po"; else rm -f "$(DEPDIR)/state.Tpo"; exit 1; fi
     758@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='util/state.cc' object='state.o' libtool=no @AMDEPBACKSLASH@
     759@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/state.Po' tmpdepfile='$(DEPDIR)/state.TPo' @AMDEPBACKSLASH@
     760@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     761@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o state.o `test -f 'util/state.cc' || echo '$(srcdir)/'`util/state.cc
     762
     763state.obj: util/state.cc
     764@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT state.obj -MD -MP -MF "$(DEPDIR)/state.Tpo" -c -o state.obj `if test -f 'util/state.cc'; then $(CYGPATH_W) 'util/state.cc'; else $(CYGPATH_W) '$(srcdir)/util/state.cc'; fi`; \
     765@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/state.Tpo" "$(DEPDIR)/state.Po"; else rm -f "$(DEPDIR)/state.Tpo"; exit 1; fi
     766@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='util/state.cc' object='state.obj' libtool=no @AMDEPBACKSLASH@
     767@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/state.Po' tmpdepfile='$(DEPDIR)/state.TPo' @AMDEPBACKSLASH@
     768@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     769@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o state.obj `if test -f 'util/state.cc'; then $(CYGPATH_W) 'util/state.cc'; else $(CYGPATH_W) '$(srcdir)/util/state.cc'; fi`
    749770
    750771story_entity.o: story_entities/story_entity.cc
  • orxonox/trunk/src/lib/Makefile.am

    r4265 r4338  
    33
    44SUBDIRS = graphics \
     5          physics \
    56          tinyxml \
    67          $(GTK_PROGS)
  • orxonox/trunk/src/lib/Makefile.in

    r4276 r4338  
    168168GTK_PROGS = gui
    169169SUBDIRS = graphics \
     170          physics \
    170171          tinyxml \
    171172          $(GTK_PROGS)
  • orxonox/trunk/src/lib/coord/p_node.h

    r4326 r4338  
    7373  /** \returns the Velocity of the Node */
    7474  inline const Vector& getVelocity() const {return this->velocity;}
     75  /** \returns the last calculated coordinate */
     76  inline Vector getLastAbsCoor(void) {return this->lastAbsCoordinate;}
    7577
    7678  void addChild (PNode* pNode, int parentingMode = DEFAULT_MODE);
  • orxonox/trunk/src/lib/graphics/light.h

    r3603 r4338  
    1111#define _LIGHT_H
    1212
    13 #include "world_entity.h"
     13#include "p_node.h"
    1414#include "glincl.h"
    1515
     
    2121
    2222//! A class that handles Lights. The LightManager operates on this.
    23 class Light : public WorldEntity
     23class Light : public PNode
    2424{
    2525 public:
  • orxonox/trunk/src/lib/graphics/particles/particle_emitter.cc

    r4320 r4338  
    3131{
    3232   this->setClassID(CL_PARTICLE_EMITTER, "ParticleEmitter");
     33
     34   this->type = EMITTER_DOT;
     35   this->emitterSize = 1.0;
    3336   this->direction = direction;
    3437   this->setSpread(angle);
    3538   this->setEmissionRate(emissionRate);
    36    this->setVelocity(velocity);
     39   this->setEmissionVelocity(velocity);
    3740
    3841   this->saveTime = 0.0;
     
    5053{
    5154  ParticleEngine::getInstance()->removeEmitter(this);
    52  
    5355}
    5456
     
    7173
    7274/**
     75   \param type the new Type of this emitter
     76*/
     77void ParticleEmitter::setType(EMITTER_TYPE type)
     78{
     79  this->type = type;
     80}
     81
     82void ParticleEmitter::setSize(float emitterSize)
     83{
     84  if (emitterSize > 0.0)
     85    this->emitterSize = emitterSize;
     86  else
     87    emitterSize = 0.0;
     88}
     89
     90/**
    7391   \brief set the emission rate
    7492   \param sets the number of particles emitted per second
     
    7997void ParticleEmitter::setEmissionRate(float emissionRate)
    8098{
    81   this->emissionRate = emissionRate;
     99  if (emissionRate > 0.0)
     100    this->emissionRate = emissionRate;
     101  else
     102    this->emissionRate = 0.0;
    82103}
    83104
     
    104125   you may want to use the animation class
    105126*/
    106 void ParticleEmitter::setVelocity(float velocity, float randomVelocity)
     127void ParticleEmitter::setEmissionVelocity(float velocity, float randomVelocity)
    107128{
    108129  this->velocity = velocity;
     
    139160
    140161            // this should spread the Particles evenly. if the Emitter is moved around quickly
    141             Vector equalSpread = this->getVelocity() * random()/RAND_MAX * dt;
     162            Vector equalSpread = this->getVelocity() * rand()/RAND_MAX * dt;
     163            Vector extension; // the Vector for different fields.
    142164
    143             system->addParticle(this->getAbsCoor() - equalSpread, velocityV);
     165            if (this->type & 2)
     166              {
     167                extension = Vector(this->emitterSize * ((float)rand()/RAND_MAX -.5), 0, this->emitterSize * ((float)rand()/RAND_MAX - .5));
     168                extension = this->getAbsDir().apply(extension);
     169              }
     170            else if (this->type & 8)
     171              {
     172                extension = Vector((float)rand()/RAND_MAX -.5, (float)rand()/RAND_MAX -.5, (float)rand()/RAND_MAX -.5) * this->emitterSize;
     173              }
     174
     175            system->addParticle(this->getAbsCoor() + extension - equalSpread, velocityV);
     176           
    144177          }
    145178      }
  • orxonox/trunk/src/lib/graphics/particles/particle_emitter.h

    r4176 r4338  
    1313class ParticleSystem;
    1414
    15 typedef enum EMITTER_TYPE {EMITTER_DOT,
    16                            EMITTER_PLANE,
    17                            EMITTER_SPHERE,
    18                            EMITTER_CUBE};
     15//! The form of the Emitter to emit from
     16typedef enum EMITTER_TYPE {EMITTER_DOT   = 1,
     17                           EMITTER_PLANE = 2,
     18                           EMITTER_SPHERE= 4,
     19                           EMITTER_CUBE  = 8};
    1920
    2021//! A default singleton class.
     
    3233
    3334  /* controlling the behavour: these can be used as Animation interfaces */
     35  void setType(EMITTER_TYPE type);
     36  void setSize(float emitterSize);
    3437  void setEmissionRate(float emissionRate);
    3538  void setSpread(float angle, float randomAngle = 0.0);
    36   void setVelocity(float velocity, float randomVelocity = 0.0);
     39  void setEmissionVelocity(float velocity, float randomVelocity = 0.0);
     40
     41  /** \returns the type of the emitter */
     42  inline EMITTER_TYPE getType(void) const { return this->type; };
     43  /** \returns the Size of the emitter */
     44  inline float getSize(void) const { return this->emitterSize; };
     45  /** \returns the emissionRate */
     46  inline float getEmissionRate(void) const { return this->emissionRate; };
     47  /** \returns the SpreadAngle of the emitter */
     48  inline float getSpread(void) { return this->angle; };
     49  /** \returns the EmissionVelocity of the emitter */
     50  inline float getEmissionVelocity(void) { return this->velocity; };
    3751
    3852  void debug(void);
    3953
    4054 private:
     55  EMITTER_TYPE type;    //!< The type of emitter this is
     56  float emitterSize;    //!< The size of the emitter (not for EMITTER_DOT)
    4157  Vector direction;     //!< emition direction
    4258  float angle;          //!< max angle from the direction of the emitter
  • orxonox/trunk/src/lib/graphics/particles/particle_engine.cc

    r4320 r4338  
    267267
    268268/**
     269   \param systemName the name of the system to search for
     270   \returns the system called by systemName or NULL if not found
     271*/
     272ParticleSystem* ParticleEngine::getSystemByName(const char* systemName) const
     273{
     274  tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
     275  ParticleSystem* tmpSys = tmpIt->nextElement();
     276  while(tmpSys)
     277    {
     278      if (!strcmp(systemName, tmpSys->getName()))
     279        {
     280          delete tmpIt;
     281          return tmpSys;
     282        }
     283      tmpSys = tmpIt->nextElement();
     284    }
     285  delete tmpIt;
     286  return NULL;
     287}
     288
     289/**
     290   \param number the n-th system to return
     291   \returns the system called by number or NULL if not found
     292*/
     293ParticleSystem* ParticleEngine::getSystemByNumber(unsigned int number) const
     294{
     295  int count = 0;
     296  tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
     297  ParticleSystem* tmpSys = tmpIt->nextElement();
     298  while(tmpSys)
     299    {
     300      count++;
     301      if ( count == number)
     302        {
     303          delete tmpIt;
     304          return tmpSys;
     305        }
     306      tmpSys = tmpIt->nextElement();
     307    }
     308  delete tmpIt;
     309  return NULL;
     310}
     311
     312/**
     313   \param emitterName the name of the emitter to search for
     314   \returns the emitter called by emitterName or NULL if not found
     315*/
     316ParticleEmitter* ParticleEngine::getEmitterByName(const char* emitterName) const
     317{
     318  tIterator<ParticleEmitter>* tmpIt = emitterList->getIterator();
     319  ParticleEmitter* tmpEmit = tmpIt->nextElement();
     320  while(tmpEmit)
     321    {
     322      if (!strcmp(emitterName, tmpEmit->getName()))
     323        {
     324          delete tmpIt;
     325          return tmpEmit;
     326        }
     327      tmpEmit = tmpIt->nextElement();
     328    }
     329  delete tmpIt;
     330  return NULL;
     331}
     332
     333
     334/**
     335   \param number the n-th emitter to return
     336   \returns the emitter called by number or NULL if not found
     337*/
     338ParticleEmitter* ParticleEngine::getEmitterByNumber(unsigned int number) const
     339{
     340  int count = 0;
     341  tIterator<ParticleEmitter>* tmpIt = emitterList->getIterator();
     342  ParticleEmitter* tmpEmit = tmpIt->nextElement();
     343  while(tmpEmit)
     344    {
     345      count++;
     346      if ( count == number)
     347        {
     348          delete tmpIt;
     349          return tmpEmit;
     350        }
     351      tmpEmit = tmpIt->nextElement();
     352    }
     353  delete tmpIt;
     354  return NULL;
     355}
     356
     357/**
    269358   \brief outputs some nice debug information
    270359*/
  • orxonox/trunk/src/lib/graphics/particles/particle_engine.h

    r4176 r4338  
    1313// FORWARD DEFINITION
    1414template<class T> class tList;
    15 class ParticleSystem;
    16 class ParticleEmitter;
    1715
    1816struct ParticleConnection
     
    4139  bool breakConnection(ParticleConnection* connection);
    4240
     41  ParticleSystem* getSystemByName(const char* systemName) const;
     42  ParticleSystem* getSystemByNumber(unsigned int number) const;
     43  ParticleEmitter* getEmitterByName(const char* emitterName) const;
     44  ParticleEmitter* getEmitterByNumber(unsigned int number) const;
     45
    4346  void debug();
    4447
  • orxonox/trunk/src/lib/graphics/particles/particle_system.cc

    r4320 r4338  
    2020#include "particle_emitter.h"
    2121#include "particle_engine.h"
     22
     23#include "field.h"
     24
    2225#include "compiler.h"
    2326#include "material.h"
     27#include "state.h"
     28
     29
     30// needed to find the Position of the Camera
     31#include "world.h"
    2432
    2533using namespace std;
     
    3442ParticleSystem::ParticleSystem (unsigned int maxCount, PARTICLE_TYPE type)
    3543{
    36    this->setClassID(CL_PARTICLE_SYSTEM, "ParticleSystem");
    37    this->material = NULL;
    38    this->name = NULL;
    39    this->maxCount = maxCount;
    40    this->count = 0;
    41    this->particles = NULL;
    42    this->deadList = NULL;
    43    this->setConserve(1);
    44    this->setLifeSpan(1);
    45    this->setInheritSpeed(0);
    46    this->glID = NULL;
    47    this->setRadius(1.0, 1.0, 0.0);
    48    this->setType(type, 1);
    49    ParticleEngine::getInstance()->addSystem(this);
     44  this->setClassID(CL_PARTICLE_SYSTEM, "ParticleSystem");
     45  this->material = NULL;
     46  this->name = NULL;
     47  this->maxCount = maxCount;
     48  this->count = 0;
     49  this->particles = NULL;
     50  this->deadList = NULL;
     51  this->setConserve(1);
     52  this->setLifeSpan(1);
     53  this->setInheritSpeed(0);
     54  this->glID = NULL;
     55  this->setRadius(1.0, 1.0, 0.0);
     56  this->setType(type, 1);
     57  this->setColor(1.0,1.0,1.0,1.0, .5,.5,.5,.5, .0,.0,.0,.0);
     58  ParticleEngine::getInstance()->addSystem(this);
    5059}
    5160
     
    106115  this->particleType = particleType;
    107116  this->dialectCount = count;
    108   if (glID != NULL)
    109     delete glID;
    110 
    111   glID = new GLuint[count];
    112   for (int i = 0; i< count; i++)
    113     glID[i] = 0;
    114 
    115   glID[0] = glGenLists(count);
    116  
    117   material = new Material("transperencyMap");
    118   material->setDiffuseMap("pictures/radialTransparency.png");
    119   //  material->setTransparency(.5);
    120 
    121   glNewList(glID[0], GL_COMPILE);
    122   glBegin(GL_TRIANGLE_STRIP);
    123   glTexCoord2f(1, 1);
    124   glVertex3f(0.0, .5, .5);
    125   glTexCoord2f(1, 0);
    126   glVertex3f(0.0, -.5, .5);
    127   glTexCoord2f(0, 1);
    128   glVertex3f(0.0, .5, -.5);
    129   glTexCoord2f(0, 0);
    130   glVertex3f(0.0, -.5, -.5);
    131   glEnd();
    132   glEndList();
     117  //  if (glID != NULL)
     118  //    delete glID;
     119
     120  //  glID = new GLuint[count];
     121  //  for (int i = 0; i< count; i++)
     122  //    glID[i] = 0;
     123
     124  //  glID[0] = glGenLists(count);
     125  if (this->material)
     126    delete this->material;
     127  this->material = NULL;
     128
     129  if (this->particleType == PARTICLE_SPRITE)
     130    {
     131      this->material = new Material("transperencyMap");
     132      this->material->setDiffuseMap("pictures/radialTransparency.png");
     133      //  material->setTransparency(.5);
     134    }
    133135}
    134136
     
    192194}
    193195
     196
     197/**
     198   \brief Tells the ParticleSystem how it should iterate the color over time
     199   \param ....
     200*/
     201void ParticleSystem::setColor(GLfloat br, GLfloat bg, GLfloat bb, GLfloat ba,
     202                              GLfloat mr, GLfloat mg, GLfloat mb, GLfloat ma,
     203                              GLfloat er, GLfloat eg, GLfloat eb, GLfloat ea)
     204{
     205  this->startColor[0] = br;
     206  this->startColor[1] = bg;
     207  this->startColor[2] = bb;
     208  this->startColor[3] = ba;
     209
     210  this->midColor[0] = mr;
     211  this->midColor[1] = mg;
     212  this->midColor[2] = mb;
     213  this->midColor[3] = ma;
     214
     215  this->endColor[0] = er;
     216  this->endColor[1] = eg;
     217  this->endColor[2] = eb;
     218  this->endColor[3] = ea;
     219}
     220
    194221/**
    195222   \brief ticks the system.
     
    207234      tickPart->radius += tickPart->radiusIt * dt;
    208235
     236      // applying force to the System.
     237      tickPart->velocity += tickPart->extForce * tickPart->mass;
     238      tickPart->extForce = Vector(0,0,0);
     239
     240      // applying Color
     241      //! \todo better algorithm to do this \todo also implement the midColor
     242      if (tickPart->lifeCycle < .5)
     243        {
     244          tickPart->color[0] = this->startColor[0] *(1.0-tickPart->lifeCycle*2.0) + this->midColor[0] *(tickPart->lifeCycle*2);
     245          tickPart->color[1] = this->startColor[1] *(1.0-tickPart->lifeCycle*2.0) + this->midColor[1] *(tickPart->lifeCycle*2);
     246          tickPart->color[2] = this->startColor[2] *(1.0-tickPart->lifeCycle*2.0) + this->midColor[2] *(tickPart->lifeCycle*2);
     247          tickPart->color[3] = this->startColor[3] *(1.0-tickPart->lifeCycle*2.0) + this->midColor[3] *(tickPart->lifeCycle*2);
     248        }
     249      else
     250        {
     251          tickPart->color[0] = this->midColor[0] *(2.0-tickPart->lifeCycle*2.0) + this->endColor[0] *(tickPart->lifeCycle*2);
     252          tickPart->color[1] = this->midColor[1] *(2.0-tickPart->lifeCycle*2.0) + this->endColor[1] *(tickPart->lifeCycle*2);
     253          tickPart->color[2] = this->midColor[2] *(2.0-tickPart->lifeCycle*2.0) + this->endColor[2] *(tickPart->lifeCycle*2);
     254          tickPart->color[3] = this->midColor[3] *(2.0-tickPart->lifeCycle*2.0) + this->endColor[3] *(tickPart->lifeCycle*2);
     255        }         
    209256      // many more to come
    210 
    211257
    212258      if (this->conserve < 1.0)
    213259        tickPart->velocity = tickPart->velocity * this->conserve;
    214260      // find out if we have to delete tickPart
    215       if ((tickPart->timeToLive -= dt) <= 0)
     261      if ((tickPart->lifeCycle += dt/tickPart->lifeTime) >= 1.0)
    216262        {
    217263          // remove the particle from the list
     
    241287}
    242288
     289/**
     290    \brief applies some force to a Particle.
     291 */
     292void ParticleSystem::applyField(float dt, Field* field)
     293{
     294  Particle* tickPart = particles;
     295  while (tickPart)
     296    {
     297      tickPart->extForce += field->calcForce(dt, tickPart->position);
     298      tickPart = tickPart->next;
     299    }
     300}
     301
     302
    243303/**
    244304   \brief draws all the Particles of this System
    245305   \param the time passed in seconds (since the last draw)
     306
     307   The Cases in this Function all do the same:
     308   Drawing all the particles with the appropriate Type.
     309   This is just the fastest Way to do this, but will most likely be changed in the future.
    246310*/
    247311void ParticleSystem::draw(float dt)
    248312{
    249313  glPushAttrib(GL_ENABLE_BIT);
    250   //  material->select();
     314  glDisable(GL_LIGHTING);
     315
    251316  Particle* drawPart = particles;
    252 
     317     
    253318  switch (this->particleType)
    254319    {
     320    default:
    255321    case PARTICLE_SPRITE:
    256322      glMatrixMode(GL_MODELVIEW);
    257       //  glDisable(GL_LIGHTING);
     323      glDisable(GL_DEPTH_TEST);
     324
    258325      material->select();
    259       glDisable(GL_DEPTH_TEST);
     326      //      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_ENV_MODE, GL_MODULATE);
     327     
     328
    260329      while (likely(drawPart != NULL))
    261330        {
    262           glPushMatrix();
    263           glTranslatef(drawPart->position.x, drawPart->position.y, drawPart->position.z);
    264           glScalef(drawPart->radius, drawPart->radius, drawPart->radius);
    265           glCallList(*this->glID);
    266          
    267           //glVertex3f(drawPart->position.x, drawPart->position.y, drawPart->position.z);
     331          glColor4fv(drawPart->color);
     332          //! \todo implement a faster code for the look-at Camera algorithm.
     333
     334          const PNode* camera = State::getInstance()->getCamera();  //!< \todo MUST be different
     335          Vector cameraPos = camera->getAbsCoor();
     336          Vector cameraTargetPos = State::getInstance()->getCameraTarget()->getAbsCoor();
     337          Vector view = cameraTargetPos - cameraPos;
     338          Vector up = Vector(0, 1, 0);
     339          up = camera->getAbsDir().apply(up);
     340          Vector h = up.cross(view);
     341          Vector v = h.cross(view);
     342          h.normalize();
     343          v.normalize();
     344          v *= .5 * drawPart->radius;
     345          h *= .5 * drawPart->radius;
     346
     347          glBegin(GL_TRIANGLE_STRIP);
     348          glTexCoord2i(1, 1);
     349          glVertex3f(drawPart->position.x - h.x - v.x,
     350                     drawPart->position.y - h.y - v.y,
     351                     drawPart->position.z - h.z - v.z);
     352          glTexCoord2i(0, 1);
     353          glVertex3f(drawPart->position.x - h.x + v.x,
     354                     drawPart->position.y - h.y + v.y,
     355                     drawPart->position.z - h.z + v.z);
     356          glTexCoord2i(1, 0);
     357          glVertex3f(drawPart->position.x + h.x - v.x,
     358                     drawPart->position.y + h.y - v.y,
     359                     drawPart->position.z + h.z - v.z);
     360          glTexCoord2i(0, 0);
     361          glVertex3f(drawPart->position.x + h.x + v.x,
     362                     drawPart->position.y + h.y + v.y,
     363                     drawPart->position.z + h.z + v.z);
     364
     365          glEnd();
     366 
    268367          drawPart = drawPart->next;
    269           glPopMatrix();
    270         }
    271       //      glEnd();
    272      
    273       //  glEnable(GL_LIGHTING);
    274      
    275       glEnable(GL_DEPTH_TEST);
     368        }
     369
     370     
    276371      break;
    277     default:
    278372
    279373    case PARTICLE_SPARK:
     
    282376      while (likely(drawPart != NULL))
    283377        {
     378          glColor4fv(drawPart->color);
    284379          glVertex3f(drawPart->position.x, drawPart->position.y, drawPart->position.z);
    285380          glVertex3f(drawPart->position.x - drawPart->velocity.x,
     
    295390      while (likely(drawPart != NULL))
    296391        {
     392          glColor4fv(drawPart->color);
     393
    297394          glLineWidth(drawPart->radius);
    298395
     
    349446        }
    350447     
    351       particles->timeToLive = this->lifeSpan + (float)(rand()/RAND_MAX)* this->randomLifeSpan;
     448      particles->lifeTime = this->lifeSpan + (float)(rand()/RAND_MAX)* this->randomLifeSpan;
     449      particles->lifeCycle = 0.0;
    352450      particles->position = position;
    353451      particles->velocity = velocity;
     
    357455      particles->radius = this->startRadius + (rand()/RAND_MAX-.5)*this->randomStartRadius;
    358456     
    359       particles->radiusIt = (this->endRadius + (rand()/RAND_MAX-.5)*this->randomEndRadius - particles->radius) / particles->timeToLive;
     457      particles->radiusIt = (this->endRadius + (rand()/RAND_MAX-.5)*this->randomEndRadius - particles->radius) / particles->lifeTime;
    360458
    361459      ++this->count;
  • orxonox/trunk/src/lib/graphics/particles/particle_system.h

    r4176 r4338  
    3131class Material;
    3232class ParticleEmitter;
    33 
     33class Field;
    3434
    3535//! A struct for one Particle
    3636typedef struct Particle
    3737{
    38   float timeToLive;           //!< The time this particle lives from NOW on.
     38  float lifeTime;             //!< The time this particle has to live.
     39  float lifeCycle;            //!< The fraction of time passed. (in percentage of its lifeTime)
     40
    3941  Vector position;            //!< The current position of this particle.
    4042  Vector velocity;            //!< The current velocity of this particle.
     43  Vector extForce;            //!< The external Force that influences this Particle.
    4144  Quaternion rotation;        //!< The current rotation of this particle.
    4245  float mass;                 //!< The mass of this particle.
    4346  float radius;               //!< The current size of this particle.
    4447  float radiusIt;             //!< The difference of the Size per second.
     48
     49  GLfloat color [4];          //!< A Color for the particles.
    4550
    4651  PARTICLE_TYPE type;
     
    6974  void setMass(float mass, float randomMass);
    7075
     76  void setColor(GLfloat br, GLfloat bg, GLfloat bb, GLfloat ba,
     77                GLfloat mr, GLfloat mg, GLfloat mb, GLfloat ma,
     78                GLfloat er, GLfloat eg, GLfloat eb, GLfloat ea);
     79
     80  /** \returns the Type of the particles */
     81  inline PARTICLE_TYPE getType(void) const { return this->particleType; };
     82  /** \returns the Material that lies on this particles */
     83  inline const Material* getMaterial(void) const { return this->material; };
     84  /** \returns the inherit-speed-factor */
     85  inline float getInheritSpeed(void) const { return this->inheritSpeed; };
     86  /** \returns the lifespan of the particles */
     87  inline float getLifeSpan(void) const { return this->lifeSpan; };
     88  /** \returns the starting-radius of the particles */
     89  inline float getStartRadius(void) const { return this->startRadius; };
     90  /** \returns the end-radius of the particles */
     91  inline float getEndRadius(void) const { return this->endRadius; };
     92  /** \returns the conserve-factor of the particles */
     93  inline float getConserve(void) const { return this->conserve; };
     94  /** \returns the initial mass of the particles */
     95  inline float getMass(void) const { return this->initialMass; };
     96
     97  void applyField(float dt, Field* field);
     98
    7199  void tick(float dt);
    72100  void draw(float dt);
     
    79107  float conserve;            //!< How much energy gets conserved to the next Tick.
    80108  float lifeSpan;            //!< Initial lifetime of a Particle.
    81   float randomLifeSpan;
    82   float startRadius;
    83   float endRadius;
    84   float randomStartRadius;
    85   float randomEndRadius;
    86   float initialMass;
    87   float randomInitialMass;
    88   float inheritSpeed;
     109  float randomLifeSpan;      //!< A random value for the Lifespan (around the initial lifetime)
     110  float startRadius;         //!< The beginning Radius of the Particle
     111  float endRadius;           //!< The end Radius of the Particle
     112  float randomStartRadius;   //!< The Random start Radius (begin + rand*randomValue)
     113  float randomEndRadius;     //!< Random end value
     114  float initialMass;         //!< The initial Mass of the Particle
     115  float randomInitialMass;   //!< The random initial Mass of the Particle
     116  float inheritSpeed;        //!< How much speed the particle inherits from the Emitters speed \todo move this to the emitter
     117
     118  GLfloat startColor[4];     //!< Color of the Particle at the beginning
     119  GLfloat midColor[4];       //!< Color of the Particle at the middle of its lifeSpan
     120  GLfloat endColor[4];       //!< Color of the Particle at the end of its lifeSpan
    89121
    90122  // particles
  • orxonox/trunk/src/lib/gui/gui/Makefile.am

    r4266 r4338  
    2525noinst_LIBRARIES = libORXgui.a
    2626
    27 libORXgui_a_CPPFLAGS=$(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)
     27libORXgui_a_CPPFLAGS = -DBUILD_ORXONOX \
     28                        $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)
    2829
    2930libORXgui_a_SOURCES = gui.cc \
  • orxonox/trunk/src/lib/gui/gui/Makefile.in

    r4276 r4338  
    200200AM_LDFLAGS = $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
    201201noinst_LIBRARIES = libORXgui.a
    202 libORXgui_a_CPPFLAGS = $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)
     202libORXgui_a_CPPFLAGS = -DBUILD_ORXONOX \
     203                        $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS)
     204
    203205libORXgui_a_SOURCES = gui.cc \
    204206                      gui_gtk.cc \
  • orxonox/trunk/src/lib/gui/gui/gui_gtk.cc

    r4134 r4338  
    4747bool initGUI(int argc, char *argv[])
    4848{
    49   executable = new char[strlen(argv[0])+1];
    50   strcpy(executable, argv[0]);
     49  if (argv)
     50    {
     51      executable = new char[strlen(argv[0])+1];
     52      strcpy(executable, argv[0]);
     53    }
     54  else
     55    executable = NULL;
    5156
    5257#ifdef HAVE_GTK2
     
    10731078#ifdef HAVE_GTK2
    10741079/**
    1075     \brief Signal OptionChange writes the Value from the Slider to its Object-Database.
    1076     \param widget The widget(Slider) that has a changed Value
    1077     \param slider the Slider-Object that should receive the change.
     1080    \brief Signal OptionChange writes the Value from the Option to its Object-Database.
     1081    \param widget The widget(Option) that has a changed Value
     1082    \param option the Option-Object that should receive the change.
    10781083*/
    10791084gint Option::OptionChange(GtkWidget *widget, Widget* option)
    10801085{
    10811086  static_cast<Option*>(option)->changeOption();
    1082   flags->setTextFromFlags(Window::mainWindow);  //// must be different !!!
     1087#ifdef BUILD_ORXONOX
     1088  flags->setTextFromFlags(Window::mainWindow);
     1089#endif
    10831090}
    10841091#endif /* HAVE_GTK2 */
     
    12421249   \param end The maximal Value of the slider.
    12431250*/
    1244 Slider::Slider(const char* slidername, int start, int end)
    1245 {
    1246   this->optionType = GUI_INT;
     1251Slider::Slider(const char* slidername, float start, float end)
     1252{
     1253  this->optionType = GUI_FLOAT;
    12471254
    12481255  this->start = start;
     
    12681275
    12691276/**
     1277   \brief sets the exactness of the widget
     1278   \param exactness count of digits after the dot
     1279*/
     1280void Slider::setExactness(int exactness)
     1281{
     1282#ifdef HAVE_GTK2
     1283 gtk_scale_set_digits(GTK_SCALE(this->widget), exactness);
     1284#endif /* HAVE_GTK2 */
     1285}
     1286
     1287/**
    12701288   \brief Setting a new value to the Slider.
    12711289   Maybe you also require a Slider::redraw() for this to display
    12721290*/
    1273 void Slider::setValue(int value)
    1274 {
    1275   this->value = value;
     1291void Slider::setValue(float value)
     1292{
     1293  this->fValue = value;
    12761294}
    12771295
     
    12831301{
    12841302#ifdef HAVE_GTK2
    1285   gtk_range_set_value(GTK_RANGE(this->widget), this->value);
     1303  gtk_range_set_value(GTK_RANGE(this->widget), this->fValue);
    12861304#endif /* HAVE_GTK2 */
    12871305}
     
    12931311{
    12941312#ifdef HAVE_GTK2
    1295   this->value =(int)gtk_range_get_value(GTK_RANGE(this->widget));
     1313  this->fValue = gtk_range_get_value(GTK_RANGE(this->widget));
    12961314#else /* HAVE_GTK2 */
    12971315  char tmpChar[20];
     
    12991317  scanf("%s", tmpChar);
    13001318
    1301   if ((this->value = atoi(tmpChar))> this->end)
    1302     this->value = this->end;
    1303   if (this->value <= this->start)
    1304     this->value = this->start;
    1305 
    1306   PRINT(0)("%s set to: %d\n",this->title, this->value);
    1307 #endif /* HAVE_GTK2 */
    1308 }
     1319  if ((this->fValue = atof(tmpChar))> this->end)
     1320    this->fValue = this->end;
     1321  if (this->fValue <= this->start)
     1322    this->fValue = this->start;
     1323
     1324  PRINT(0)("%s set to: %d\n",this->title, this->fValue);
     1325#endif /* HAVE_GTK2 */
     1326}
     1327
     1328char* Slider::save(void)
     1329{
     1330  char* value = new char [30];
     1331  sprintf (value, "%f", this->fValue);
     1332  return value;
     1333}
     1334void Slider::load(char* loadString)
     1335{
     1336  this->fValue = atof(loadString);
     1337  PRINT(5)("Loading %s: %s %f\n", this->title, loadString, fValue);
     1338  this->redraw();
     1339}
     1340
    13091341
    13101342//////////
     
    13871419{
    13881420  MenuItem* tmpItem = this->firstItem;
    1389   for (int i = 0; i<this->value; i++)
    1390     tmpItem = tmpItem->next;
    1391      
    1392   return tmpItem->name;
     1421  for (int i = 0; i < this->value; i++)
     1422    if (tmpItem)
     1423      tmpItem = tmpItem->next;
     1424    else
     1425      break;
     1426  if (tmpItem)
     1427    {
     1428      char* tmpName = new char[strlen(tmpItem->name)+1];
     1429      strcpy(tmpName, tmpItem->name);
     1430      return tmpName;
     1431    }
     1432  else
     1433    return NULL;
    13931434}
    13941435
     
    14711512
    14721513#endif /* HAVE_GTK2 */
    1473   PRINT(5)("%s set to: %d\n", this->title, this->value);
     1514  PRINT(1)("%s set to: %d\n", this->title, this->value);
    14741515}
    14751516
  • orxonox/trunk/src/lib/gui/gui/gui_gtk.h

    r4132 r4338  
    6161
    6262  virtual void setTitle(const char* title);  //!< An abstract Function, that sets the title of Widgets.
     63  virtual const char* getTitle(void) const { return this->title; };
    6364
    6465  Widget* findWidgetByName(char* name, unsigned int depth);
     
    296297{
    297298 private:
    298   int start;                            //!< The beginning of the Slider-range.
    299   int end;                              //!< The end of the Slider-range.
    300  public:
    301   Slider(const char* slidername, int start, int end);
     299  float start;                            //!< The beginning of the Slider-range.
     300  float end;                              //!< The end of the Slider-range.
     301  float fValue;                           //!< a value for the slider
     302 public:
     303  Slider(const char* slidername, float start, float end);
    302304  virtual ~Slider(void);
    303305
    304   void setValue(int value);
    305   virtual void redraw(void);
    306   virtual void changeOption(void);
     306  void setExactness(int exactness);
     307  void setValue(float value);
     308  virtual void redraw(void);
     309  virtual void changeOption(void);
     310
     311  virtual char* save(void);
     312  virtual void load(char* loadString);
    307313};
    308314
  • orxonox/trunk/src/story_entities/world.cc

    r4326 r4338  
    4545#include "particle_engine.h"
    4646#include "graphics_engine.h"
     47#include "physics_engine.h"
    4748
    4849#include "command_node.h"
     
    279280
    280281  AnimationPlayer::getInstance(); // initializes the animationPlayer
     282  PhysicsEngine::getInstance();
    281283
    282284  this->localCamera = new Camera();
     
    453455
    454456
    455 
    456   ParticleSystem* system = new ParticleSystem(1000, PARTICLE_SPRITE);
    457   system->setLifeSpan(.5);
    458   system->setConserve(.99);
    459   system->setRadius(2, 0, 2, 0);
    460 
    461   ParticleEmitter* emitter = new ParticleEmitter(Vector(-1, 0, 0), M_PI_4, 100, .05);
    462   emitter->setParent(this->localPlayer);
    463  
    464   particleEngine->addConnection(emitter, system);
    465 
     457  /*
     458    ParticleSystem* system = new ParticleSystem(1000, PARTICLE_SPRITE);
     459    system->setLifeSpan(.5);
     460    system->setConserve(.99);
     461    system->setRadius(2, 0, 2, 0);
     462   
     463    ParticleEmitter* emitter = new ParticleEmitter(Vector(-1, 0, 0), M_PI_4, 100, .05);
     464    emitter->setParent(this->localPlayer);
     465   
     466    particleEngine->addConnection(emitter, system);
     467  */
    466468  WorldEntity* testEntity = new TestEntity();
    467469  //testEntity->setRelCoor(Vector(570, 10, -15));
  • orxonox/trunk/src/story_entities/world.h

    r4326 r4338  
    3737  static WorldInterface* getInstance();
    3838  void init(World* world);
     39  inline World* getCurrentWorld(void) {return this->worldReference;}
    3940  tList<WorldEntity>* getEntityList();
    4041
     
    9394  void setPath( const char* name);
    9495
     96  inline Camera* getLocalCamera(void) {return this->localCamera;}
     97
    9598 private:
    9699  void constuctorInit(char* name, int worldID);
  • orxonox/trunk/src/subprojects/Makefile.am

    r4266 r4338  
    11SUBDIRS = importer \
     2          particles \
    23          gui \
    34          testmain
     5
     6noinst_HEADERS = framework.h
     7
     8
     9EXTRA_DIST = framework.cc
     10
  • orxonox/trunk/src/subprojects/Makefile.in

    r4276 r4338  
    1414
    1515@SET_MAKE@
     16
    1617srcdir = @srcdir@
    1718top_srcdir = @top_srcdir@
     
    3637host_triplet = @host@
    3738subdir = src/subprojects
    38 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
     39DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
     40        $(srcdir)/Makefile.in
    3941ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    4042am__aclocal_m4_deps = $(top_srcdir)/configure.ac
     
    5254        pdf-recursive ps-recursive uninstall-info-recursive \
    5355        uninstall-recursive
     56HEADERS = $(noinst_HEADERS)
    5457ETAGS = etags
    5558CTAGS = ctags
     
    165168target_vendor = @target_vendor@
    166169SUBDIRS = importer \
     170          particles \
    167171          gui \
    168172          testmain
    169173
     174noinst_HEADERS = framework.h
     175EXTRA_DIST = framework.cc
    170176all: all-recursive
    171177
     
    364370check-am: all-am
    365371check: check-recursive
    366 all-am: Makefile
     372all-am: Makefile $(HEADERS)
    367373installdirs: installdirs-recursive
    368374installdirs-am:
  • orxonox/trunk/src/subprojects/importer/Makefile.am

    r4272 r4338  
    4848                  $(MAINSRCDIR)/lib/coord/null_parent.cc
    4949
    50 noinst_HEADERS = framework.h \
    51                  windowHandler.h
     50noinst_HEADERS = framework.h
     51
  • orxonox/trunk/src/subprojects/importer/Makefile.in

    r4276 r4338  
    212212                  $(MAINSRCDIR)/lib/coord/null_parent.cc
    213213
    214 noinst_HEADERS = framework.h \
    215                  windowHandler.h
    216 
     214noinst_HEADERS = framework.h
    217215all: all-am
    218216
  • orxonox/trunk/src/world_entities/camera.h

    r3869 r4338  
    1919   This class controls the viewpoint from which the World is rendered.
    2020*/
    21 class Camera : public PNode 
     21class Camera : public PNode
    2222{
    2323 private:
Note: See TracChangeset for help on using the changeset viewer.