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/src/osg/ShadowVolumeOccluder.cpp

    r6248 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*/ 
     
    6767    { 
    6868        unsigned int i_1 = (i+1)%in.size(); // do the mod to wrap the index round back to the start. 
    69          
     69 
    7070        if (distance[i]>=0.0f) 
    7171        { 
    7272            out.push_back(in[i]); 
    73              
    74              
     73 
     74 
    7575            if (distance[i_1]<0.0f) 
    7676            { 
     
    7979                out.push_back(Point(mask,in[i].second*r+in[i_1].second*(1.0f-r))); 
    8080            } 
    81          
     81 
    8282        } 
    8383        else if (distance[i_1]>0.0f) 
     
    8888        } 
    8989    } 
    90      
     90 
    9191    return out.size(); 
    9292} 
     
    9898    PointList in; 
    9999    copyVertexListToPointList(vin,in); 
    100      
     100 
    101101    unsigned int planeMask = 0x1; 
    102102    for(Polytope::PlaneList::const_iterator itr=planeList.begin(); 
     
    191191    // take a reference to the projection matrix. 
    192192    _projectionMatrix = &P; 
    193      
     193 
    194194    // initialize the volume 
    195195    _volume = 0.0f; 
    196      
     196 
    197197 
    198198    // compute the inverse of the projection matrix. 
    199199    Matrix invP; 
    200200    invP.invert(P); 
    201      
     201 
    202202    float volumeview = cullStack.getFrustumVolume(); 
    203203 
    204      
     204 
    205205    // compute the transformation matrix which takes form local coords into clip space. 
    206206    Matrix MVP(MV*P); 
    207      
     207 
    208208    // for the occluder polygon and each of the holes do 
    209209    //     first transform occluder polygon into clipspace by multiple it by c[i] = v[i]*(MV*P) 
     
    212212    //     compute orientation of front plane, if normal.z()<0 then facing away from eye pont, so reverse the polygons, or simply invert planes. 
    213213    //     compute volume (quality) betwen front polygon in projection space and back polygon in projection space. 
    214      
    215      
     214 
     215 
    216216    const VertexList& vertices_in = occluder.getOccluder().getVertexList(); 
    217      
     217 
    218218    PointList points; 
    219      
     219 
    220220    if (clip(cullingset.getFrustum().getPlaneList(),vertices_in,points)>=3) 
    221221    { 
     
    226226        pushToFarPlane(farPoints); 
    227227        transform(farPoints,invP); 
    228          
     228 
    229229        // move the occlude points into projection space. 
    230230        transform(points,MV); 
     
    242242 
    243243        _occluderVolume.setupMask(); 
    244          
     244 
    245245        // if the front face is pointing away from the eye point flip the whole polytope. 
    246246        if (occludePlane[3]>0.0f) 
     
    248248            _occluderVolume.flip(); 
    249249        } 
    250          
     250 
    251251        _volume = computePolytopeVolume(points,farPoints)/volumeview; 
    252252 
    253          
     253 
    254254        for(ConvexPlanarOccluder::HoleList::const_iterator hitr=occluder.getHoleList().begin(); 
    255255            hitr!=occluder.getHoleList().end(); 
     
    293293                _volume -= computePolytopeVolume(points,farPoints)/volumeview; 
    294294            } 
    295              
     295 
    296296        } 
    297297