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/osgAnimation/MorphGeometry

    r12139 r13041  
    1 /*  -*-c++-*-  
     1/*  -*-c++-*- 
    22 *  Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net> 
    33 * 
    4  * This library is open source and may be redistributed and/or modified under   
    5  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or  
     4 * This library is open source and may be redistributed and/or modified under 
     5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 
    66 * (at your option) any later version.  The full license is in LICENSE file 
    77 * included with this distribution, and on the openscenegraph.org website. 
    8  *  
     8 * 
    99 * This library is distributed in the hope that it will be useful, 
    1010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
     11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1212 * OpenSceneGraph Public License for more details. 
    1313*/ 
     
    2020#include <osg/Geometry> 
    2121 
    22 namespace osgAnimation  
     22namespace osgAnimation 
    2323{ 
    2424 
    2525    class OSGANIMATION_EXPORT MorphGeometry : public osg::Geometry 
    2626    { 
    27      
     27 
    2828    public: 
    29      
     29 
    3030        enum Method { 
    3131            NORMALIZED, 
    3232            RELATIVE 
    3333        }; 
    34      
     34 
    3535        class MorphTarget 
    3636        { 
     
    7272 
    7373        virtual void transformSoftwareMethod(); 
    74          
     74 
    7575        /** Set the morphing method. */ 
    7676        void setMethod(Method method) { _method = method; } 
    7777        /** Get the morphing method. */ 
    7878        inline Method getMethod() const { return _method; } 
    79          
     79 
    8080        /** Set flag for morphing normals. */ 
    8181        void setMorphNormals(bool morphNormals) { _morphNormals = morphNormals; } 
    8282        /** Get the flag for morphing normals. */ 
    8383        inline bool getMorphNormals() const { return _morphNormals; } 
    84          
     84 
    8585        /** Add a \c MorphTarget to the \c MorphGeometry. 
    8686          * If \c MorphTarget is not \c NULL and is not contained in the \c MorphGeometry 
     
    9393        */ 
    9494        virtual void addMorphTarget( osg::Geometry *morphTarget, float weight = 1.0 ) { _morphTargets.push_back(MorphTarget(morphTarget, weight)); _dirty = true; } 
    95          
     95 
    9696        void setWeight(unsigned int index, float morphWeight) 
    97         {  
    98             if (index < _morphTargets.size())  
    99             {  
     97        { 
     98            if (index < _morphTargets.size()) 
     99            { 
    100100                _morphTargets[index].setWeight(morphWeight); 
    101101                dirty(); 
     
    105105        /** Set the MorphGeometry dirty.*/ 
    106106        void dirty() { _dirty = true; } 
    107          
     107 
    108108        /** Get the list of MorphTargets.*/ 
    109109        const MorphTargetList& getMorphTargetList() const { return _morphTargets; } 
     
    111111        /** Get the list of MorphTargets. Warning if you modify this array you will have to call dirty() */ 
    112112        MorphTargetList& getMorphTargetList() { return _morphTargets; } 
    113          
     113 
    114114        /** Return the \c MorphTarget at position \c i.*/ 
    115115        inline const MorphTarget& getMorphTarget( unsigned int i ) const { return _morphTargets[i]; } 
     
    124124        Method          _method; 
    125125        MorphTargetList _morphTargets; 
    126          
     126 
    127127        std::vector<osg::Vec3> _positionSource; 
    128128        std::vector<osg::Vec3> _normalSource; 
    129          
     129 
    130130        /// Do we also morph between normals? 
    131131        bool _morphNormals; 
    132132    }; 
    133      
     133 
    134134    class OSGANIMATION_EXPORT UpdateMorph : public AnimationUpdateCallback<osg::NodeCallback> 
    135135    { 
    136136    protected: 
    137137        std::map<int, osg::ref_ptr<osgAnimation::FloatTarget> > _weightTargets; 
    138      
     138 
    139139    public: 
    140140