Changeset 2914


Ignore:
Timestamp:
09/08/08 01:01:50 (16 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Camera.cpp

    r2913 r2914  
    153153        const float aspectRatio = GetAspect(); 
    154154 
    155         const float w_near = 2.0f * tan(fov * 0.5f) * z_near; 
    156         const float h_near = w_near / aspectRatio; 
    157  
    158         const float w_far = 2.0f * tan(fov * 0.5f) * z_far; 
    159         const float h_far = w_far / aspectRatio; 
     155        const float h_near = tan(fov * 0.5f) * z_near; 
     156        const float w_near = h_near * aspectRatio; 
     157 
     158        const float h_far = tan(fov * 0.5f) * z_far; 
     159        const float w_far = h_far * aspectRatio; 
    160160 
    161161        const Vector3 fc = pos + view * z_far;  
     
    163163        Vector3 t1, t2; 
    164164 
    165         t1 = h_far * 0.5f * up; 
    166         t2 = w_far * 0.5f * right; 
     165        t1 = h_far * up; 
     166        t2 = w_far * right; 
    167167 
    168168        ftl = fc + t1 - t2; 
     
    173173        const Vector3 nc = pos + view * z_near; 
    174174         
    175         t1 = h_near * 0.5f * up; 
    176         t2 = w_near * 0.5f * right; 
     175        t1 = h_near * up; 
     176        t2 = w_near * right; 
    177177 
    178178        ntl = nc + t1 - t2; 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShadowMapping.cpp

    r2913 r2914  
    144144        VertexArray::const_iterator it, it_end = vertices.end(); 
    145145 
    146         cout << "=================" << endl; 
     146        //cout << "=================" << endl; 
    147147 
    148148        for (it = vertices.begin(); it != it_end; ++ it) 
     
    167167                        frustumPoints.push_back(newpt); 
    168168 
    169                         if (newpt.z < 220) 
    170                         cout << "ipt: " << newpt << " " << *it << endl; 
     169                        //if (newpt.z < 220) cout << "ipt: " << newpt << " " << *it << endl; 
    171170                } 
    172171        } 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp

    r2913 r2914  
    334334        /////////////////////////// 
    335335 
    336         camera = new Camera(winWidth, winHeight, 60);//fov); 
     336        camera = new Camera(winWidth, winHeight, fov); 
    337337        camera->SetNear(nearDist); 
    338338        camera->SetFar(1000); 
Note: See TracChangeset for help on using the changeset viewer.