Ignore:
Timestamp:
12/21/07 18:33:58 (17 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
5 edited

Legend:

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

    r2571 r2572  
    325325} 
    326326         
    327 void 
    328 GlRenderer::InitGL() 
    329 { 
    330   mSphere = (GLUquadric *)gluNewQuadric(); 
    331    
    332   glMatrixMode(GL_PROJECTION); 
    333   glLoadIdentity(); 
    334    
    335   glMatrixMode(GL_MODELVIEW); 
    336   glLoadIdentity(); 
    337  
    338   glFrontFace(GL_CCW); 
    339   glCullFace(GL_BACK); 
    340  
    341   glShadeModel(GL_FLAT); 
    342   glDepthFunc(GL_LESS ); 
    343   glEnable(GL_DEPTH_TEST); 
    344   glEnable(GL_CULL_FACE); 
    345    
    346   InitExtensions(); 
    347  
    348   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); 
    349  
    350   glEnable(GL_NORMALIZE); 
    351    
    352   glClearColor(0.0f, 0.0f, 1.0f, 1.0f); 
    353    
    354   OcclusionQuery::GenQueries(mOcclusionQueries, 10); 
    355  
    356   CreateVertexArrays(); 
     327void GlRenderer::InitGL() 
     328{ 
     329        mSphere = (GLUquadric *)gluNewQuadric(); 
     330 
     331        glMatrixMode(GL_PROJECTION); 
     332        glLoadIdentity(); 
     333 
     334        glMatrixMode(GL_MODELVIEW); 
     335        glLoadIdentity(); 
     336 
     337        glFrontFace(GL_CCW); 
     338        glCullFace(GL_BACK); 
     339 
     340        glShadeModel(GL_FLAT); 
     341        glDepthFunc(GL_LESS ); 
     342        glEnable(GL_DEPTH_TEST); 
     343        glEnable(GL_CULL_FACE); 
     344 
     345        InitExtensions(); 
     346 
     347        glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); 
     348 
     349        glEnable(GL_NORMALIZE); 
     350 
     351        glClearColor(0.0f, 0.0f, 1.0f, 1.0f); 
     352 
     353        OcclusionQuery::GenQueries(mOcclusionQueries, 10); 
     354 
     355        CreateVertexArrays(); 
    357356} 
    358357 
  • GTP/trunk/Lib/Vis/Preprocessing/src/IntelRayCaster.cpp

    r2187 r2572  
    1313 
    1414 
     15FILE *fileOut = 0; 
     16bool saveRays = true; 
     17int cntSavedRaysFLUSH = 0; 
     18unsigned long int cntSavedRays = 0; 
     19const intSavedLIMIT = 1024; 
     20void 
     21InitSaving() 
     22{ 
     23  fileOut = fopen("fileRays.txt", "wb"); 
     24  if (!fileOut) { 
     25    cout << "ERROR: file fileRays.txt cannot be opened .. exiting" << endl; 
     26    exit(3); 
     27  } 
     28} 
     29void 
     30FinishSaving() 
     31{ 
     32  fclose(fileOut); 
     33} 
     34 
     35   
     36 
    1537IntelRayCaster::IntelRayCaster(const Preprocessor &preprocessor,  
    16                                                            const string externKdTree): 
     38                               const string externKdTree): 
    1739RayCaster(preprocessor) 
    1840{ 
    19         if (!InitRayCast(externKdTree)) 
    20                 cout << "warning: intel ray tracer could not be initialized!" << endl; 
     41  if (!InitRayCast(externKdTree)) 
     42    cout << "warning: intel ray tracer could not be initialized!" << endl; 
     43  if (saveRays) 
     44    InitSaving(); 
    2145} 
    2246 
     
    2448IntelRayCaster::~IntelRayCaster() 
    2549{ 
     50  if (saveRays) 
     51    FinishSaving(); 
    2652} 
    2753 
     
    2955bool IntelRayCaster::InitRayCast(const string externKdTree) 
    3056{ 
    31         cout<<"Intel ray cast file: " << externKdTree << endl; 
     57  cout<<"Intel ray cast file: " << externKdTree << endl; 
    3258         
    33         return mlrtaLoadAS(externKdTree.c_str()); 
     59  return mlrtaLoadAS(externKdTree.c_str()); 
    3460} 
    3561 
    3662 
    3763int IntelRayCaster::CastRay( 
    38                                                         const SimpleRay &simpleRay, 
    39                                                         VssRayContainer &vssRays, 
    40                                                         const AxisAlignedBox3 &box, 
    41                                                         const bool castDoubleRay, 
    42                                                         const bool pruneInvalidRays 
    43                                                         ) 
    44 { 
    45         //cout << "intel ray" << endl; 
    46         VssRay *vssRay  = NULL; 
    47         int hits = 0; 
    48         int hittriangle; 
    49         Intersection hitA(simpleRay.mOrigin), hitB(simpleRay.mOrigin); 
    50  
    51         float dist; 
    52         double normal[3]; 
    53  
    54         hittriangle = mlrtaIntersectAS( 
    55                                                                    &simpleRay.mOrigin.x, 
    56                                                                    &simpleRay.mDirection.x, 
    57                                                                    normal, 
    58                                                                    dist); 
    59          
    60         if (hittriangle != -1 ) { 
    61                 Intersectable *intersect = mPreprocessor.GetParentObject(hittriangle); 
     64                            const SimpleRay &simpleRay, 
     65                            VssRayContainer &vssRays, 
     66                            const AxisAlignedBox3 &box, 
     67                            const bool castDoubleRay, 
     68                            const bool pruneInvalidRays 
     69                            ) 
     70 
     71  //cout << "intel ray" << endl; 
     72  VssRay *vssRay  = NULL; 
     73  int hits = 0; 
     74  int hittriangle; 
     75  Intersection hitA(simpleRay.mOrigin), hitB(simpleRay.mOrigin); 
     76   
     77  float dist; 
     78  float dist1, dist2; 
     79  double normal[3]; 
     80   
     81  hittriangle = mlrtaIntersectAS( 
     82                                 &simpleRay.mOrigin.x, 
     83                                 &simpleRay.mDirection.x, 
     84                                 normal, 
     85                                 dist); 
     86  dist1 = dist; 
     87   
     88  if (hittriangle != -1 ) { 
     89    Intersectable *intersect = mPreprocessor.GetParentObject(hittriangle); 
     90     
     91    if (intersect) 
     92    { 
     93      hitA.mObject = intersect; 
     94      hitA.mNormal = Vector3(normal[0], normal[1], normal[2]); 
     95      // Get the normal of that face 
     96      //                Mesh *mesh = ((MeshInstance *)objectA)->GetMesh(); 
     97      //                normalA = mesh->GetFacePlane(mFaceParents[forward_hit_triangles[i]].mFaceIndex).mNormal; 
     98      //-rays[index+i].mDirection; // $$ temporary 
     99      hitA.mPoint = simpleRay.Extrap(dist); 
     100    } 
     101  } 
     102   
     103  if (castDoubleRay) 
     104  { 
     105    Vector3 dir = -simpleRay.mDirection; 
     106    hittriangle = mlrtaIntersectAS( 
     107                                   &simpleRay.mOrigin.x, 
     108                                   &dir.x, 
     109                                   normal, 
     110                                   dist); 
     111    dist2 = dist; 
     112 
     113    Intersectable *intersect = mPreprocessor.GetParentObject(hittriangle); 
    62114                 
    63                 if (intersect) 
    64                 { 
    65                         hitA.mObject = intersect; 
    66                         hitA.mNormal = Vector3(normal[0], normal[1], normal[2]); 
    67                         // Get the normal of that face 
    68                         //              Mesh *mesh = ((MeshInstance *)objectA)->GetMesh(); 
    69                         //              normalA = mesh->GetFacePlane(mFaceParents[forward_hit_triangles[i]].mFaceIndex).mNormal; 
    70                         //-rays[index+i].mDirection; // $$ temporary 
    71                         hitA.mPoint = simpleRay.Extrap(dist); 
    72                 } 
     115    if (intersect) 
     116    { 
     117      hitB.mObject = intersect; 
     118      hitB.mNormal = Vector3(normal[0], normal[1], normal[2]); 
     119      // Get the normal of that face 
     120      //                Mesh *mesh = ((MeshInstance *)objectB)->GetMesh(); 
     121      //                normalA = mesh->GetFacePlane(mFaceParents[forward_hit_triangles[i]].mFaceIndex).mNormal; 
     122      //-rays[index+i].mDirection; // $$ temporary 
     123      hitB.mPoint = simpleRay.Extrap(dist); 
     124    } 
     125  } 
     126 
     127  if (saveRays) {     
     128    if (castDoubleRay) 
     129        { 
     130      fprintf(fileOut, "D %d %4.7f %4.7f %4.7f %4.7f %4.7f %4.7f %d %4.7f %d %4.7f\n", 
     131              cntSavedRays, 
     132              simpleRay.mOrigin.x, 
     133              simpleRay.mOrigin.y, 
     134              simpleRay.mOrigin.z, 
     135              simpleRay.mDirection.x, 
     136              simpleRay.mDirection.y, 
     137              simpleRay.mDirection.z, 
     138              hitA.mObject ? 1 : 0, 
     139              hitA.mObject ? dist1 : 0, 
     140              hitB.mObject ? 1 : 0, 
     141              hitB.mObject ? dist2 : 0 
     142              ); 
    73143        } 
    74  
    75         if (castDoubleRay) 
    76         { 
    77                 Vector3 dir = -simpleRay.mDirection; 
    78                 hittriangle = mlrtaIntersectAS( 
    79                                                                                 &simpleRay.mOrigin.x, 
    80                                                                                 &dir.x, 
    81                                                                                 normal, 
    82                                                                                 dist); 
    83  
    84                 Intersectable *intersect = mPreprocessor.GetParentObject(hittriangle); 
    85                  
    86                 if (intersect) 
    87                 { 
    88                         hitB.mObject = intersect; 
    89                         hitB.mNormal = Vector3(normal[0], normal[1], normal[2]); 
    90                         // Get the normal of that face 
    91                         //              Mesh *mesh = ((MeshInstance *)objectB)->GetMesh(); 
    92                         //              normalA = mesh->GetFacePlane(mFaceParents[forward_hit_triangles[i]].mFaceIndex).mNormal; 
    93                         //-rays[index+i].mDirection; // $$ temporary 
    94                         hitB.mPoint = simpleRay.Extrap(dist); 
    95                 } 
    96         } 
    97  
    98         return ProcessRay( 
    99                                           simpleRay, 
    100                                           hitA, 
    101                                           hitB, 
    102                                           vssRays, 
    103                                           box, 
    104                                           castDoubleRay, 
    105                                           pruneInvalidRays 
    106                                           ); 
    107 } 
    108  
     144    else 
     145      fprintf(fileOut, "S %d %4.7f %4.7f %4.7f %4.7f %4.7f %4.7f %d %4.7f\n", 
     146              cntSavedRays, 
     147              simpleRay.mOrigin.x, 
     148              simpleRay.mOrigin.y, 
     149              simpleRay.mOrigin.z, 
     150              simpleRay.mDirection.x, 
     151              simpleRay.mDirection.y, 
     152              simpleRay.mDirection.z, 
     153              hitA.mObject ? 1 : 0, 
     154              hitA.mObject ? dist1 : 0 
     155              ); 
     156    cntSavedRays++; 
     157    cntSavedRaysFLUSH++; 
     158    if (cntSavedRaysFLUSH > intSavedLIMIT) { 
     159      fflush(fileOut); 
     160      cntSavedRaysFLUSH = 0; 
     161    } 
     162  }       
     163   
     164  return ProcessRay( 
     165                    simpleRay, 
     166                    hitA, 
     167                    hitB, 
     168                    vssRays, 
     169                    box, 
     170                    castDoubleRay, 
     171                    pruneInvalidRays 
     172                    ); 
     173} 
     174   
    109175 
    110176void IntelRayCaster::CastRays16( 
    111                                                                 SimpleRayContainer &rays, 
    112                                                                 VssRayContainer &vssRays, 
    113                                                                 const AxisAlignedBox3 &sbox, 
    114                                                                 const bool castDoubleRay, 
    115                                                                 const bool pruneInvalidRays) 
    116 { 
    117         CastRays16(rays, 0, vssRays, sbox, castDoubleRay, pruneInvalidRays); 
    118 } 
    119  
     177                                SimpleRayContainer &rays, 
     178                                VssRayContainer &vssRays, 
     179                                const AxisAlignedBox3 &sbox, 
     180                                const bool castDoubleRay, 
     181                                const bool pruneInvalidRays) 
     182{ 
     183  CastRays16(rays, 0, vssRays, sbox, castDoubleRay, pruneInvalidRays); 
     184} 
     185   
    120186void IntelRayCaster::CastRays16( 
    121                                                                 SimpleRayContainer &rays, 
    122                                                                 const int offset, 
    123                                                                 VssRayContainer &vssRays, 
    124                                                                 const AxisAlignedBox3 &sbox, 
    125                                                                 const bool castDoubleRay, 
    126                                                                 const bool pruneInvalidRays) 
    127 { 
     187                                SimpleRayContainer &rays, 
     188                                const int offset, 
     189                                VssRayContainer &vssRays, 
     190                                const AxisAlignedBox3 &sbox, 
     191                                const bool castDoubleRay, 
     192                                const bool pruneInvalidRays) 
     193{   
    128194  int i, k; 
    129195  const int num = 16; 
     
    147213  for (k=offset, i=0; i < num; i++, k++) { 
    148214#if DEBUG_RAYCAST 
    149         if (counter == 43964) { 
    150           Debug<<rays[k].mOrigin<<" "<<rays[k].mDirection<<endl; 
    151         } 
    152 #endif 
    153         mlrtaStoreRayAS16(&rays[k].mOrigin.x, 
    154                                           &rays[k].mDirection.x, 
    155                                           i); 
     215    if (counter == 43964) { 
     216      Debug<<rays[k].mOrigin<<" "<<rays[k].mDirection<<endl; 
     217    } 
     218#endif 
     219    mlrtaStoreRayAS16(&rays[k].mOrigin.x, 
     220                      &rays[k].mDirection.x, 
     221                      i); 
    156222  } 
    157223   
     
    161227   
    162228  mlrtaTraverseGroupAS16(&min.x, 
    163                                                 &max.x, 
    164                                                 forward_hit_triangles, 
    165                                                 forward_dist); 
     229                        &max.x, 
     230                        forward_hit_triangles, 
     231                        forward_dist); 
    166232   
    167233#if DEBUG_RAYCAST 
     
    170236 
    171237  if (castDoubleRay) { 
    172         for (k=offset, i=0; i < num; i++, k++)  { 
    173           Vector3 dir = -rays[k].mDirection; 
    174           mlrtaStoreRayAS16(&rays[k].mOrigin.x, 
    175                                                 &dir.x, 
    176                                                 i); 
    177         } 
     238    for (k=offset, i=0; i < num; i++, k++)  { 
     239      Vector3 dir = -rays[k].mDirection; 
     240      mlrtaStoreRayAS16(&rays[k].mOrigin.x, 
     241                        &dir.x, 
     242                        i); 
     243    } 
     244     
     245#if DEBUG_RAYCAST 
     246    Debug<<"TB\n"<<flush; 
     247#endif 
     248     
     249    mlrtaTraverseGroupAS16(&min.x, 
     250                           &max.x, 
     251                           backward_hit_triangles, 
     252                           backward_dist); 
     253  } 
    178254         
    179255#if DEBUG_RAYCAST 
    180           Debug<<"TB\n"<<flush; 
    181 #endif 
    182            
    183           mlrtaTraverseGroupAS16(&min.x, 
    184                                                          &max.x, 
    185                                                          backward_hit_triangles, 
    186                                                          backward_dist); 
    187         } 
     256  Debug<<"BBB\n"<<flush; 
     257#endif 
     258 
     259  if (saveRays) { 
     260    if (castDoubleRay) 
     261      fprintf(fileOut, "G\n"); 
     262    else 
     263      fprintf(fileOut, "H\n"); 
     264  } 
     265   
     266  for (i=0, k=offset; i < num; i++, k++)  
     267  { 
     268    Intersection hitA(rays[k].mOrigin), hitB(rays[k].mOrigin); 
     269 
     270#if DEBUG_RAYCAST 
     271    Debug<<"FH\n"<<flush; 
     272#endif 
     273 
     274    Intersectable *intersect = 
     275      mPreprocessor.GetParentObject(forward_hit_triangles[i]); 
     276 
     277    if (intersect) 
     278    { 
     279      hitA.mObject = intersect; 
     280      // Get the normal of that face 
     281      hitA.mNormal = mPreprocessor.GetParentNormal(forward_hit_triangles[i]); 
     282       
     283      //-rays[index+i].mDirection; // $$ temporary 
     284      hitA.mPoint = rays[k].Extrap(forward_dist[i]); 
     285    } 
     286     
     287#if DEBUG_RAYCAST 
     288    Debug<<"BH\n"<<flush; 
     289#endif 
     290 
     291    if (castDoubleRay)  
     292    { 
     293      Intersectable *intersect = 
     294        mPreprocessor.GetParentObject(backward_hit_triangles[i]); 
     295       
     296      if (intersect) 
     297      {  
     298        hitB.mObject = intersect; 
     299        hitB.mNormal = mPreprocessor.GetParentNormal(backward_hit_triangles[i]); 
    188300         
    189 #if DEBUG_RAYCAST 
    190         Debug<<"BBB\n"<<flush; 
    191 #endif 
    192          
    193         for (i=0, k=offset; i < num; i++, k++)  
    194         { 
    195                 Intersection hitA(rays[k].mOrigin), hitB(rays[k].mOrigin); 
    196  
    197 #if DEBUG_RAYCAST 
    198                 Debug<<"FH\n"<<flush; 
    199 #endif 
    200  
    201                 Intersectable *intersect = mPreprocessor.GetParentObject(forward_hit_triangles[i]); 
    202  
    203                 if (intersect) 
    204                 { 
    205                         hitA.mObject = intersect; 
    206                         // Get the normal of that face 
    207                         hitA.mNormal = mPreprocessor.GetParentNormal(forward_hit_triangles[i]); 
    208  
    209                         //-rays[index+i].mDirection; // $$ temporary 
    210                         hitA.mPoint = rays[k].Extrap(forward_dist[i]); 
    211                 } 
    212          
    213 #if DEBUG_RAYCAST 
    214                 Debug<<"BH\n"<<flush; 
    215 #endif 
    216  
    217                 if (castDoubleRay)  
    218                 { 
    219                         Intersectable *intersect = mPreprocessor.GetParentObject(backward_hit_triangles[i]); 
    220  
    221                         if (intersect) 
    222                         {  
    223                                 hitB.mObject = intersect; 
    224                                 hitB.mNormal = mPreprocessor.GetParentNormal(backward_hit_triangles[i]); 
    225  
    226                                 // normalB = rays[i].mDirection; // $$ temporary 
    227                                 hitB.mPoint = rays[k].Extrap(-backward_dist[i]); 
    228                         } 
    229                 } 
    230  
    231 #if DEBUG_RAYCAST 
    232                 Debug<<"PR\n"<<flush; 
     301        // normalB = rays[i].mDirection; // $$ temporary 
     302        hitB.mPoint = rays[k].Extrap(-backward_dist[i]); 
     303      } 
     304    } 
     305 
     306 
     307    if (saveRays) { 
     308      if (castDoubleRay)      
     309        fprintf(fileOut, "%d %4.7f %4.7f %4.7f %4.7f %4.7f %4.7f %d %4.7f %d %4.7f\n", 
     310                cntSavedRays, 
     311                rays[k].mOrigin.x, 
     312                rays[k].mOrigin.y, 
     313                rays[k].mOrigin.z, 
     314                rays[k].mDirection.x, 
     315                rays[k].mDirection.y, 
     316                rays[k].mDirection.z, 
     317                hitA.mObject ? 1 : 0, 
     318                hitA.mObject ? forward_dist[i] : 0, 
     319                hitB.mObject ? 1 : 0, 
     320                hitB.mObject ? -backward_dist[i] : 0 
     321                ); 
     322      else 
     323        fprintf(fileOut, "%d %4.7f %4.7f %4.7f %4.7f %4.7f %4.7f %d %4.7f\n", 
     324                cntSavedRays, 
     325                rays[k].mOrigin.x, 
     326                rays[k].mOrigin.y, 
     327                rays[k].mOrigin.z, 
     328                rays[k].mDirection.x, 
     329                rays[k].mDirection.y, 
     330                rays[k].mDirection.z, 
     331                hitA.mObject ? 1 : 0, 
     332                hitA.mObject ? forward_dist[i] : 0 
     333                ); 
     334      cntSavedRays++; 
     335      cntSavedRaysFLUSH++; 
     336    } 
     337 
     338     
     339#if DEBUG_RAYCAST 
     340    Debug<<"PR\n"<<flush; 
    233341#endif 
    234342 
    235343#if 1 
    236                 ProcessRay(rays[k], 
    237                                    hitA, 
    238                                    hitB, 
    239                                    vssRays, 
    240                                    sbox, 
    241                                    castDoubleRay, 
    242                                    pruneInvalidRays 
    243                                    ); 
    244 #endif 
    245         } 
    246  
    247 #if DEBUG_RAYCAST 
    248         Debug<<"C16F\n"<<flush; 
     344    ProcessRay(rays[k], 
     345               hitA, 
     346               hitB, 
     347               vssRays, 
     348               sbox, 
     349               castDoubleRay, 
     350               pruneInvalidRays 
     351               ); 
     352#endif 
     353  } // for 
     354 
     355  if (saveRays) { 
     356    if (cntSavedRaysFLUSH > intSavedLIMIT) { 
     357      fflush(fileOut); 
     358      cntSavedRaysFLUSH = 0; 
     359    } 
     360  } 
     361 
     362#if DEBUG_RAYCAST 
     363  Debug<<"C16F\n"<<flush; 
    249364#endif 
    250365} 
     
    256371void 
    257372IntelRayCaster::CastSimpleForwardRays( 
    258                                                                           SimpleRayContainer &rays, 
    259                                                                           const AxisAlignedBox3 &sbox 
    260                                                                           ) 
     373                                      SimpleRayContainer &rays, 
     374                                      const AxisAlignedBox3 &sbox 
     375                                      ) 
    261376{ 
    262377  int hit_triangles[16]; 
     
    272387   
    273388  for (i=0; i < packets; i++) { 
    274         for (j=0; j < 16; j++, k++) 
    275           mlrtaStoreRayAS16(&rays[k].mOrigin.x, 
    276                                                 &rays[k].mDirection.x, 
    277                                                 j); 
    278          
    279         mlrtaTraverseGroupAS16(&min.x, 
    280                                                    &max.x, 
    281                                                    hit_triangles, 
    282                                                    dist); 
    283  
    284   } 
     389    for (j=0; j < 16; j++, k++) 
     390      mlrtaStoreRayAS16(&rays[k].mOrigin.x, 
     391                        &rays[k].mDirection.x, 
     392                        j); 
     393     
     394    mlrtaTraverseGroupAS16(&min.x, 
     395                           &max.x, 
     396                           hit_triangles, 
     397                           dist);        
     398  } // for 
    285399 
    286400 
     
    288402        double normal[3]; 
    289403        hit_triangles[0] = mlrtaIntersectAS( 
    290                                                                                 &rays[k].mOrigin.x, 
    291                                                                                 &rays[k].mDirection.x, 
    292                                                                                 normal, 
    293                                                                                 dist[0]); 
     404                                            &rays[k].mOrigin.x, 
     405                                            &rays[k].mDirection.x, 
     406                                            normal, 
     407                                            dist[0]); 
    294408  } 
    295409   
     
    299413void 
    300414IntelRayCaster::CastRays( 
    301                                                 SimpleRayContainer &rays, 
    302                                                 VssRayContainer &vssRays, 
    303                                                 const AxisAlignedBox3 &sbox, 
    304                                                 const bool castDoubleRay, 
    305                                                 const bool pruneInvalidRays ) 
     415                        SimpleRayContainer &rays, 
     416                        VssRayContainer &vssRays, 
     417                        const AxisAlignedBox3 &sbox, 
     418                        const bool castDoubleRay, 
     419                        const bool pruneInvalidRays ) 
    306420{ 
    307421 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r2559 r2572  
    200200        inStream.read(reinterpret_cast<char *>(&numTriangles), sizeof(int)); 
    201201        root->mGeometry.reserve(numTriangles); 
    202         cout << "loading " << numTriangles << " triangles ("  
    203                  << numTriangles * (sizeof(TriangleIntersectable) + sizeof(TriangleIntersectable *)) / (1024 * 1024) << " MB)" << endl; 
     202        cout << "loading " << numTriangles << " triangles (" << numTriangles *  
     203                (sizeof(TriangleIntersectable) + sizeof(TriangleIntersectable *)) / 
     204                (1024 * 1024) << " MB)" << endl; 
    204205 
    205206        int i = 0; 
     207 
    206208        while (1) 
    207209        { 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp

    r2571 r2572  
    720720 
    721721        RenderInfo(); 
    722  
    723722        mFrame ++; 
    724  
    725723} 
    726724 
  • GTP/trunk/Lib/Vis/Preprocessing/src/UnigraphicsParser.cpp

    r2176 r2572  
    6969  Mesh *currentMesh = MeshManager::GetSingleton()->CreateResource(); 
    7070 
    71   while(fscanf(file,"%s",str)!=EOF)  
     71  while(fscanf(file, "%s", str)!=EOF)  
    7272  { 
    7373          switch (str[0])  
     
    118118                          vertices.push_back((*c).second); 
    119119 
    120                           fscanf(file,"%s",str); // get the vertex label 
     120                          fscanf(file, "%s", str); // get the vertex label 
    121121 
    122122                          while(str[0]!=')')  
Note: See TracChangeset for help on using the changeset viewer.