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/osgAnimation/VertexInfluence.cpp

    r12292 r13041  
    1 /*  -*-c++-*-  
     1/*  -*-c++-*- 
    22 *  Copyright (C) 2008 Cedric Pinson <cedric.pinson@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 */ 
     
    2727{ 
    2828    _vertex2Bones.clear(); 
    29     for (BoneToVertexList::const_iterator it = _bone2Vertexes.begin(); it != _bone2Vertexes.end(); ++it)  
     29    for (BoneToVertexList::const_iterator it = _bone2Vertexes.begin(); it != _bone2Vertexes.end(); ++it) 
    3030    { 
    3131        const VertexInfluence& vi = (*it); 
    3232        int size = vi.size(); 
    33         for (int i = 0; i < size; i++)  
     33        for (int i = 0; i < size; i++) 
    3434        { 
    3535            VertexIndexWeight viw = vi[i]; 
     
    5050        for (int i = 0; i < size; i++) 
    5151            sum += bones[i].getWeight(); 
    52         if (sum < 1e-4)  
     52        if (sum < 1e-4) 
    5353        { 
    5454            OSG_WARN << "VertexInfluenceSet::buildVertex2BoneList warning the vertex " << it->first << " seems to have 0 weight, skip normalize for this vertex" << std::endl; 
    5555        } 
    56         else  
     56        else 
    5757        { 
    5858            float mult = 1.0/sum; 
     
    6868struct SortByNameAndWeight : public std::less<VertexInfluenceSet::BoneWeight> 
    6969{ 
    70     bool operator()(const VertexInfluenceSet::BoneWeight& b0,  
    71                     const VertexInfluenceSet::BoneWeight& b1) const  
     70    bool operator()(const VertexInfluenceSet::BoneWeight& b0, 
     71                    const VertexInfluenceSet::BoneWeight& b1) const 
    7272    { 
    7373        if (b0.getBoneName() < b1.getBoneName()) 
     
    8383struct SortByBoneWeightList : public std::less<VertexInfluenceSet::BoneWeightList> 
    8484{ 
    85     bool operator()(const VertexInfluenceSet::BoneWeightList& b0,  
    86                     const VertexInfluenceSet::BoneWeightList& b1) const  
     85    bool operator()(const VertexInfluenceSet::BoneWeightList& b0, 
     86                    const VertexInfluenceSet::BoneWeightList& b1) const 
    8787    { 
    8888        if (b0.size() < b1.size()) 
     
    9292 
    9393        int size = b0.size(); 
    94         for (int i = 0; i < size; i++)  
     94        for (int i = 0; i < size; i++) 
    9595        { 
    9696            bool result = SortByNameAndWeight()(b0[i], b1[i]); 
     
    106106void VertexInfluenceSet::clear() 
    107107{ 
    108     _bone2Vertexes.clear();  
     108    _bone2Vertexes.clear(); 
    109109    _uniqVertexSetToBoneSet.clear(); 
    110110} 
     
    117117    UnifyBoneGroup unifyBuffer; 
    118118 
    119     for (VertexIndexToBoneWeightMap::iterator it = _vertex2Bones.begin(); it != _vertex2Bones.end(); ++it)  
     119    for (VertexIndexToBoneWeightMap::iterator it = _vertex2Bones.begin(); it != _vertex2Bones.end(); ++it) 
    120120    { 
    121121        BoneWeightList bones = it->second; 
     
    124124        // sort the vector to have a consistent key 
    125125        std::sort(bones.begin(), bones.end(), SortByNameAndWeight()); 
    126     
     126 
    127127        // we use the vector<BoneWeight> as key to differentiate group 
    128128        UnifyBoneGroup::iterator result = unifyBuffer.find(bones); 
     
    133133 
    134134    _uniqVertexSetToBoneSet.reserve(unifyBuffer.size()); 
    135     for (UnifyBoneGroup::iterator it = unifyBuffer.begin(); it != unifyBuffer.end(); ++it)  
     135    for (UnifyBoneGroup::iterator it = unifyBuffer.begin(); it != unifyBuffer.end(); ++it) 
    136136    { 
    137137        _uniqVertexSetToBoneSet.push_back(it->second);