Ignore:
Timestamp:
09/19/06 09:41:23 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r1414 r1416  
    151151    */ 
    152152    virtual bool LoadViewCellsGeometry(const string filename); 
    153  
    154          
    155         /** Constructs view cell from base triangle. The ViewCell is extruded along the normal vector. 
     153         
     154        /** Constructs view cell from base triangle.  
     155                The view cell is extruded along the normal vector. 
    156156                @param the base triangle 
    157157                @param the height of the newly created view cell 
     
    347347        */ 
    348348        int GetMinPvsSize() const; 
    349  
    350349        /** Returns maximal ratio. i.e., currentPVs / maxPvs, 
    351350                where pvs is still considered valid. 
    352351        */ 
    353352        float GetMaxPvsRatio() const; 
    354  
    355353        /** Exports view cell geometry. 
    356354        */ 
    357         virtual void ExportViewCellGeometry(Exporter *exporter,  
    358                                                                                 ViewCell *vc, 
    359                                                                                 const AxisAlignedPlane *clipPlane = NULL) const = 0; 
     355        virtual void ExportViewCellGeometry( 
     356                Exporter *exporter, 
     357                ViewCell *vc, 
     358                const AxisAlignedBox3 *box, 
     359                const AxisAlignedPlane *clipPlane = NULL 
     360                ) const = 0; 
    360361 
    361362        /** Brings the view cells into their final state, computes meshes and volume. 
     
    483484        ////////////////////////////////////////////////////////////////// 
    484485 
     486 
    485487        /** Returns true if the view cell is equivalent to a  
    486488                node of the spatial hierarchy. This function can be used for merged 
     
    553555        void EvaluateViewCellsStats(); 
    554556 
     557 
     558        /////////////////////// 
    555559        //-- helper functions for view cell visualization 
    556560 
    557561        /** Exports the view cell partition. 
    558562        */ 
    559         void ExportViewCellsForViz(Exporter *exporter) const; 
     563        void ExportViewCellsForViz( 
     564                Exporter *exporter,  
     565                const AxisAlignedBox3 *box, 
     566                const AxisAlignedPlane *clipPlane = NULL) const; 
    560567 
    561568        /** Sets exporter color. 
    562569        */ 
    563570        virtual void ExportColor(Exporter *exporter, ViewCell *vc) const; 
     571        /** Creates meshes from the view cells. 
     572        */ 
     573        void CreateViewCellMeshes(); 
     574        /** Creates clip plane for visualization. 
     575        */ 
     576        void CreateClipPlane(); 
     577 
     578        AxisAlignedPlane *GetClipPlane(); 
     579        /////////////////////// 
    564580 
    565581        /** Returns volume of the view space. 
    566582        */ 
    567583        virtual float GetViewSpaceVolume(); 
    568          
    569         /** Creates meshes from the view cells. 
    570         */ 
    571         void CreateViewCellMeshes(); 
    572  
    573         /** Takes different measures to prepares the view cells after loading them from disc. 
     584        /** Prepares the view cells for sampling after loading them from disc. 
    574585        */ 
    575586        virtual void PrepareLoadedViewCells() {}; 
    576  
    577587        /** Constructs local view cell merge hierarchy. 
    578588        */ 
     
    586596                                                                           const ViewCellContainer &viewCells); 
    587597   
    588         /** Creates clip plane for visualization. 
    589         */ 
    590         void CreateClipPlane(); 
    591  
    592598        /** Updates pvs of all view cells for statistical evaluation after some more sampling 
    593599        */ 
     
    600606        /// if bounding boxes should be exported together with the view cells 
    601607        bool mExportBboxesForPvs; 
    602                  
    603         //Environment *environment; 
    604         AxisAlignedPlane mClipPlane; 
    605  
     608        /// the clip plane for visualization 
     609        AxisAlignedPlane mClipPlaneForViz; 
     610        /// if the visualization is using the clip plane 
    606611        bool mUseClipPlaneForViz; 
    607  
    608  
    609612        /// Renders the view cells. 
    610613        Renderer *mRenderer; 
    611  
    612614        /// Loaded view cells 
    613615        ViewCellContainer mViewCells; 
    614         /// the corresponding view cell tree holding the logical description of view cells 
     616        /// the view cell hierarchy (i.e., the logical description of view cells) 
    615617        ViewCellsTree *mViewCellsTree; 
    616618         
    617         /// if the values in the view cell leaves and the interiors are up to date 
    618         /// this is meant for lazy storing of the pvs, where only a scalar indicating 
    619         /// pvs size is stored in interiors and not the pvs itself. 
     619        /** if the values in the view cell leaves and the interiors are up to date 
     620                this is meant for lazy storing of the pvs, where only a scalar indicating 
     621                pvs size is stored in interiors and not the pvs itself. 
     622        */ 
    620623        bool mViewCellPvsIsUpdated; 
    621624 
    622         /// maximum number of samples taken for construction of the view cells 
     625        /// maximum number of samples for the view cell construction 
    623626        int mConstructionSamples; 
    624627        int mSamplesPerPass; 
     
    732735        void CreateMesh(ViewCell *vc); 
    733736 
    734         void ExportViewCellGeometry(Exporter *exporter,  
    735                                                                 ViewCell *vc,  
    736                                                                 const AxisAlignedPlane *clipPlane = NULL) const; 
     737        void ExportViewCellGeometry(Exporter *exporter, 
     738                                                                ViewCell *vc, 
     739                                                                const AxisAlignedBox3 *box, 
     740                                                                const AxisAlignedPlane *clipPlane = NULL 
     741                                                                ) const; 
    737742         
    738743        void CollectMergeCandidates(const VssRayContainer &rays,  
     
    741746        void Finalize(ViewCell *viewCell, const bool createMesh); 
    742747 
    743         bool ExportViewCells(const string filename, const bool exportPvs, const ObjectContainer &objects); 
     748        bool ExportViewCells(const string filename,  
     749                                                 const bool exportPvs,  
     750                                                 const ObjectContainer &objects); 
    744751 
    745752        /** Constructs merge hierarchy which corresponds to the spatial hierarchy. 
     
    805812        */ 
    806813        //  virtual void PrintStatistics(ostream &s) const; 
    807         ViewCell *GetViewCell(const Vector3 &point, const bool active = false) const { return NULL; } 
     814        ViewCell *GetViewCell(const Vector3 &point, const bool active = false) const  
     815        { return NULL; } 
    808816 
    809817        float GetProbability(ViewCell *viewCell); 
    810818         
    811  
    812819        void CreateMesh(ViewCell *vc); 
    813820 
    814         void ExportViewCellGeometry(Exporter *exporter,  
    815                                                                 ViewCell *vc, 
    816                                                                 const AxisAlignedPlane *clipPlane = NULL) const; 
     821        void ExportViewCellGeometry( 
     822                Exporter *exporter, 
     823                ViewCell *vc, 
     824                const AxisAlignedBox3 *box, 
     825                const AxisAlignedPlane *clipPlane = NULL 
     826                ) const; 
     827 
    817828 
    818829        void CollectMergeCandidates(const VssRayContainer &rays,  
     
    879890        void CreateMesh(ViewCell *vc); 
    880891 
    881         bool ExportViewCells(const string filename, const bool exportPvs, const ObjectContainer &objects); 
     892        bool ExportViewCells( 
     893                const string filename,  
     894                const bool exportPvs,  
     895                const ObjectContainer &objects); 
    882896 
    883897        int CastBeam(Beam &beam); 
    884  
    885         void ExportViewCellGeometry(Exporter *exporter,  
    886                                                                 ViewCell *vc, 
    887                                                                 const AxisAlignedPlane *clipPlane = NULL) const; 
    888  
    889         //float GetVolume(ViewCell *viewCell) const; 
     898         
     899        void ExportViewCellGeometry( 
     900                Exporter *exporter, 
     901                ViewCell *vc, 
     902                const AxisAlignedBox3 *box, 
     903                const AxisAlignedPlane *clipPlane = NULL 
     904                ) const; 
     905 
    890906 
    891907        void Finalize(ViewCell *viewCell, const bool createMesh); 
     
    920936        */ 
    921937        int GetMaxTreeDiff(ViewCell *vc) const; 
    922          
    923938 
    924939        /** Prepare view cells for use after loading them from disc. 
     
    10391054        virtual void EvalViewCellPartition(); 
    10401055#endif 
     1056 
    10411057        /** Exports view cell geometry. 
    10421058        */ 
    1043         void ExportViewCellGeometry(Exporter *exporter,  
     1059        void ExportViewCellGeometry( 
     1060                Exporter *exporter, 
    10441061                ViewCell *vc, 
    1045                 const AxisAlignedPlane *clipPlane = NULL) const; 
    1046  
    1047         int ComputeBoxIntersections(const AxisAlignedBox3 &box,  
     1062                const AxisAlignedBox3 *box, 
     1063                const AxisAlignedPlane *clipPlane = NULL 
     1064                ) const; 
     1065 
     1066        int ComputeBoxIntersections( 
     1067                const AxisAlignedBox3 &box,  
    10481068                ViewCellContainer &viewCells) const; 
    10491069         
    10501070        void CollectViewCells(); 
    1051  
    10521071 
    10531072        /** Prepare view cells for use after loading them from disc. 
     
    10671086 
    10681087        ///////////////////////////////////////// 
    1069  
    1070         /// the view space / object partition hierarchies 
    1071         //VspTree *mVspTree; 
    1072         //OspTree *mOspTree; 
    1073         //BvHierarchy *mBvHierarchy; 
    10741088 
    10751089        HierarchyManager *mHierarchyManager; 
Note: See TracChangeset for help on using the changeset viewer.