Ignore:
Timestamp:
06/09/06 08:24:19 (18 years ago)
Author:
gumbau
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoMeshSimplifier.cpp

    r985 r1007  
    139139        VMI::bLoadCamerasFromFile = GL_FALSE; 
    140140 
    141         VMI::cameraType = 1; 
     141        VMI::cameraType = 2; 
    142142        VMI::radius = 1.3; 
    143143        VMI::fov = 60.0; 
     
    169169 
    170170        //glutInit(&argc, argv); 
    171         glutInitDisplayMode(GLUT_DEPTH | GLUT_RGBA | GLUT_DOUBLE | GLUT_ALPHA); /* RGB and Alpha */ 
     171        // RGB and Alpha. 
     172        glutInitDisplayMode(GLUT_DEPTH | GLUT_RGBA | GLUT_DOUBLE | GLUT_ALPHA);  
    172173        glutInitWindowSize(VMI::width, VMI::height); 
    173174        glutInitWindowPosition(100, 100); 
     
    262263        //      Load a geometry mesh for vmi mesh. 
    263264        loadMesh(); 
     265 
     266        GetMeshSimpSequence(); 
    264267} 
    265268 
     
    287290        loadMesh(); 
    288291 
     292        GetMeshSimpSequence(); 
    289293} 
    290294 
     
    294298//      return mGeoMesh; 
    295299//} 
     300 
     301//--------------------------------------------------------------------------- 
     302//      Gets the VMI mesh simplification sequence. 
     303//--------------------------------------------------------------------------- 
     304void    ViewPointDrivenSimplifier::GetMeshSimpSequence() 
     305{ 
     306        unsigned        int j = 0; 
     307         
     308        MeshSimplificationSequence::Step        current_step; 
     309         
     310        msimpsequence   =       new MeshSimplificationSequence(); 
     311         
     312        //      Debug. 
     313        cout    <<      "GetMeshsimpSequence VMI" 
     314                                <<      endl; 
     315 
     316        //      For each simplification step. 
     317        for (unsigned   int i = 0;      i < VMI::mVMISteps.size();      i++) 
     318        { 
     319                current_step.mV0        =       VMI::mVMISteps[i].mV0; 
     320                current_step.mV1        =       VMI::mVMISteps[i].mV1; 
     321                current_step.mT0        =       VMI::mVMISteps[i].mT0; 
     322                current_step.mT1        =       VMI::mVMISteps[i].mT1; 
     323                 
     324                current_step.x  =       VMI::mVMISteps[i].x; 
     325                current_step.y  =       VMI::mVMISteps[i].y; 
     326                current_step.z  =       VMI::mVMISteps[i].z; 
     327 
     328                current_step.obligatorio        =       VMI::mVMISteps[i].obligatory; 
     329 
     330                //      For each face modificated. 
     331                while (j < VMI::mVMISteps[i].mModfaces.size()) 
     332                { 
     333                        current_step.mModfaces.push_back(VMI::mVMISteps[i].mModfaces[j]); 
     334                         
     335                        j++; 
     336                } 
     337                 
     338                //      Debug. 
     339                cout    <<      "Step " 
     340                                        <<      i 
     341                                        <<      " added." 
     342                                        <<      endl; 
     343                 
     344                msimpsequence->mSteps.push_back(current_step); 
     345        } 
     346} 
    296347 
    297348//--------------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.