Changeset 2086


Ignore:
Timestamp:
02/05/07 13:27:05 (17 years ago)
Author:
gumbau
Message:
 
File:
1 edited

Legend:

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

    r2081 r2086  
    7171void MeshSimplifier::sortBones() 
    7272{ 
    73 <<<<<<< .mine 
    7473        VertexBuffer    *simplified_vb; 
    7574        VertexBuffer    *initial_vb; 
    76 ======= 
    77         VertexBuffer                                    *mesh_vb; 
    78         VertexBuffer                                    *copy_vb; 
    79 >>>>>>> .r2080 
    80  
    81 <<<<<<< .mine 
     75 
    8276        std::vector<VertexBoneAssignment>       *simplified_bones; 
    8377        std::vector<VertexBoneAssignment>       *initial_bones; 
    84 ======= 
    85         std::vector<VertexBoneAssignment>       *mesh_bones; 
    86         std::vector<VertexBoneAssignment>       *copy_bones; 
    87 >>>>>>> .r2080 
    88  
    89 <<<<<<< .mine 
     78 
    9079        // After simplifying, the object always is shared vertex 
    9180        // so, the bones must be placed in the GeoMesh 
    9281        simplified_bones        =       &mGeoMesh->mBones; 
    9382        simplified_vb                   =       mGeoMesh->mVertexBuffer; 
    94 ======= 
    95         // After simplifying, the object always is shared vertex 
    96         // so, the bones must be placed in the GeoMesh 
    97         mesh_bones      =       &mGeoMesh->mBones; 
    98         mesh_vb =       mGeoMesh->mVertexBuffer; 
    99 >>>>>>> .r2080 
    100  
    101 <<<<<<< .mine 
     83 
    10284        // we assume the original mesh is shared vertex 
    10385        // because before the simplification process 
     
    10587        // so, the original bones must be searched in the 
    10688        // Mesh, not in every submesh 
    107 ======= 
    108         // we assume the original mesh is shared vertex  
    109         // because before the simplification process 
    110         // the mesh becomes converted to shared vertex 
    111         // so, the original bones must be searched in the 
    112         // Mesh, not in every submesh 
    113 >>>>>>> .r2080 
    114  
    115 <<<<<<< .mine 
     89 
    11690        simplified_bones->clear(); 
    117 ======= 
    118         mesh_bones->clear(); 
    119 >>>>>>> .r2080 
    120  
    121 <<<<<<< .mine 
     91 
    12292        //    Vertex buffers. 
    12393        initial_vb      =       mInitialMesh->mVertexBuffer; 
    124 ======= 
    125         //      Vertex buffers. 
    126         copy_vb =       mInitialMesh->mVertexBuffer; 
    127 >>>>>>> .r2080 
    128  
    129 <<<<<<< .mine 
     94 
    13095        //    Bones. 
    13196        initial_bones   =       &mInitialMesh->mBones; 
    132 ======= 
    133         //      Bones. 
    134         copy_bones = &mInitialMesh->mBones; 
    135          
    136         //      If there are submesh bones. 
    137         for (int b = 0; b < copy_bones->size(); b++) 
    138         { 
    139                 VertexBoneAssignment    assign; 
    140 >>>>>>> .r2080 
    141  
    142 <<<<<<< .mine 
     97 
    14398        //  For each bone assignment. 
    14499        for (int b = 0; b < initial_bones->size(); b++) 
    145100        { 
    146101                VertexBoneAssignment    assign; 
    147 ======= 
    148                 int n   =       (*copy_bones)[b].vertexIndex; 
    149 >>>>>>> .r2080 
    150  
    151 <<<<<<< .mine 
     102 
    152103                int n   =       (*initial_bones)[b].vertexIndex; 
    153104 
     
    165116                                simplified_bones->push_back(assign); 
    166117                        } 
    167 ======= 
    168                 //      Initialize o. 
    169                  
    170                 int o=0; 
    171                 for (o=0; o<mesh_vb->mVertexCount; o++) 
    172                 { 
    173                         if (mesh_vb->mPosition[o].x == copy_vb->mPosition[n].x && 
    174                                 mesh_vb->mPosition[o].y == copy_vb->mPosition[n].y && 
    175                                 mesh_vb->mPosition[o].z == copy_vb->mPosition[n].z) 
    176                         { 
    177                                 assign.vertexIndex = o; 
    178                                 assign.boneIndex   = (*copy_bones)[b].boneIndex; 
    179                                 assign.weight      = 1.0f; 
    180                                 mesh_bones->push_back(assign); 
    181                         }                        
    182 >>>>>>> .r2080 
    183118                } 
    184119        } 
     
    234169        //mGeoMesh = sharedMesh; 
    235170 
    236         // if the initial mesh had shared vertex,  
    237         // convert the mesh to shared vertex 
    238         for (int i=0; i<mInitialMesh->mSubMeshCount; i++) 
    239         { 
    240                 if (mInitialMesh->mSubMesh[i].mSharedVertexBuffer) 
    241                 { 
    242                         Mesh *sharedMesh = mGeoMesh->toSharedVertex(); 
    243                         delete mGeoMesh; 
    244                         mGeoMesh = sharedMesh; 
    245                         break; 
    246                 } 
    247         } 
    248  
    249171        //      Sort bones. 
    250172        //sortBones(); 
     
    275197        //mGeoMesh = sharedMesh; 
    276198         
    277         // if the initial mesh had shared vertex,  
    278         // convert the mesh to shared vertex 
    279         for (int i=0; i<mInitialMesh->mSubMeshCount; i++) 
    280         { 
    281                 if (mInitialMesh->mSubMesh[i].mSharedVertexBuffer) 
    282                 { 
    283                         Mesh *sharedMesh = mGeoMesh->toSharedVertex(); 
    284                         delete mGeoMesh; 
    285                         mGeoMesh = sharedMesh; 
    286                         break; 
    287                 } 
    288         } 
    289  
    290199        //      Sort bones. 
    291200        //sortBones(); 
Note: See TracChangeset for help on using the changeset viewer.