Changeset 2911 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.cpp
- Timestamp:
- 09/07/08 13:44:28 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.cpp
r2897 r2911 65 65 66 66 static Plane3 sNearPlane; 67 static Camera::Frustum sFrustum;67 static Frustum sFrustum; 68 68 69 69 /// these values are valid for all nodes … … 364 364 365 365 366 static void CalcNPVertexIndices(const Frustum &frustum, int *indices) 367 { 368 for (int i = 0; i < 6; ++ i) 369 { 370 // n-vertex 371 indices[i * 2 + 0] = AxisAlignedBox3::GetIndexNearestVertex(frustum.mClipPlanes[i].mNormal); 372 // p-vertex 373 indices[i * 2 + 1] = AxisAlignedBox3::GetIndexFarthestVertex(frustum.mClipPlanes[i].mNormal); 374 } 375 } 376 377 366 378 void Bvh::InitFrame(Camera *cam) 367 379 { … … 370 382 371 383 cam->CalcFrustum(sFrustum); 372 sFrustum.CalcNPVertexIndices(sClipPlaneAABBVertexIndices);384 CalcNPVertexIndices(sFrustum, sClipPlaneAABBVertexIndices); 373 385 374 386 // store near plane
Note: See TracChangeset
for help on using the changeset viewer.