- Timestamp:
- 09/08/08 01:01:50 (16 years ago)
- 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 153 153 const float aspectRatio = GetAspect(); 154 154 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; 160 160 161 161 const Vector3 fc = pos + view * z_far; … … 163 163 Vector3 t1, t2; 164 164 165 t1 = h_far * 0.5f *up;166 t2 = w_far * 0.5f *right;165 t1 = h_far * up; 166 t2 = w_far * right; 167 167 168 168 ftl = fc + t1 - t2; … … 173 173 const Vector3 nc = pos + view * z_near; 174 174 175 t1 = h_near * 0.5f *up;176 t2 = w_near * 0.5f *right;175 t1 = h_near * up; 176 t2 = w_near * right; 177 177 178 178 ntl = nc + t1 - t2; -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShadowMapping.cpp
r2913 r2914 144 144 VertexArray::const_iterator it, it_end = vertices.end(); 145 145 146 cout << "=================" << endl;146 //cout << "=================" << endl; 147 147 148 148 for (it = vertices.begin(); it != it_end; ++ it) … … 167 167 frustumPoints.push_back(newpt); 168 168 169 if (newpt.z < 220) 170 cout << "ipt: " << newpt << " " << *it << endl; 169 //if (newpt.z < 220) cout << "ipt: " << newpt << " " << *it << endl; 171 170 } 172 171 } -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r2913 r2914 334 334 /////////////////////////// 335 335 336 camera = new Camera(winWidth, winHeight, 60);//fov);336 camera = new Camera(winWidth, winHeight, fov); 337 337 camera->SetNear(nearDist); 338 338 camera->SetFar(1000);
Note: See TracChangeset
for help on using the changeset viewer.