Ignore:
Timestamp:
06/18/06 03:47:06 (18 years ago)
Author:
mattausch
Message:

worked on view-object space partition
fixed some loading bugs
fixeds some exporting bugs using line segments
enabling other methods for view space sampling in ViewCellsManager? OBJECT_DIRECTION_BASED_DISTRIBUTION)
added class interface for a sampling strategy

File:
1 edited

Legend:

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

    r1006 r1020  
    4242  stream<<"}"<<endl; 
    4343   
    44   stream<<"IndexedLineSet { coordIndex=\""<<endl; 
     44  stream<<"geometry IndexedLineSet { coordIndex [" << endl; 
    4545 
    4646  int index = 0; 
     
    5151  } 
    5252   
    53   stream << "}"<<endl; 
    54    
    55   stream<<"<Coordinate  point=\""<<endl; 
     53  stream << "]"<<endl; 
     54   
     55  stream << "coord Coordinate { point [" << endl; 
    5656   
    5757  ri = rays.begin(); 
     
    7777          stream << b.x << " " << b.y << " " << b.z << " ,\n"; 
    7878  } 
    79    
     79  stream << "]" << endl; 
    8080  stream << "}" << endl; 
    8181  stream << "}" << endl; 
    8282  stream << "}" << endl; 
    83   stream << "}" << endl; 
     83  //stream << "}" << endl; 
    8484 
    8585  return true; 
     
    9999  stream << "}" << endl; // end appearance 
    100100   
    101   stream << "IndexedLineSet { coordIndex=\"" << endl; 
     101  stream << "geometry IndexedLineSet { coordIndex [" << endl; 
    102102 
    103103  int index = 0; 
     
    108108  } 
    109109   
    110   stream << "}" << endl; 
    111    
    112   stream << "Coordinate  point= {" << endl; 
     110  stream << "]" << endl; 
     111   
     112  stream << "coord Coordinate { point [" << endl; 
    113113   
    114114  ri = rays.begin(); 
     
    121121        stream<<b.x<<" "<<b.y<<" "<<b.z<<" ,\n"; 
    122122  } 
    123    
     123  stream << "]" << endl; 
    124124  stream << "}" << endl; 
    125125  stream << "}" << endl; 
    126126  stream << "}" << endl; 
    127   stream << "}" << endl; 
     127  //stream << "}" << endl; 
    128128         
    129129  return true; 
     
    215215        tStack.push(pair<BspNode *, BspNodeGeometry *>(tree.GetRoot(), geom)); 
    216216 
    217         if (maxPvs > 0) 
     217        if (maxPvs) 
    218218                mUseForcedMaterial = true; 
    219  
     219         
    220220        while (!tStack.empty())  
    221221        { 
     
    242242                else 
    243243                { 
    244                         if (maxPvs > 0) 
     244                        if (maxPvs) 
    245245                        { 
    246246                                BspLeaf *leaf = dynamic_cast<BspLeaf *>(node); 
    247247 
    248248                                mForcedMaterial.mDiffuseColor.b = 1.0f; 
    249                                 float importance = (float)leaf->GetViewCell()->GetPvs().GetSize() / (float)maxPvs; 
     249                                const float importance = (float)leaf->GetViewCell()->GetPvs().GetSize() / (float)maxPvs; 
    250250 
    251251                                mForcedMaterial.mDiffuseColor.r = importance; 
     
    599599        //Mesh *mesh = new Mesh; 
    600600   
    601         if (maxPvs > 0) 
     601        if (maxPvs) 
    602602                mUseForcedMaterial = true; 
    603603 
     
    632632                        mesh->AddFace(new Face(index + 2, index + 3, index + 7, index + 6) ); 
    633633 
    634                         if (maxPvs > 0) 
     634                        if (maxPvs) 
    635635                        { 
    636636                                VspKdLeaf *leaf = dynamic_cast<VspKdLeaf *>(node); 
Note: See TracChangeset for help on using the changeset viewer.