Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4128 in orxonox.OLD for orxonox/branches


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

orxonox/branches/particleEngine: renders some particles again

Location:
orxonox/branches/particleEngine/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/particleEngine/src/defs/globals.h

    r4119 r4128  
    4646#define CONFIG_NAME_TEXTURE_DETAIL "Texture-Detail"
    4747#define CONFIG_NAME_MODEL_DETAIL "Model-Detail"
     48#define CONFIG_NAME_PARTICLES_ENABLED "Particles Enabled"
    4849#define CONFIG_NAME_ANTI_ALIASING "Anti-Aliasing"
    4950#define CONFIG_NAME_FILTER_METHOD "Filtering-Method"
  • orxonox/branches/particleEngine/src/lib/graphics/particles/particle_emitter.h

    r3966 r4128  
    2222
    2323 public:
    24   ParticleEmitter(const Vector& direction, float angle = .5, float emissionRate = 1.0,
    25                   float velocity = 1.0);
     24  ParticleEmitter(const Vector& direction, float angle = .5,
     25                  float emissionRate = 1.0, float velocity = 1.0);
    2626  virtual ~ParticleEmitter(void);
    2727
  • orxonox/branches/particleEngine/src/lib/graphics/particles/particle_engine.h

    r3966 r4128  
    88
    99#include "base_object.h"
     10#include "particle_system.h"
     11#include "particle_emitter.h"
    1012
    1113// FORWARD DEFINITION
  • orxonox/branches/particleEngine/src/lib/graphics/particles/particle_system.h

    r4125 r4128  
    5454
    5555 public:
    56   ParticleSystem(unsigned int maxCount = PARTICLE_DEFAULT_MAX_COUNT, PARTICLE_TYPE type = PARTICLE_DEFAULT_TYPE);
     56  ParticleSystem(unsigned int maxCount = PARTICLE_DEFAULT_MAX_COUNT,
     57                 PARTICLE_TYPE type = PARTICLE_DEFAULT_TYPE);
    5758  virtual ~ParticleSystem();
    5859  void setName(const char* name);
     
    6364  void setInheritSpeed(float value);
    6465  void setLifeSpan(float lifeSpan, float randomLifeSpan = 0.0);
    65   void setRadius(float startRadius, float endRadius, float randomStartRadius = 0.0, float randomEndRadius = 0.0);
     66  void setRadius(float startRadius, float endRadius,
     67                 float randomStartRadius = 0.0, float randomEndRadius = 0.0);
    6668  void setConserve(float conserve);
    6769  void setMass(float mass, float randomMass);
  • orxonox/branches/particleEngine/src/lib/gui/gui/gui_video.cc

    r4091 r4128  
    104104      Label* modelDetailLabel;  //!< Label for model-detail.
    105105      Menu* modelDetail;        //!< model-detail.
     106      CheckButton* particles;   //!< If the Particles should be enabled
    106107      Label* antiAliasingLabel; //!< Label for the anti-aliasing mode.
    107108      Menu* antiAliasing;       //!< Menu for the Antialiasing-mode.
     
    139140      advancedBox->fill(modelDetail);
    140141     
     142      particles = new CheckButton(CONFIG_NAME_PARTICLES_ENABLED);
     143      particles->saveability();
     144      particles->setDefaultValue(1);
     145      advancedBox->fill(particles);
     146
    141147      antiAliasingLabel = new Label("Anti-Aliasing-depth:");
    142148      advancedBox->fill(antiAliasingLabel);
     
    152158      filterMethod->saveability();
    153159      advancedBox->fill(filterMethod);
     160
     161
    154162 
    155163      closeButton = new Button("close");
  • orxonox/branches/particleEngine/src/story_entities/world.cc

    r4105 r4128  
    4040#include "garbage_collector.h"
    4141#include "animation_player.h"
     42#include "particle_engine.h"
    4243
    4344#include "command_node.h"
     
    207208  delete this->lightMan;
    208209  delete this->trackManager;
     210  delete this->particleEngine;
    209211  TextEngine::getInstance()->flush();
    210212
     
    251253  this->garbageCollector = GarbageCollector::getInstance();
    252254
     255  this->particleEngine = ParticleEngine::getInstance();
    253256  this->trackManager = TrackManager::getInstance();
    254257  this->lightMan = LightManager::getInstance();
     
    489492  this->spawn(terrain);
    490493
     494
     495  ParticleSystem* system = new ParticleSystem(1000);
     496  system->setLifeSpan(1);
     497  system->setRadius(2, 0, 2, 0);
     498  ParticleEmitter* emitter = new ParticleEmitter(Vector(-1, 0, 0), 0, 500);
     499  emitter->setParent(this->localPlayer);
     500 
     501  particleEngine->addConnection(emitter, system);
    491502}
    492503
     
    951962
    952963  TextEngine::getInstance()->draw();
     964  particleEngine->draw();
     965
    953966  lightMan->draw(); // must be at the end of the drawing procedure, otherwise Light cannot be handled as PNodes //
    954967}
     
    11361149
    11371150      AnimationPlayer::getInstance()->tick(seconds);
     1151      particleEngine->tick(seconds);
    11381152    }
    11391153  this->lastFrame = currentFrame;
  • orxonox/branches/particleEngine/src/story_entities/world.h

    r4015 r4128  
    2020class GLMenuImageScreen;
    2121class LightManager;
     22class ParticleEngine;
    2223class Terrain;
    2324class GarbageCollector;
     
    107108  PNode* nullParent;                  //!< The zero-point, that everything has as its parent.
    108109  TrackManager* trackManager;         //!< The reference of the TrackManager that handles the course through the Level.
     110  ParticleEngine* particleEngine;     //!< The ParticleEngine of the World.
    109111  Camera* localCamera;                //!< The current Camera
    110112  WorldEntity* sky;                   //!< The Environmental Heaven of orxonox \todo insert this to environment insted
Note: See TracChangeset for help on using the changeset viewer.