Ignore:
Timestamp:
07/18/05 21:22:46 (19 years ago)
Author:
bittner
Message:

bug with find neighbors fixed

Location:
trunk/VUT/GtpVisibilityPreprocessor/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/Camera.cpp

    r179 r181  
    1919 
    2020   
    21    
    22  // QImage image(mWidth, mHeight, 32); changed by matt 
     21#if QT_VERSION < 0x040000 
     22  QImage image(mWidth, mHeight, 32); 
     23#else 
    2324  QImage image(mWidth, mHeight, QImage::Format_RGB32); 
     25#endif 
    2426   
    2527  vector<Ray> rays; 
  • trunk/VUT/GtpVisibilityPreprocessor/src/KdTree.cpp

    r177 r181  
    674674  return NULL; 
    675675} 
     676 
     677int 
     678KdTree::FindNeighbors(KdNode *n, 
     679                      vector<KdNode *> &neighbors, 
     680                      bool onlyUnmailed 
     681                      ) 
     682{ 
     683  stack<KdNode *> nodeStack; 
     684   
     685  nodeStack.push(mRoot); 
     686 
     687  AxisAlignedBox3 box = GetBox(n); 
     688 
     689  while (!nodeStack.empty()) { 
     690    KdNode *node = nodeStack.top(); 
     691    nodeStack.pop(); 
     692    if (node->IsLeaf()) { 
     693      if ( node != n && (!onlyUnmailed || !node->Mailed()) )  
     694        neighbors.push_back(node); 
     695    } else { 
     696      KdInterior *interior = (KdInterior *)node; 
     697      if (interior->mPosition > box.Max(interior->mAxis)) 
     698        nodeStack.push(interior->mBack); 
     699      else 
     700        if (interior->mPosition < box.Min(interior->mAxis)) 
     701          nodeStack.push(interior->mFront); 
     702        else { 
     703          // random decision 
     704            nodeStack.push(interior->mBack); 
     705            nodeStack.push(interior->mFront); 
     706        } 
     707    } 
     708  } 
     709   
     710  return neighbors.size(); 
     711} 
  • trunk/VUT/GtpVisibilityPreprocessor/src/Makefile

    r177 r181  
    11############################################################################# 
    22# Makefile for building: preprocessor 
    3 # Generated by qmake (1.07a) (Qt 3.3.2) on: Sat Jul 16 12:10:59 2005 
     3# Generated by qmake (1.07a) (Qt 3.3.2) on: Mon Jul 18 20:55:14 2005 
    44# Project:  preprocessor.pro 
    55# Template: app 
     
    1313LEX             = flex 
    1414YACC            = byacc 
    15 CFLAGS  =       -nologo -Zm200 -W0 -MD -O2 -GX  -DUNICODE -DQT_DLL -DQT_THREAD_SUPPORT -DQT_NO_DEBUG 
    16 CXXFLAGS        =       -nologo -Zm200 -W0 -MD -O2 -GX  -DUNICODE -DQT_DLL -DQT_THREAD_SUPPORT -DQT_NO_DEBUG 
     15CFLAGS  =       -nologo -Zm200 -W0 -MDd -Zi -GX  -DUNICODE -DQT_DLL -DQT_THREAD_SUPPORT 
     16CXXFLAGS        =       -nologo -Zm200 -W0 -MDd -Zi -GX  -DUNICODE -DQT_DLL -DQT_THREAD_SUPPORT 
    1717LEXFLAGS        = 
    1818YACCFLAGS       =-d 
    1919INCPATH =        -I"..\src" -I"..\support\xerces\include" -I"..\support\zlib\include" -I"..\support\boost" -I"$(QTDIR)\include" -I"d:\gametools\svn\trunk\VUT\GtpVisibilityPreprocessor\src" -I"C:\Qt\3.3.2\mkspecs\win32-msvc" 
    2020LINK    =       link 
    21 LFLAGS  =       /NOLOGO delayimp.lib /DELAYLOAD:comdlg32.dll /DELAYLOAD:oleaut32.dll /DELAYLOAD:winmm.dll /DELAYLOAD:wsock32.dll /DELAYLOAD:winspool.dll /SUBSYSTEM:console /LIBPATH:"../support/expat/lib" /LIBPATH:"../support/xerces/lib" /LIBPATH:"$(QTDIR)\lib" 
     21LFLAGS  =       /NOLOGO /DEBUG /SUBSYSTEM:console /LIBPATH:"../support/xerces/lib" /LIBPATH:"$(QTDIR)\lib" 
    2222LIBS    =        "qt-mt332.lib" "qtmain.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "imm32.lib" "winmm.lib" "wsock32.lib" "winspool.lib" "xerces-c_2.lib" "opengl32.lib" "glu32.lib" "delayimp.lib" 
    2323MOC             =       $(QTDIR)\bin\moc.exe 
     
    167167        -$(DEL_FILE) MeshKdTree.obj 
    168168        -$(DEL_FILE) Pvs.obj 
     169        -$(DEL_FILE) preprocessor.pdb 
     170        -$(DEL_FILE) preprocessor.ilk 
     171        -$(DEL_FILE) vc*.pdb 
     172        -$(DEL_FILE) vc*.idb 
     173 
    169174 
    170175 
  • trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp

    r179 r181  
    8181 
    8282      int pvsSize = object->mKdPvs.GetSize(); 
    83        
    84     if (0 && pvsSize) { 
     83 
     84       
     85    if (pvsSize) { 
    8586                // mail all nodes from the pvs 
    8687                Intersectable::NewMail(); 
     
    102103        } 
    103104 
    104     if (pvsSize) { 
     105    if (0 && pvsSize) { 
    105106                // mail all nodes from the pvs 
    106107                Intersectable::NewMail(); 
  • trunk/VUT/GtpVisibilityPreprocessor/src/preprocessor.pro

    r177 r181  
    1313 
    1414# debuc config 
    15 CONFIG          += console warn_off thread release 
     15CONFIG          += console warn_off thread debug 
    1616 
    1717# RELEASE CONFIG 
Note: See TracChangeset for help on using the changeset viewer.