Changeset 1416 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h
- Timestamp:
- 09/19/06 09:41:23 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h
r1414 r1416 151 151 */ 152 152 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. 156 156 @param the base triangle 157 157 @param the height of the newly created view cell … … 347 347 */ 348 348 int GetMinPvsSize() const; 349 350 349 /** Returns maximal ratio. i.e., currentPVs / maxPvs, 351 350 where pvs is still considered valid. 352 351 */ 353 352 float GetMaxPvsRatio() const; 354 355 353 /** Exports view cell geometry. 356 354 */ 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; 360 361 361 362 /** Brings the view cells into their final state, computes meshes and volume. … … 483 484 ////////////////////////////////////////////////////////////////// 484 485 486 485 487 /** Returns true if the view cell is equivalent to a 486 488 node of the spatial hierarchy. This function can be used for merged … … 553 555 void EvaluateViewCellsStats(); 554 556 557 558 /////////////////////// 555 559 //-- helper functions for view cell visualization 556 560 557 561 /** Exports the view cell partition. 558 562 */ 559 void ExportViewCellsForViz(Exporter *exporter) const; 563 void ExportViewCellsForViz( 564 Exporter *exporter, 565 const AxisAlignedBox3 *box, 566 const AxisAlignedPlane *clipPlane = NULL) const; 560 567 561 568 /** Sets exporter color. 562 569 */ 563 570 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 /////////////////////// 564 580 565 581 /** Returns volume of the view space. 566 582 */ 567 583 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. 574 585 */ 575 586 virtual void PrepareLoadedViewCells() {}; 576 577 587 /** Constructs local view cell merge hierarchy. 578 588 */ … … 586 596 const ViewCellContainer &viewCells); 587 597 588 /** Creates clip plane for visualization.589 */590 void CreateClipPlane();591 592 598 /** Updates pvs of all view cells for statistical evaluation after some more sampling 593 599 */ … … 600 606 /// if bounding boxes should be exported together with the view cells 601 607 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 606 611 bool mUseClipPlaneForViz; 607 608 609 612 /// Renders the view cells. 610 613 Renderer *mRenderer; 611 612 614 /// Loaded view cells 613 615 ViewCellContainer mViewCells; 614 /// the corresponding view cell tree holding the logical description of view cells616 /// the view cell hierarchy (i.e., the logical description of view cells) 615 617 ViewCellsTree *mViewCellsTree; 616 618 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 */ 620 623 bool mViewCellPvsIsUpdated; 621 624 622 /// maximum number of samples taken for construction of the view cells625 /// maximum number of samples for the view cell construction 623 626 int mConstructionSamples; 624 627 int mSamplesPerPass; … … 732 735 void CreateMesh(ViewCell *vc); 733 736 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; 737 742 738 743 void CollectMergeCandidates(const VssRayContainer &rays, … … 741 746 void Finalize(ViewCell *viewCell, const bool createMesh); 742 747 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); 744 751 745 752 /** Constructs merge hierarchy which corresponds to the spatial hierarchy. … … 805 812 */ 806 813 // 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; } 808 816 809 817 float GetProbability(ViewCell *viewCell); 810 818 811 812 819 void CreateMesh(ViewCell *vc); 813 820 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 817 828 818 829 void CollectMergeCandidates(const VssRayContainer &rays, … … 879 890 void CreateMesh(ViewCell *vc); 880 891 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); 882 896 883 897 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 890 906 891 907 void Finalize(ViewCell *viewCell, const bool createMesh); … … 920 936 */ 921 937 int GetMaxTreeDiff(ViewCell *vc) const; 922 923 938 924 939 /** Prepare view cells for use after loading them from disc. … … 1039 1054 virtual void EvalViewCellPartition(); 1040 1055 #endif 1056 1041 1057 /** Exports view cell geometry. 1042 1058 */ 1043 void ExportViewCellGeometry(Exporter *exporter, 1059 void ExportViewCellGeometry( 1060 Exporter *exporter, 1044 1061 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, 1048 1068 ViewCellContainer &viewCells) const; 1049 1069 1050 1070 void CollectViewCells(); 1051 1052 1071 1053 1072 /** Prepare view cells for use after loading them from disc. … … 1067 1086 1068 1087 ///////////////////////////////////////// 1069 1070 /// the view space / object partition hierarchies1071 //VspTree *mVspTree;1072 //OspTree *mOspTree;1073 //BvHierarchy *mBvHierarchy;1074 1088 1075 1089 HierarchyManager *mHierarchyManager;
Note: See TracChangeset
for help on using the changeset viewer.