Changeset 2091


Ignore:
Timestamp:
02/05/07 14:33:28 (17 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/Exporter.h

    r1920 r2091  
    118118 
    119119  virtual void 
    120   ExportGeometry( 
    121         const ObjectContainer &objects,  
    122         const bool exportSingleMesh = false,  
    123         AxisAlignedBox3 *bbox = NULL); 
     120  ExportGeometry(const ObjectContainer &objects,  
     121                                 const bool exportSingleMesh = false,  
     122                                 AxisAlignedBox3 *bbox = NULL); 
    124123 
    125   virtual void 
     124  virtual void  
    126125  ExportMesh(Mesh *mesh) = 0; 
    127126 
     
    137136  void SetFilled() { mWireframe = false; } 
    138137   
    139   void SetForcedMaterial(const Material &m) { 
    140     mForcedMaterial = m; 
    141     mUseForcedMaterial = true; 
     138  void SetForcedMaterial(const Material &m)  
     139  { 
     140          mForcedMaterial = m; 
     141          mUseForcedMaterial = true; 
    142142  } 
    143   void ResetForcedMaterial() { 
    144     mUseForcedMaterial = false; 
     143 
     144  void ResetForcedMaterial()  
     145  { 
     146          mUseForcedMaterial = false; 
    145147  } 
    146148     
     
    152154  void ExportKdIntersectable(const KdIntersectable &kdObj); 
    153155 
    154   bool ExportBvHierarchy( 
    155           const BvHierarchy &bvHierarchy,  
    156           const float maxPvs,  
    157           AxisAlignedBox3 *box = NULL, 
    158           const bool exportBoundingBoxes = true); 
     156  bool ExportBvHierarchy(const BvHierarchy &bvHierarchy,  
     157                                                 const float maxPvs,  
     158                                                 AxisAlignedBox3 *box = NULL, 
     159                                                 const bool exportBoundingBoxes = true); 
    159160 
    160161  virtual void ExportMeshInstance(MeshInstance *mi); 
    161162 
    162   virtual void 
    163   ExportTransformedMeshInstance(TransformedMeshInstance *mi); 
     163  virtual void ExportTransformedMeshInstance(TransformedMeshInstance *mi); 
    164164 
    165   virtual void ExportPolygon(Polygon3 *poly) = 0; 
     165  virtual void  
     166  ExportPolygon(Polygon3 *poly) = 0; 
     167 
     168 
     169  /////////////////////////// 
    166170 
    167171  bool mClampToBox; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/KdTree.cpp

    r2066 r2091  
    13801380 
    13811381        // sort objects by their id 
    1382         std::stable_sort(objects.begin(), objects.end(), ilt); 
     1382        sort(objects.begin(), objects.end(), ilt); 
    13831383 
    13841384        mBox.Initialize(); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r2073 r2091  
    65916591        /////////////// 
    65926592                //-- export bounding boxes 
    6593                 //-- The bounding boxes are used to identify  
    6594                 //-- the objects in the rendering engine 
    6595                 mHierarchyManager->ExportBoundingBoxes(stream, objects); 
     6593                //-- we need the boxes to identify objects in the target engine 
     6594 
     6595                if (mUseKdPvs) 
     6596                { 
     6597                        vector<KdIntersectable *>::const_iterator kit, kit_end = mPreprocessor->mKdTree->mKdIntersectables.end(); 
     6598 
     6599                        int id = 0; 
     6600 
     6601                        for (kit = mPreprocessor->mKdTree->mKdIntersectables.begin(); kit != kit_end; ++ kit, ++ id) 
     6602                        { 
     6603                                Intersectable *obj = (*kit); 
     6604                                const AxisAlignedBox3 box = obj->GetBox(); 
     6605 
     6606                                // set kd id 
     6607                                obj->SetId(id); 
     6608 
     6609                                stream << "<BoundingBox" << " id=\"" << id << "\"" 
     6610                                   << " min=\"" << box.Min().x << " " << box.Min().y << " " << box.Min().z << "\"" 
     6611                                   << " max=\"" << box.Max().x << " " << box.Max().y << " " << box.Max().z << "\" />" << endl; 
     6612                        } 
     6613                } 
     6614                else 
     6615                { 
     6616                        mHierarchyManager->ExportBoundingBoxes(stream, objects); 
     6617                } 
    65966618        } 
    65976619 
Note: See TracChangeset for help on using the changeset viewer.