Ignore:
Timestamp:
06/22/08 05:24:22 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r2792 r2795  
    1313#include "Geometry.h" 
    1414#include "RenderState.h" 
     15#include "gzstream.h" 
    1516 
    1617 
     
    6667static int sClipPlaneAABBVertexIndices[12]; 
    6768 
     69 
     70#define ALIGN_INDICES 
    6871 
    6972BvhNode::BvhNode(BvhNode *parent):  
     
    177180        mCurrentIndicesPtr = 0; 
    178181        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 
    181188        mVboId = -1; 
    182189} 
     
    452459                memcpy(mIndices + numNodes * sNumIndicesPerBox,  
    453460                           mTestIndices + node->mIndicesPtr,  
    454 #if 0 //ALIGN_INDICES 
    455                            ((numIndices / 32) * 32 + 32) * sizeof(unsigned int)); 
    456 #else 
    457461                           numIndices * sizeof(unsigned int)); 
    458 #endif 
     462 
    459463                numNodes += node->mNumTestNodes; 
    460464        } 
     
    485489 
    486490 
    487 #define ALIGN_INDICES 1 
    488  
    489491void Bvh::CreateIndices() 
    490492{ 
     
    502504        { 
    503505                int offset = (*lit)->mNumTestNodes * sNumIndicesPerBox; 
    504 #if ALIGN_INDICES 
     506#ifdef ALIGN_INDICES 
    505507                // align with 32 
    506508                offset = (offset / 32) * 32 + 32;  
     
    547549 
    548550                // align with 32 
    549 #if ALIGN_INDICES 
     551#ifdef ALIGN_INDICES 
    550552                const int offset = (numIndices / 32) * 32 + 32; 
    551553#else 
     
    654656                BvhNode *node = *lit; 
    655657 
    656                 // recreate list of nodes that will be tested as a proxy ... 
     658                // recreate list of nodes that will be queried as a proxy 
    657659                if (CreateNodeRenderList(node)) 
    658660                        ++ success; 
Note: See TracChangeset for help on using the changeset viewer.