Changeset 1970


Ignore:
Timestamp:
01/11/07 23:46:10 (17 years ago)
Author:
mattausch
Message:

working implementation of global lines

Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
3 edited

Legend:

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

    r1969 r1970  
    278278        else 
    279279                mNewTexture->BindDepth(); 
     280 
    280281        mNewTexture->EnableTextureTarget(); 
    281282         
     
    359360void GlobalLinesRenderer::InitScene(const float alpha, const float beta) 
    360361{ 
    361         cout << "here44"<<endl; 
    362362        AxisAlignedBox3 bbox =  
    363363                globalLinesRenderer->mPreprocessor->mKdTree->GetBox(); 
    364         cout << "here77"<<endl; 
     364 
    365365        const float sceneSize = Magnitude(bbox.Diagonal()); 
    366366 
     
    457457 
    458458        const float rays_per_sec = rays.size() / TimeDiff(startTime, GetTime()) * 1e-3; 
    459         cout << "cast " << rays.size() << " samples in " << layers << " layers in " << TimeDiff(startTime, GetTime()) * 1e-3 << " secs (" << rays_per_sec << " r / s)" << endl; 
     459        cout << "cast " << rays.size() << " samples in " << layers << " layers in " << TimeDiff(startTime, GetTime()) * 1e-3 << " secs (" << rays_per_sec << " rays/sec)" << endl; 
    460460        return layers; 
    461461} 
     
    505505{ 
    506506        InitDevIl(); 
    507  
     507        cout << "texwidth: " << mTexWidth << " texheight: " << mTexHeight << endl; 
    508508    glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); 
    509509        glutInitWindowPosition(50, 50); 
     
    567567        // depth and stencil. 
    568568        // Note that RT_COPY_TO_TEXTURE is required for depth textures on ATI hardware 
    569         cout << "texwidth: " << mTexWidth << " texheight: " << mTexHeight << endl; 
     569 
    570570        mNewTexture = new RenderTexture(mTexWidth, mTexHeight, true, true); 
    571571#ifdef ATI 
     
    633633                cgGLLoadProgram(sCgPassThroughProgram); 
    634634        } 
    635 cout << "here45" << endl; 
     635 
    636636        const float alpha = 1.1; 
    637637        const float beta = 0.9; 
     638 
    638639        InitScene(alpha, beta); 
    639 cout << "here4005" << endl; 
     640 
    640641        PrintGLerror("init"); 
    641642} 
     
    781782                        Vector3 clippedOldPt, clippedNewPt; 
    782783 
    783                         ClipToViewSpaceBox(oldPt, newPt, clippedOldPt, clippedNewPt);if(1) 
     784                        if (ClipToViewSpaceBox(oldPt, newPt, clippedOldPt, clippedNewPt))//;if(1) 
    784785                        { 
    785786                                //clippedOldPt = oldPt; 
     
    818819        //const AxisAlignedBox3 bbox = mPreprocessor->mViewCellsManager->GetViewSpaceBox(); 
    819820        // hack 
    820         const AxisAlignedBox3 bbox = mPreprocessor->mKdTree->GetBox(); 
    821  
    822         if ((!bbox.ComputeMinMaxT(ray, &tmin, &tmax)) || 
    823                 tmin>=tmax) 
     821        AxisAlignedBox3 bbox = mPreprocessor->mKdTree->GetBox(); 
     822 
     823        //bbox.Enlarge(1); 
     824        if (!bbox.ComputeMinMaxT(ray, &tmin, &tmax) || (tmin >= tmax)) 
    824825        { 
    825826                return false; 
    826827        } 
    827828         
    828         if (tmin >= 1.0f || tmax <=0.0f) 
     829        if (tmin >= 1.0f || tmax <= 0.0f) 
    829830                return false; 
    830831 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r1969 r1970  
    13731373                                                                sampleReverse); 
    13741374                                                                 
    1375 cout << "here2" << endl; 
    13761375        mGlobalLinesRenderer->InitGl(); 
    1377 cout << "here8" << endl; 
    1378         //return mGlobalLinesRenderer; 
    1379 } 
    1380  
    1381 } 
     1376} 
     1377 
     1378} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp

    r1969 r1970  
    272272         
    273273        preprocessor->PrepareHwGlobalLines(); 
    274         //globalLinesRenderer = new GlobalLinesRenderer(preprocessor); 
    275         //globalLinesRenderer->InitGl(); 
    276         cout << "here22" << endl; 
     274 
    277275        globalLinesRenderer->Run(); 
    278276 
Note: See TracChangeset for help on using the changeset viewer.