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

Ran script to remove trailing spaces and tabs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osgParticle/DomainOperator

    r12139 r13041  
    1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield  
     1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 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*/ 
     
    4545            DISK_DOMAIN 
    4646        }; 
    47          
     47 
    4848        Domain( Type t ) : r1(0.0f), r2(0.0f), type(t) {} 
    4949        osg::Plane plane; 
     
    5757        Type type; 
    5858    }; 
    59      
     59 
    6060    DomainOperator() 
    6161    : Operator() 
    6262    {} 
    63      
     63 
    6464    DomainOperator( const DomainOperator& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY ) 
    6565    : Operator(copy, copyop), _domains(copy._domains), _backupDomains(copy._backupDomains) 
    6666    {} 
    67      
     67 
    6868    META_Object( osgParticle, DomainOperator ); 
    69      
     69 
    7070    /// Add a point domain 
    7171    inline void addPointDomain( const osg::Vec3& p ); 
    72      
     72 
    7373    /// Add a line segment domain 
    7474    inline void addLineSegmentDomain( const osg::Vec3& v1, const osg::Vec3& v2 ); 
    75      
     75 
    7676    /// Add a triangle domain 
    7777    inline void addTriangleDomain( const osg::Vec3& v1, const osg::Vec3& v2, const osg::Vec3& v3 ); 
    78      
     78 
    7979    /// Add a rectangle domain 
    8080    inline void addRectangleDomain( const osg::Vec3& corner, const osg::Vec3& w, const osg::Vec3& h ); 
    81      
     81 
    8282    /// Add a plane domain 
    8383    inline void addPlaneDomain( const osg::Plane& plane ); 
    84      
     84 
    8585    /// Add a sphere domain 
    8686    inline void addSphereDomain( const osg::Vec3& c, float r ); 
    87      
     87 
    8888    /// Add a box domain 
    8989    inline void addBoxDomain( const osg::Vec3& min, const osg::Vec3& max ); 
    90      
     90 
    9191    /// Add a disk domain 
    9292    inline void addDiskDomain( const osg::Vec3& c, const osg::Vec3& n, float r1, float r2=0.0f ); 
    93      
     93 
    9494    /// Add a domain object directly, used by the .osg wrappers and serializers. 
    9595    void addDomain( const Domain& domain ) { _domains.push_back(domain); } 
    96      
     96 
    9797    /// Get a domain object directly, used by the .osg wrappers and serializers. 
    9898    const Domain& getDomain( unsigned int i ) const { return _domains[i]; } 
    99      
     99 
    100100    /// Remove a domain at specific index 
    101101    void removeDomain( unsigned int i ) 
    102102    { if (i<_domains.size()) _domains.erase(_domains.begin() + i); } 
    103      
     103 
    104104    /// Remove all existing domains 
    105105    void removeAllDomains() { _domains.clear(); } 
    106      
     106 
    107107    /// Get number of domains 
    108108    unsigned int getNumDomains() const { return _domains.size(); } 
    109      
     109 
    110110    /// Apply the acceleration to a particle. Do not call this method manually. 
    111111    void operate( Particle* P, double dt ); 
    112      
     112 
    113113    /// Perform some initializations. Do not call this method manually. 
    114114    void beginOperate( Program* prg ); 
    115      
     115 
    116116    /// Perform some post-operations. Do not call this method manually. 
    117117    void endOperate(); 
    118      
     118 
    119119protected: 
    120120    virtual ~DomainOperator() {} 
    121121    DomainOperator& operator=( const DomainOperator& ) { return *this; } 
    122      
     122 
    123123    virtual void handlePoint( const Domain& domain, Particle* P, double dt ) { ignore("Point"); } 
    124124    virtual void handleLineSegment( const Domain& domain, Particle* P, double dt ) { ignore("LineSegment"); } 
     
    129129    virtual void handleBox( const Domain& domain, Particle* P, double dt ) { ignore("Box"); } 
    130130    virtual void handleDisk( const Domain& domain, Particle* P, double dt ) { ignore("Disk"); } 
    131      
     131 
    132132    inline void computeNewBasis( const osg::Vec3&, const osg::Vec3&, osg::Vec3&, osg::Vec3& ); 
    133133    inline void ignore( const std::string& func ); 
    134      
     134 
    135135    std::vector<Domain> _domains; 
    136136    std::vector<Domain> _backupDomains; 
     
    218218                u.x()*v.z()*w.y() + v.z()*w.x()*u.y() + u.z()*v.x()*w.y(); 
    219219    det = 1.0f / det; 
    220      
     220 
    221221    s1.set( v.y()*w.z() - v.z()*w.y(), v.z()*w.x() - v.x()*w.z(), v.x()*w.y() - v.y()*w.x() ); 
    222222    s1 = s1 * det;