Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3951 in orxonox.OLD


Ignore:
Timestamp:
Apr 25, 2005, 12:28:20 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/particleEngine: some minor fixes

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

Legend:

Unmodified
Added
Removed
  • orxonox/branches/particleEngine/src/lib/graphics/particles/particle_emitter.cc

    r3950 r3951  
    134134        randDir.normalize();
    135135        randDir = (this->getAbsDir()*Quaternion(angle + randomAngle *((float)random()/RAND_MAX -.5), randDir)).apply(this->direction);
    136         randDir = *randDir.getNormalized() + (this->getVelocity() * system->inheritSpeed);
    137        
    138         system->addParticle(this->getAbsCoor(), randDir* velocity);
     136        randDir = *randDir.getNormalized()*velocity + (this->getVelocity() * system->inheritSpeed);
     137
     138        system->addParticle(this->getAbsCoor(), randDir);
    139139      }
    140140  }
  • orxonox/branches/particleEngine/src/lib/graphics/particles/particle_system.cc

    r3948 r3951  
    184184  while (likely(tickPart != NULL))
    185185    {
    186      
    187186      tickPart->position = tickPart->position + tickPart->velocity;
    188187      tickPart->radius += tickPart->radiusIt * dt;
    189188
    190189      // many more to come
    191 
    192190
    193191
     
    271269   \param data some more data given by the emitter
    272270*/
    273 void ParticleSystem::addParticle(Vector position, Vector velocity, unsigned int data)
     271void ParticleSystem::addParticle(const Vector& position, const Vector& velocity, unsigned int data)
    274272{
    275273  if (this->count <= this->maxCount)
     
    292290      particles->position = position;
    293291      particles->velocity = velocity;
     292
    294293      //  particle->rotation = ; //! \todo rotation is once again something to be done.
    295294      particles->mass = this->initialMass + (random()/RAND_MAX -.5)* this->randomInitialMass;
  • orxonox/branches/particleEngine/src/lib/graphics/particles/particle_system.h

    r3944 r3951  
    8787  GLuint dialectCount;       //!< How many different types of particles are there in the Particle System
    8888
    89   void addParticle(Vector position, Vector velocity, unsigned int data = 0);
     89  void addParticle(const Vector& position, const Vector& velocity, unsigned int data = 0);
    9090 
    9191};
  • orxonox/branches/particleEngine/src/lib/math/vector.cc

    r3860 r3951  
    172172   \brief Outputs the values of the Vector
    173173*/
    174 void Vector::debug(void)
     174void Vector::debug(void) const
    175175{
    176176  PRINT(0)("Vector Debug information\n");
  • orxonox/branches/particleEngine/src/lib/math/vector.h

    r3860 r3951  
    5353  Vector abs();
    5454
    55   void debug();
     55  void debug() const;
    5656};
    5757
  • orxonox/branches/particleEngine/src/story_entities/world.cc

    r3950 r3951  
    372372            //localCamera->setParent(TrackNode::getInstance());
    373373            tn->addChild(this->localCamera);
     374            localCamera->setMode(PNODE_MOVEMENT);
    374375            //      localCamera->lookAt(tn);
    375             this->localPlayer->setMode(PNODE_ALL);
     376            this->localPlayer->setMode(PNODE_ROTATE_AND_MOVE);
    376377            //Vector* cameraOffset = new Vector (0, 5, -10);
    377378            trackManager->condition(2, LEFTRIGHT, this->localPlayer);
     
    380381            ParticleEmitter* testEmitter,* testEmitter2;
    381382            ParticleSystem* testSystem;
    382             testEmitter = new ParticleEmitter(Vector(-1,0,0), .4, 60.0, 0);
     383            testEmitter = new ParticleEmitter(Vector(-1,0,0), .4, 600.0, 0);
    383384            testEmitter->setParent(localPlayer);
    384385            testEmitter->setRelCoor(Vector(-3, 0, 0));
     
    392393            testSystem->setLifeSpan(1, .2);
    393394            testSystem->setRadius(3.0, 0.0, .5);
    394             testSystem->setConserve(.8);
     395            testSystem->setConserve(1);
    395396            testSystem->setInheritSpeed(1);
    396397            testSystem->setName("system");
Note: See TracChangeset for help on using the changeset viewer.