Changeset 2795 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.cpp
- Timestamp:
- 06/22/08 05:24:22 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.cpp
r2792 r2795 13 13 #include "Geometry.h" 14 14 #include "RenderState.h" 15 #include "gzstream.h" 15 16 16 17 … … 66 67 static int sClipPlaneAABBVertexIndices[12]; 67 68 69 70 #define ALIGN_INDICES 68 71 69 72 BvhNode::BvhNode(BvhNode *parent): … … 177 180 mCurrentIndicesPtr = 0; 178 181 mNumNodes = 0; 179 mMaxDepthForTestingChildren = 4; 180 mAreaRatioThreshold = 1.4f; 182 183 mMaxDepthForTestingChildren = 3; 184 //mMaxDepthForTestingChildren = 4; 185 mAreaRatioThreshold = 2.0f; 186 //mAreaRatioThreshold = 1.4f; 187 181 188 mVboId = -1; 182 189 } … … 452 459 memcpy(mIndices + numNodes * sNumIndicesPerBox, 453 460 mTestIndices + node->mIndicesPtr, 454 #if 0 //ALIGN_INDICES455 ((numIndices / 32) * 32 + 32) * sizeof(unsigned int));456 #else457 461 numIndices * sizeof(unsigned int)); 458 #endif 462 459 463 numNodes += node->mNumTestNodes; 460 464 } … … 485 489 486 490 487 #define ALIGN_INDICES 1488 489 491 void Bvh::CreateIndices() 490 492 { … … 502 504 { 503 505 int offset = (*lit)->mNumTestNodes * sNumIndicesPerBox; 504 #if ALIGN_INDICES506 #ifdef ALIGN_INDICES 505 507 // align with 32 506 508 offset = (offset / 32) * 32 + 32; … … 547 549 548 550 // align with 32 549 #if ALIGN_INDICES551 #ifdef ALIGN_INDICES 550 552 const int offset = (numIndices / 32) * 32 + 32; 551 553 #else … … 654 656 BvhNode *node = *lit; 655 657 656 // recreate list of nodes that will be tested as a proxy ...658 // recreate list of nodes that will be queried as a proxy 657 659 if (CreateNodeRenderList(node)) 658 660 ++ success;
Note: See TracChangeset
for help on using the changeset viewer.