Ignore:
Timestamp:
06/09/06 01:26:46 (18 years ago)
Author:
mattausch
Message:

started viewspace-objectspace subdivision
removed memory leaks

File:
1 edited

Legend:

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

    r1004 r1006  
    99#include "Polygon3.h" 
    1010#include "VssRay.h" 
    11 #include "VspKdTree.h" 
     11//#include "VspOspTree.h" 
    1212#include "VssTree.h" 
    1313#include "VspBspTree.h" 
     
    3333  stream.close(); 
    3434} 
    35  
    36  
    37 //  bool 
    38 //  X3dExporter::ExportRays(const vector<Ray> &rays, 
    39 //                                                                                              const float length, 
    40 //                                                                                              const RgbColor &color) 
    41 //  { 
    42 //    vector<Ray>::const_iterator ri = rays.begin(); 
    43 //    stream<<"<Shape>"<<endl; 
    44 //    stream<<"<Appearance>"<<endl; 
    45 //    stream<<"<Material ambientColor=\""<<color.r<<" "<<color.g<<" "<<color.b<< 
    46 //      "\" />"<<endl; 
    47 //    stream<<"</Appearance>"<<endl; 
    48    
    49 //    stream<<"<IndexedLineSet coordIndex=\""<<endl; 
    50  
    51 //    int index = 0; 
    52 //    for (; ri != rays.end(); ri++) { 
    53 //      stream<<index<<" "<<index+1<<" -1\n"; 
    54 //      index+=2; 
    55 //    } 
    56    
    57 //    stream<<"\" >"<<endl; 
    58    
    59 //    stream<<"<Coordinate  point=\""<<endl; 
    60    
    61 //    ri = rays.begin(); 
    62 //    for (; ri != rays.end(); ri++) { 
    63 //      Vector3 a = (*ri).GetLoc(); 
    64      
    65 //      Vector3 b; 
    66 //      if (length < 0) 
    67 //        b = (*ri).GetLoc() - length*(*ri).GetDir(); 
    68 //      else 
    69 //        if ((*ri).intersections.size()==0) 
    70 //      b = (*ri).GetLoc() + length*(*ri).GetDir(); 
    71 //        else 
    72 //      b = (*ri).Extrap((*ri).intersections[0].mT); 
    73      
    74 //      stream<<a.x<<" "<<a.y<<" "<<a.z<<" ,"; 
    75 //      stream<<b.x<<" "<<b.y<<" "<<b.z<<" ,\n"; 
    76 //    } 
    77    
    78 //    stream<<"\" >"<<endl; 
    79 //    stream<<"</Coordinate>"<<endl; 
    80 //    stream<<"</IndexedLineSet>"<<endl; 
    81 //    stream<<"</Shape>"<<endl; 
    82 //    return true; 
    83 //  } 
    8435 
    8536 
     
    459410 
    460411 
     412 
    461413void X3dExporter::ExportPolygons(const PolygonContainer &polys) 
    462414{ 
     
    535487        stream << "</Shape>" << endl; 
    536488} 
     489 
    537490 
    538491bool 
     
    561514} 
    562515 
     516 
    563517bool 
    564518X3dExporter::ExportBspTree(const BspTree &tree) 
     
    584538} 
    585539 
    586 bool X3dExporter::ExportVspKdTree(const VspKdTree &tree, const int maxPvs) 
     540#if 0 
     541bool X3dExporter::ExportVspOspTree(const VspOspTree &tree, const int maxPvs) 
    587542{ 
    588543        stack<VspKdNode *> tStack; 
     
    654609        return true; 
    655610} 
    656  
     611#endif 
    657612 
    658613bool X3dExporter::ExportKdTree(const KdTree &tree) 
     
    696651  ExportMesh(mesh); 
    697652  delete mesh; 
     653 
    698654  return true; 
    699         // TODO 
    700         return true; 
    701655} 
    702656 
Note: See TracChangeset for help on using the changeset viewer.