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/osgShadow/LightSpacePerspectiveShadowMap.cpp

    r12292 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 * 
     
    3636 
    3737//////////////////////////////////////////////////////////////////////////////// 
    38 // There are two slightly differing implemetations available on  
     38// There are two slightly differing implemetations available on 
    3939// "Light Space Perspective Shadow Maps" page. One from 2004 and other from 2006. 
    4040// Our implementation is written in two versions based on these solutions. 
     
    4848// This code is copyright Vienna University of Technology, 2004. 
    4949// 
    50 // Please feel FREE to COPY and USE the code to include it in your own work,  
     50// Please feel FREE to COPY and USE the code to include it in your own work, 
    5151// provided you include this copyright notice. 
    5252// This program is distributed in the hope that it will be useful, 
    5353// but WITHOUT ANY WARRANTY; without even the implied warranty of 
    54 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
    55 //  
     54// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
     55// 
    5656// Authors Code: 
    5757// Daniel Scherzer (scherzer@cg.tuwien.ac.at) 
    58 //  
    59 // Authors Paper:  
     58// 
     59// Authors Paper: 
    6060// Michael Wimmer (wimmer@cg.tuwien.ac.at) 
    6161// Daniel Scherzer (scherzer@cg.tuwien.ac.at) 
     
    8888    //temporal light View 
    8989    //look from position(eyePos) 
    90     //into direction(lightDir)  
     90    //into direction(lightDir) 
    9191    //with up vector(up) 
    9292    look(lightView,eyePos,lightDir,up); 
     
    9595    transformVecPoint(B,lightView); 
    9696 
    97     //calculate the cubic hull (an AABB)  
     97    //calculate the cubic hull (an AABB) 
    9898    //of the light space extents of the intersection body B 
    9999    //and save the two extreme points min and max 
     
    103103        //use the formulas of the paper to get n (and f) 
    104104        const double factor = 1.0/sinGamma; 
    105         const double z_n = factor*nearDist; //often 1  
     105        const double z_n = factor*nearDist; //often 1 
    106106        const double d = absDouble(max[1]-min[1]); //perspective transform depth //light space y extents 
    107107        const double z_f = z_n + d*sinGamma; 
     
    119119        //with the two parameters n(near) and f(far) in y direction 
    120120        copyMatrix(lispMtx,IDENTITY);    // a = (f+n)/(f-n); b = -2*f*n/(f-n); 
    121         lispMtx[ 5] = (f+n)/(f-n);        // [ 1 0 0 0]  
     121        lispMtx[ 5] = (f+n)/(f-n);        // [ 1 0 0 0] 
    122122        lispMtx[13] = -2*f*n/(f-n);        // [ 0 a 0 b] 
    123123        lispMtx[ 7] = 1;                // [ 0 0 1 0] 
     
    126126        //temporal arrangement for the transformation of the points to post-perspective space 
    127127        mult(lightProjection,lispMtx,lightView); // ligthProjection = lispMtx*lightView 
    128          
     128 
    129129        //transform the light volume points from world into the distorted light space 
    130130        transformVecPoint(&Bcopy,lightProjection); 
    131131 
    132         //calculate the cubic hull (an AABB)  
     132        //calculate the cubic hull (an AABB) 
    133133        //of the light space extents of the intersection body B 
    134134        //and save the two extreme points min and max 
     
    184184    const double sinGamma = sqrt(1.0- dotProd*dotProd); 
    185185    const double factor = 1.0/sinGamma; 
    186     const double z_n = factor*nearDist; //often 1  
     186    const double z_n = factor*nearDist; //often 1 
    187187    //use the formulas of the paper to get n (and f) 
    188188    const double d = fabs( bb._max[1]-bb._min[1]); //perspective transform depth //light space y extents 
     
    194194#if PRINT_COMPUTED_N_OPT 
    195195    std::cout 
    196        << " N=" << std::setw(8) << n  
     196       << " N=" << std::setw(8) << n 
    197197       << " n=" << std::setw(8) << z_n 
    198198       << " f=" << std::setw(8) << z_f 
    199        << "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"  
     199       << "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" 
    200200       << std::flush; 
    201201#endif 
     
    216216#if 0 
    217217    { 
    218         osg::Matrix mvp = _camera->getViewMatrix() *  
     218        osg::Matrix mvp = _camera->getViewMatrix() * 
    219219                      _camera->getProjectionMatrix(); 
    220220 
     
    232232    cameraShadow->setProjectionMatrix 
    233233        ( lightViewToWorld * lightView * lispProjection * fitToUnitFrustum ); 
    234      
     234 
    235235 
    236236#if 0 // DOUBLE CHECK! 
    237237    bb = computeScenePolytopeBounds 
    238238        ( cameraShadow->getViewMatrix() * cameraShadow->getProjectionMatrix() ); 
    239      
     239 
    240240    if( !osg::equivalent( 0.f, (bb._min - osg::Vec3d(-1,-1,-1)).length2() ) || 
    241241        !osg::equivalent( 0.f, (bb._max - osg::Vec3d( 1, 1, 1)).length2() ) ) 
     
    263263 
    264264void LightSpacePerspectiveShadowMapAlgorithm::operator() 
    265     ( const osgShadow::ConvexPolyhedron* hullShadowedView,  
    266       const osg::Camera* cameraMain,  
     265    ( const osgShadow::ConvexPolyhedron* hullShadowedView, 
     266      const osg::Camera* cameraMain, 
    267267      osg::Camera* cameraShadow ) const 
    268268{ 
    269269 
    270270    // all computations are done in post projection light space 
    271     // which means we are in left handed coordinate system  
    272     osg::Matrix mvpLight =  
     271    // which means we are in left handed coordinate system 
     272    osg::Matrix mvpLight = 
    273273        cameraShadow->getViewMatrix() * cameraShadow->getProjectionMatrix(); 
    274274 
     
    298298    // as all computations are performed in post projection light space. 
    299299    // Frankly, I have my doubts if their error analysis and methodology still works 
    300     // in non directional lights post projective space. But since I can't prove it doesn't,  
    301     // I assume it does ;-). So I made an effort to modify their original directional algo  
     300    // in non directional lights post projective space. But since I can't prove it doesn't, 
     301    // I assume it does ;-). So I made an effort to modify their original directional algo 
    302302    // to work in true light post perspective space and compute all params in this space. 
    303     // And here is a snag. Although shadowed hull fits completely into light space,  
    304     // camera position may not, and after projective transform it may land outside  
    305     // light frustum and even on/or below infinity plane. I need camera pos to compute  
     303    // And here is a snag. Although shadowed hull fits completely into light space, 
     304    // camera position may not, and after projective transform it may land outside 
     305    // light frustum and even on/or below infinity plane. I need camera pos to compute 
    306306    // minimal distance to shadowed hull. If its not right rest of the computation may 
    307     // be completely off. So in the end this approach is not singulartity free.  
    308     // I guess this problem is solvable in other way but "this other  
    309     // way" looks like a topic for other scientific paper and I am definitely not that  
    310     // ambitious ;-). So for the time being I simply try to discover when this happens and  
    311     // apply workaround, I found works. This workaround may mean that adjusted projection  
    312     // may not be optimal in original LisPSM Lmax norm sense. But as I wrote above,  
    313     // I doubt they are optimal when Light is not directional, anyway.  
    314  
    315     // Seems that most nasty case when algorithm fails is when cam pos is  
    316     // below light frustum near plane but above infinity plane - when this occurs  
    317     // shadows simply disappear. My workaround is to find this case by  
     307    // be completely off. So in the end this approach is not singulartity free. 
     308    // I guess this problem is solvable in other way but "this other 
     309    // way" looks like a topic for other scientific paper and I am definitely not that 
     310    // ambitious ;-). So for the time being I simply try to discover when this happens and 
     311    // apply workaround, I found works. This workaround may mean that adjusted projection 
     312    // may not be optimal in original LisPSM Lmax norm sense. But as I wrote above, 
     313    // I doubt they are optimal when Light is not directional, anyway. 
     314 
     315    // Seems that most nasty case when algorithm fails is when cam pos is 
     316    // below light frustum near plane but above infinity plane - when this occurs 
     317    // shadows simply disappear. My workaround is to find this case by 
    318318    // checking light postperspective transform camera z ( negative value means this ) 
    319319    // and make sure min distance to shadow hull is clamped to positive value. 
     
    327327        // OSG_NOTICE<<"LightSpacePerspectiveShadowMapAlgorithm::operator() adjusting eye"<<std::endl; 
    328328#endif 
    329          
     329 
    330330    } 
    331331#endif 
     
    341341 
    342342    // Beware!!! Dirty Tricks: 
    343     // Light direction in light post proj space is actually (0,0,1)  
    344     // But since we want to pass it to std OpenGL right handed coordinate  
    345     // makeLookAt function we compensate the effects by also using right  
    346     // handed view forward vector (ie 0,0,-1) instead.  
    347     // So in the end we get left handed makeLookAt behaviour (D3D like)...     
    348     // I agree this method is bizarre. But it works so I left it as is.   
    349     // It sort of came out by itself through trial and error.  
    350     // I later understoood why it works.  
     343    // Light direction in light post proj space is actually (0,0,1) 
     344    // But since we want to pass it to std OpenGL right handed coordinate 
     345    // makeLookAt function we compensate the effects by also using right 
     346    // handed view forward vector (ie 0,0,-1) instead. 
     347    // So in the end we get left handed makeLookAt behaviour (D3D like)... 
     348    // I agree this method is bizarre. But it works so I left it as is. 
     349    // It sort of came out by itself through trial and error. 
     350    // I later understoood why it works. 
    351351 
    352352    osg::Vec3 lightDir(0,0,-1); 
     
    368368    const double z_n = factor*nearDist; 
    369369    //perspective transform depth light space y extents 
    370     const double d = fabs( bb._max[1]-bb._min[1]);  
     370    const double d = fabs( bb._max[1]-bb._min[1]); 
    371371    const double z_f = z_n + d*sinGamma; 
    372372    double n = (z_n+sqrt(z_f*z_n))/sinGamma; 
     
    383383    const double f = n+d; 
    384384    osg::Vec3d pos = eye-up*(n-nearDist); 
    385     //pos = eye;   
     385    //pos = eye; 
    386386    lightView.makeLookAt( pos, pos + lightDir, up ); 
    387387 
     
    409409 
    410410// Adapted Modified version of LispSM authors implementation from 2006 
    411 // Nopt formula differs from the paper. I adopted original authors class to  
     411// Nopt formula differs from the paper. I adopted original authors class to 
    412412// use with OSG 
    413413 
     
    424424    typedef std::vector<osg::Vec3d> Vertices; 
    425425 
    426     void setProjectionMatrix( const osg::Matrix & projectionMatrix )  
     426    void setProjectionMatrix( const osg::Matrix & projectionMatrix ) 
    427427        { _projectionMatrix = projectionMatrix; } 
    428428 
    429     void setViewMatrix( const osg::Matrix & viewMatrix )  
     429    void setViewMatrix( const osg::Matrix & viewMatrix ) 
    430430        { _viewMatrix = viewMatrix; } 
    431431 
     
    436436        { return _hull; } 
    437437 
    438     const osg::Matrix & getProjectionMatrix( void ) const  
     438    const osg::Matrix & getProjectionMatrix( void ) const 
    439439        { return _projectionMatrix; } 
    440440 
    441     const osg::Matrix & getViewMatrix( void ) const  
     441    const osg::Matrix & getViewMatrix( void ) const 
    442442        { return _viewMatrix; } 
    443      
    444     bool getUseLiSPSM() const     
     443 
     444    bool getUseLiSPSM() const 
    445445        { return _useLiSPSM; } 
    446446 
    447     void setUseLiSPSM( bool use )  
     447    void setUseLiSPSM( bool use ) 
    448448        { _useLiSPSM = use; } 
    449449 
     
    451451        { return _useFormula; } 
    452452 
    453     void setUseFormula( bool use )  
     453    void setUseFormula( bool use ) 
    454454        { _useFormula = use; } 
    455455 
     
    457457        { return _useOldFormula; } 
    458458 
    459     void setUseOldFormula( bool use )  
     459    void setUseOldFormula( bool use ) 
    460460        { _useOldFormula = use; } 
    461461 
    462     void setN(const double& n )     
     462    void setN(const double& n ) 
    463463        { _N = n; } 
    464464 
    465     const double getN() const     
    466         { return _N; }  
     465    const double getN() const 
     466        { return _N; } 
    467467 
    468468    //for old LispSM formula from paper 
     
    470470        { return _nearDist; } 
    471471 
    472     void setNearDist( const double & nearDist )  
     472    void setNearDist( const double & nearDist ) 
    473473        { _nearDist = nearDist; } 
    474474 
     
    476476        { return _farDist; } 
    477477 
    478     void setFarDist( const double & farDist )  
     478    void setFarDist( const double & farDist ) 
    479479        { _farDist = farDist; } 
    480480 
    481     const osg::Vec3d & getEyeDir() const  
     481    const osg::Vec3d & getEyeDir() const 
    482482        { return _eyeDir; } 
    483483 
    484     const osg::Vec3d & getLightDir() const  
     484    const osg::Vec3d & getLightDir() const 
    485485        { return _lightDir; } 
    486486 
    487     void setEyeDir( const osg::Vec3d eyeDir )  
     487    void setEyeDir( const osg::Vec3d eyeDir ) 
    488488        { _eyeDir = eyeDir; } 
    489489 
    490     void setLightDir( const osg::Vec3d lightDir )  
     490    void setLightDir( const osg::Vec3d lightDir ) 
    491491        { _lightDir = lightDir; } 
    492492 
     
    512512 
    513513    osg::Vec3d  getNearCameraPointE() const; 
    514      
     514 
    515515    osg::Vec3d  getZ0_ls 
    516516                    (const osg::Matrix& lightSpace, const osg::Vec3d& e, const double& b_lsZmax, const osg::Vec3d& eyeDir) const; 
     
    539539} 
    540540 
    541 osg::Vec3d LispSM::getNearCameraPointE( ) const  
     541osg::Vec3d LispSM::getNearCameraPointE( ) const 
    542542{ 
    543543    const osg::Matrix& eyeView = getViewMatrix(); 
     
    566566//and on the near plane of the C frustum (the plane z = bZmax) and on the line x = e.x 
    567567osg::Vec3d LispSM::getZ0_ls 
    568     (const osg::Matrix& lightSpace, const osg::Vec3d& e, const double& b_lsZmax, const osg::Vec3d& eyeDir) const  
    569 { 
    570     //to calculate the parallel plane to the near plane through e we  
     568    (const osg::Matrix& lightSpace, const osg::Vec3d& e, const double& b_lsZmax, const osg::Vec3d& eyeDir) const 
     569{ 
     570    //to calculate the parallel plane to the near plane through e we 
    571571    //calculate the plane A with the three points 
    572572    osg::Plane A(eyeDir,e); 
     
    576576    const osg::Vec3d e_ls = e * lightSpace; 
    577577 
    578     //z_0 has the x coordinate of e, the z coord of B_lsZmax  
     578    //z_0 has the x coordinate of e, the z coord of B_lsZmax 
    579579    //and the y coord of the plane A and plane (z==B_lsZmax) intersection 
    580580#if 1 
    581581    osg::Vec3d v = osg::Vec3d(e_ls.x(),0,b_lsZmax); 
    582582 
    583     // x & z are given. We compute y from equations:  
     583    // x & z are given. We compute y from equations: 
    584584    // A.distance( x,y,z ) == 0 
    585585    // A.distance( x,y,z ) == A.distance( x,0,z ) + A.normal.y * y 
     
    598598} 
    599599 
    600 double LispSM::calcNoptGeneral(const osg::Matrix lightSpace, const osg::BoundingBox& B_ls) const  
     600double LispSM::calcNoptGeneral(const osg::Matrix lightSpace, const osg::BoundingBox& B_ls) const 
    601601{ 
    602602    const osg::Matrix& eyeView = getViewMatrix(); 
     
    605605    const osg::Vec3d z0_ls = getZ0_ls(lightSpace, _E,B_ls.zMax(),getEyeDir()); 
    606606    const osg::Vec3d z1_ls = osg::Vec3d(z0_ls.x(),z0_ls.y(),B_ls.zMin()); 
    607      
     607 
    608608    //to world 
    609609    const osg::Vec4d z0_ws = osg::Vec4d( z0_ls, 1 ) * invLightSpace; 
     
    620620 
    621621        // solve camera pos singularity in light space problem brutally: 
    622         // if extreme points of B projected to Light space extend beyond  
     622        // if extreme points of B projected to Light space extend beyond 
    623623        // camera frustum simply use B extents in camera frustum 
    624624 
    625         // Its not optimal selection but ceratainly better than negative N        
     625        // Its not optimal selection but ceratainly better than negative N 
    626626        osg::BoundingBox bb = _hull.computeBoundingBox( eyeView ); 
    627627        z0 = -bb.zMax(); 
    628         if( z0 <= 0 )  
     628        if( z0 <= 0 ) 
    629629            z0 = 0.1; 
    630630 
    631631        z1 = -bb.zMin(); 
    632         if( z1 <= z0 )  
     632        if( z1 <= z0 ) 
    633633            z1 = z0 + 0.1; 
    634634    } 
     
    639639#if PRINT_COMPUTED_N_OPT 
    640640    std::cout 
    641        << " N=" << std::setw(8) << N  
     641       << " N=" << std::setw(8) << N 
    642642       << " n=" << std::setw(8) << z0 
    643643       << " f=" << std::setw(8) << z1 
    644        << "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"  
     644       << "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" 
    645645       << std::flush; 
    646646#endif 
     
    648648} 
    649649 
    650 double LispSM::calcNoptOld( const double gamma_ ) const  
     650double LispSM::calcNoptOld( const double gamma_ ) const 
    651651{ 
    652652    const double& n = getNearDist(); 
     
    665665#if PRINT_COMPUTED_N_OPT 
    666666    std::cout 
    667        << " N=" << std::setw(8) << N  
     667       << " N=" << std::setw(8) << N 
    668668       << " n=" << std::setw(8) << n 
    669669       << " f=" << std::setw(8) << f 
    670        << "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"  
     670       << "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" 
    671671       << std::flush; 
    672672#endif 
     
    674674} 
    675675 
    676 double LispSM::getN(const osg::Matrix lightSpace, const osg::BoundingBox& B_ls) const  
     676double LispSM::getN(const osg::Matrix lightSpace, const osg::BoundingBox& B_ls) const 
    677677{ 
    678678    if( getUseFormula()) { 
     
    687687} 
    688688//this is the algorithm discussed in the article 
    689 osg::Matrix LispSM::getLispSmMtx( const osg::Matrix& lightSpace ) const  
     689osg::Matrix LispSM::getLispSmMtx( const osg::Matrix& lightSpace ) const 
    690690{ 
    691691    const osg::BoundingBox B_ls = _hull.computeBoundingBox( lightSpace ); 
     
    695695    //get the coordinates of the near camera point in light space 
    696696    const osg::Vec3d e_ls = _E * lightSpace; 
    697     //c start has the x and y coordinate of e, the z coord of B.min()  
     697    //c start has the x and y coordinate of e, the z coord of B.min() 
    698698    const osg::Vec3d Cstart_lp(e_ls.x(),e_ls.y(),B_ls.zMax()); 
    699699 
     
    713713 
    714714    //the lispsm perspective transformation 
    715      
     715 
    716716    //here done with a standard frustum call that maps P onto the unit cube with 
    717717    //corner points [-1,-1,-1] and [1,1,1]. 
     
    751751    } 
    752752 
    753     osg::Vec3d projDir( osg::Vec3( b_lp[0], b_lp[1], b_lp[2] ) / b_lp[3] -  
     753    osg::Vec3d projDir( osg::Vec3( b_lp[0], b_lp[1], b_lp[2] ) / b_lp[3] - 
    754754                        osg::Vec3( e_lp[0], e_lp[1], e_lp[2] ) / e_lp[3] ); 
    755755 
     
    762762 
    763763void LispSM::updateLightMtx 
    764     ( osg::Matrix& lightView, osg::Matrix& lightProj ) const  
     764    ( osg::Matrix& lightView, osg::Matrix& lightProj ) const 
    765765{ 
    766766    //calculate standard light space for spot or directional lights 
    767     //this routine returns two matrices:  
     767    //this routine returns two matrices: 
    768768    //lightview contains the rotated translated frame 
    769769    //lightproj contains in the case of a spot light the spot light perspective transformation 
     
    791791    osg::Matrix L = lightView * lightProj; 
    792792 
    793     osg::Vec3d projViewDir = getProjViewDir_ls(L);  
     793    osg::Vec3d projViewDir = getProjViewDir_ls(L); 
    794794 
    795795    if( getUseLiSPSM() /* && projViewDir.z() < 0*/ ) { 
     
    798798        //calculate a frame matrix that uses the projViewDir[light-space] as up vector 
    799799        //look(from position, into the direction of the projected direction, with unchanged up-vector) 
    800         lightProj = lightProj *  
     800        lightProj = lightProj * 
    801801            osg::Matrix::lookAt( osg::Vec3d(0,0,0), projViewDir, osg::Vec3d(0,1,0) ); 
    802802 
     
    832832void LightSpacePerspectiveShadowMapAlgorithm::operator() 
    833833    ( const osgShadow::ConvexPolyhedron* hullShadowedView, 
    834       const osg::Camera* cameraMain,  
     834      const osg::Camera* cameraMain, 
    835835      osg::Camera* cameraShadow ) const 
    836836{ 
     
    844844 
    845845#else 
    846      
     846 
    847847    osg::Vec3d lightDir = osg::Matrix::transform3x3( cameraShadow->getViewMatrix(), osg::Vec3d( 0.0, 0.0, -1.0 ) ); 
    848848    osg::Vec3d eyeDir = osg::Matrix::transform3x3( cameraMain->getViewMatrix(), osg::Vec3d( 0.0, 0.0, -1.0 ) ); 
     
    860860    if( proj.getOrtho( l,r,b,t,n,f ) ) 
    861861    { 
    862         osg::Vec3d camPosInLightSpace =  
    863             osg::Vec3d( 0, 0, 0 ) *  
    864             osg::Matrix::inverse( cameraMain->getViewMatrix() ) *  
     862        osg::Vec3d camPosInLightSpace = 
     863            osg::Vec3d( 0, 0, 0 ) * 
     864            osg::Matrix::inverse( cameraMain->getViewMatrix() ) * 
    865865            cameraShadow->getViewMatrix() * 
    866866            cameraShadow->getProjectionMatrix(); 
     
    871871    lispsm->setEyeDir( eyeDir ); 
    872872 
    873     osg::BoundingBox bb =  
     873    osg::BoundingBox bb = 
    874874        hullShadowedView->computeBoundingBox( cameraMain->getViewMatrix() ); 
    875875