Changeset 2897 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.cpp
- Timestamp:
- 09/03/08 01:57:45 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.cpp
r2895 r2897 77 77 mAxis(-1), 78 78 mDepth(0), 79 mLastRenderedFrame(-999),80 79 mFirst(-1), 81 80 mLast(-1), … … 91 90 mPlaneMask[i] = 0; 92 91 mPreferredPlane[i]= 0; 92 mLastRenderedFrame[i] = -1; 93 93 } 94 94 } … … 105 105 { 106 106 mVisibility[i].Reset(); 107 } 108 109 mLastRenderedFrame = -999; 107 mLastRenderedFrame[i] = -1; 108 mPlaneMask[i] = 0; 109 mPreferredPlane[i]= 0; 110 } 110 111 } 111 112 … … 179 180 void Bvh::Init() 180 181 { 181 mCamera = NULL;182 182 mRoot = NULL; 183 183 mVertices = NULL; … … 364 364 365 365 366 void Bvh::InitFrame( )366 void Bvh::InitFrame(Camera *cam) 367 367 { 368 368 // = 0011 1111 which means that at the beginning, all six planes have to frustum culled 369 369 mRoot->mPlaneMask[BvhNode::sCurrentState] = 0x3f; 370 370 371 mCamera->CalcFrustum(sFrustum);371 cam->CalcFrustum(sFrustum); 372 372 sFrustum.CalcNPVertexIndices(sClipPlaneAABBVertexIndices); 373 373 374 374 // store near plane 375 sNearPlane = Plane3( mCamera->GetDirection(), mCamera->GetPosition());375 sNearPlane = Plane3(cam->GetDirection(), cam->GetPosition()); 376 376 } 377 377
Note: See TracChangeset
for help on using the changeset viewer.