Ignore:
Timestamp:
02/21/08 18:10:24 (16 years ago)
Author:
mattausch
Message:

compiling under release internal

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp

    r2638 r2643  
    307307        GlRenderer::InitGL(); 
    308308 
     309        //glEnable(GL_FOG); 
     310        //glFogi(GL_FOG_MODE, GL_EXP); 
     311        glFogi(GL_FOG_MODE, GL_LINEAR); 
     312 
     313//      glFogf(GL_FOG_DENSITY, .2f); 
     314        glFogf(GL_FOG_START, 50.f); 
     315        glFogf(GL_FOG_END, 500.f); 
     316 
    309317        GLfloat light_ambient[] = {0.3, 0.3, 0.3, 1.0}; 
    310318    GLfloat light_diffuse[] = {0.6, 0.6, 0.6, 1.0}; 
     
    440448        int indexBufferSize = 0; 
    441449         
    442         KdNode::NewMail(); 
     450        KdNode::NewMail2(); 
    443451        //Intersectable::NewMail(); 
    444452 
     
    506514        if (viewcell)  
    507515        { 
    508 #if 1 
     516#if 0 
    509517                // copy the pvs so that it can be filtered ... 
    510518                if (PvsChanged(viewcell))  
     
    518526                                //mMutex.lock(); 
    519527                                // mSpatialFilter size is in range 0.001 - 0.1 
    520                           mViewCellsManager->ApplyFilter2(viewcell, 
    521                                                                     mUseFilter, 
    522                                                                     100.0f * mSpatialFilterSize, 
    523                                                                     //pvs, 
    524                                                                                                 mPvsCache.mPvs,          
    525                                                                     &mPvsCache.filteredBoxes); 
     528                                mViewCellsManager->ApplyFilter2(viewcell, 
     529                                        mUseFilter, 
     530                                        100.0f * mSpatialFilterSize, 
     531                                        mPvsCache.mPvs,          
     532                                        &mPvsCache.filteredBoxes); 
    526533                                //mPvsCache.mPvs = pvs; 
    527534                                //mMutex.unlock(); 
     
    535542                        // update the indices for rendering 
    536543                        PreparePvs2(mPvsCache.mPvs); 
    537                          
    538544                        emit PvsUpdated(); 
     545                        mCurrentPvsCost = mPvsCache.mPvs.EvalPvsCost(); 
    539546                } 
    540547#else 
     548         
    541549                PreparePvs2(viewcell->GetPvs()); 
    542550                emit PvsUpdated(); 
     551 
    543552#endif 
    544553 
     
    577586                        mWireFrame = false; 
    578587                } 
     588                mCurrentPvsCost = viewcell->GetPvs().EvalPvsCost(); 
    579589        }  
    580590        else  
     
    585595                RenderScene(); 
    586596        } 
     597 
     598        //cout << "vp: " << mViewPoint << " vd: " << mViewDirection << endl; 
    587599} 
    588600 
     
    794806                } 
    795807 
    796                 if (1 && mShowRays)  
     808                if (mShowRays)  
    797809                { 
    798810                        RenderRays(mViewCellsManager->mVizBuffer.GetRays(), mRayVisualizationMethod, mShowDistribution, 1); 
     
    937949        //mRenderVisibilityEstimates = true; 
    938950 
     951        mComputeGVS = false; 
    939952        mUseRandomColorPerPvsObject = false; 
    940953 
     
    980993        mShowRays = false; 
    981994 
    982         SetSceneCut(0); 
     995        SetSceneCut(1000); 
    983996        mControlWidget = new QtRendererControlWidget(NULL); 
    984997 
     
    9911004        connect(mControlWidget, SIGNAL(SetRandomViewPoint()), this,     SLOT(SetRandomViewPoint())); 
    9921005        connect(mControlWidget, SIGNAL(StoreStatistics(void)), this, SLOT(StoreStatistics(void))); 
     1006        connect(mControlWidget, SIGNAL(ComputeGVS(void)), this, SLOT(ComputeGVS(void))); 
    9931007        connect(mControlWidget, SIGNAL(LoadObject(void)), this, SLOT(LoadObject(void))); 
    9941008 
     
    12701284#if 0 
    12711285        QFont font40; font40.setPointSize(30); 
    1272         s.sprintf("PVS: %04d", mPvsSize); 
    1273         renderText(20, 40, s, font40); 
     1286        //s.sprintf("PVS: %04d", mPvsSize); 
     1287        //renderText(20, 40, s, font40); 
    12741288#endif 
    12751289         
    1276 /*      QFont font40; font40.setPointSize(30); 
    1277         s.sprintf("New triangles: %04d", 100); 
    1278         renderText(200, 40, s, font40);*/ 
     1290        //s.sprintf("RAW TRI: %07d", mViewCellsManager->GetPreprocessor()->mGenericStats); 
     1291        //renderText(290, 40, s, font40); 
     1292        //s.sprintf("PVS TRI: %07d", mViewCellsManager->GetPreprocessor()->mGenericStats2); 
     1293        //renderText(290, 70, s, font40); 
     1294 
     1295        s.sprintf("PVS TRI: %07d", (int)mCurrentPvsCost); 
     1296        renderText(290, 70, s, font40); 
     1297        //renderText(290, 70, s, font40); 
     1298 
    12791299} 
    12801300 
     
    12831303QtGlRendererWidget::SetViewCellGranularity(int number) 
    12841304{ 
    1285         if (mViewCellsManager) { 
    1286                 //      mViewCellsManager->SetMaxFilterSize(number); 
     1305        if (mViewCellsManager) 
     1306        { 
     1307                //      mViewCellsManager->SetMaxFilterSize(number); 
    12871308 
    12881309                // $$ tmp off 
     
    13011322        if (mViewCellsManager)  
    13021323                mViewCellsManager->SetMaxFilterSize(number); 
     1324 
    13031325        mPvsCache.Reset(); 
    13041326        updateGL(); 
     
    13241346                AxisAlignedBox3 box = mViewCellsManager->GetViewSpaceBox(); 
    13251347                Vector3 p = (1.0f - f) * box.Min() + f * box.Max(); 
    1326                 mSceneCutPlane.mNormal = Vector3(0,-1,0); 
     1348                mSceneCutPlane.mNormal = Vector3(0, -1, 0); 
    13271349                mSceneCutPlane.mD = -DotProd(mSceneCutPlane.mNormal, p); 
    13281350 
     
    19962018        QGroupBox *groupBox = CreateVisualizationPanel(hbox); 
    19972019        vh->addWidget(groupBox, 0, 0); 
     2020 
    19982021#if REMOVE_TEMPORARY 
    19992022        QGroupBox *groupBox2 = CreateRenderCostPanel(hbox); 
    20002023        vh->addWidget(groupBox2, 0, 0); 
    2001 #endif 
     2024         
    20022025        QGroupBox *groupBox3 = CreateRayVisualizationPanel(hbox); 
    20032026        vh->addWidget(groupBox3, 0, 0); 
     
    20052028        QGroupBox *groupBox4 = CreateTrafoPanel(hbox); 
    20062029        vh->addWidget(groupBox4, 0, 0); 
     2030#endif 
    20072031 
    20082032        ////////////////////////////////// 
    20092033 
    2010  
    2011         /*cb = new QRadiobox("Top View", vbox); 
    2012         vl->addWidget(cb); 
    2013         cb->setChecked(false); 
    2014         connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetTopView(bool))); 
    2015 */ 
    20162034 
    20172035        //vbox->resize(800,150); 
     
    21682186#endif 
    21692187 
     2188        button = new QPushButton("Compute GVS", vbox); 
     2189        vbox->layout()->addWidget(button); 
     2190        connect(button, SIGNAL(clicked()), SIGNAL(ComputeGVS())); 
     2191 
    21702192#if DYNAMIC_OBJECTS_HACK 
    21712193 
     
    22022224         
    22032225        //connect(button, SIGNAL(clicked(void)), SLOT(StoreStatistics(void))); 
    2204         //mHidingCost = 0.1f; 
    2205 ////////////////////////////////////////// 
     2226         
     2227        ////////////////////////////////////////// 
    22062228 
    22072229        label = new QLabel("Spatial Filter size"); 
Note: See TracChangeset for help on using the changeset viewer.