Show
Ignore:
Timestamp:
03/21/12 18:36:20 (2 years ago)
Author:
robert
Message:

Ran script to remove trailing spaces and tabs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgParticle/ConnectedParticleSystem.cpp

    r11482 r13041  
    1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield  
     1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 
    22 * 
    3  * This library is open source and may be redistributed and/or modified under   
    4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or  
     3 * This library is open source and may be redistributed and/or modified under 
     4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 
    55 * (at your option) any later version.  The full license is in LICENSE file 
    66 * included with this distribution, and on the openscenegraph.org website. 
    7  *  
     7 * 
    88 * This library is distributed in the hope that it will be useful, 
    99 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
     10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1111 * OpenSceneGraph Public License for more details. 
    1212*/ 
     
    4444    Particle* particle = ParticleSystem::createParticle(ptemplate); 
    4545    int particleIndex = (int)(particle - &_particles[0]); 
    46      
     46 
    4747    if (particle) 
    4848    { 
    49      
     49 
    5050        if (_startParticle == Particle::INVALID_INDEX) 
    5151        { 
    52             // we are the fisrt particle create, so start the connect particle list  
     52            // we are the fisrt particle create, so start the connect particle list 
    5353            _startParticle = particleIndex; 
    5454        } 
     
    6565        // set the new particle as the last particle created. 
    6666        _lastParticleCreated = particleIndex; 
    67          
    68     } 
    69      
     67 
     68    } 
     69 
    7070    return particle; 
    7171} 
    72          
     72 
    7373void ConnectedParticleSystem::reuseParticle(int particleIndex) 
    7474{ 
     
    7676 
    7777    if (particleIndex<0 || particleIndex>=(int)_particles.size()) return; 
    78      
     78 
    7979    Particle* particle = &_particles[particleIndex]; 
    8080    int previous = particle->getPreviousParticle(); 
     
    8686        _startParticle = particle->getNextParticle(); 
    8787    } 
    88      
     88 
    8989    if (_lastParticleCreated == particleIndex) 
    9090    { 
    9191        _lastParticleCreated = Particle::INVALID_INDEX; 
    9292    } 
    93      
     93 
    9494    // join up the previous and next particles to account for 
    9595    // the deletion of the this particle 
     
    9898        _particles[previous].setNextParticle(next); 
    9999    } 
    100      
     100 
    101101    if (next != Particle::INVALID_INDEX) 
    102102    { 
     
    107107    particle->setPreviousParticle(Particle::INVALID_INDEX); 
    108108    particle->setNextParticle(Particle::INVALID_INDEX); 
    109      
     109 
    110110    // put the particle on the death stack 
    111111    ParticleSystem::reuseParticle(particleIndex); 
     
    122122    const Particle* particle = (_startParticle != Particle::INVALID_INDEX) ? &_particles[_startParticle] : 0; 
    123123    if (!particle) return; 
    124      
     124 
    125125 
    126126    osg::Vec4 pixelSizeVector = osg::CullingSet::computePixelSizeVector(*state.getCurrentViewport(),state.getProjectionMatrix(),state.getModelViewMatrix()); 
     
    171171    { 
    172172 
    173         // draw the connected particles as a quad stripped aligned to be orthogonal to the eye  
     173        // draw the connected particles as a quad stripped aligned to be orthogonal to the eye 
    174174        osg::Matrix eyeToLocalTransform; 
    175175        eyeToLocalTransform.invert(state.getModelViewMatrix());