Ignore:
Timestamp:
02/19/07 02:51:22 (17 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r1404 r2124  
    2929class X3dExporter : public Exporter 
    3030{ 
    31   std::ofstream stream; 
     31        std::ofstream stream; 
    3232 
    3333public: 
    3434 
    35   X3dExporter(const string filename); 
     35        X3dExporter(const string filename); 
    3636 
    37   ~X3dExporter(); 
     37        ~X3dExporter(); 
    3838 
     39        bool 
     40                ExportKdTree(const KdTree &tree, const bool exportGeometry = false); 
    3941 
    40 //    bool 
    41 //    ExportRays(const vector<Ray> &rays, 
    42 //           const float length=1000, 
    43 //           const RgbColor &color = RgbColor(1,1,1)); 
     42        bool 
     43                ExportVssTree(const VssTree &tree); 
    4444 
     45        bool 
     46                ExportVssTree2(const VssTree &tree, 
     47                const Vector3 direction); 
    4548 
    46   bool 
    47   ExportKdTree(const KdTree &tree, const bool exportGeometry = false); 
     49        virtual bool 
     50                ExportRssTree2(const RssTree &tree, 
     51                const Vector3 direction); 
    4852 
    49   bool 
    50   ExportVssTree(const VssTree &tree); 
     53        bool ExportBspTree(const BspTree &tree); 
    5154 
    52   bool 
    53   ExportVssTree2(const VssTree &tree, 
    54                                  const Vector3 direction 
    55                                  ); 
     55        bool 
     56                ExportScene(SceneGraphNode *root) 
     57        { 
     58                ExportSceneNode(root); 
     59                return true; 
     60        } 
    5661 
    57   virtual bool 
    58   ExportRssTree2(const RssTree &tree, 
    59                                  const Vector3 direction 
    60                                  ); 
     62        virtual void 
     63                ExportPolygon(Polygon3 *poly); 
    6164 
    62   // bool ExportOspTree(const OspTree &tree); 
     65        virtual void 
     66                ExportPolygons(const PolygonContainer &polys); 
    6367 
    64   bool ExportBspTree(const BspTree &tree); 
     68        virtual bool 
     69                ExportBox(const AxisAlignedBox3 &box); 
    6570 
    66   bool 
    67   ExportScene(SceneGraphNode *root) 
    68   { 
    69     ExportSceneNode(root); 
    70     return true; 
    71   } 
     71        virtual void 
     72                ExportMesh(Mesh *mesh); 
    7273 
    73   virtual void 
    74   ExportPolygon(Polygon3 *poly); 
     74        virtual void 
     75                ExportViewCell(ViewCell *viewCell); 
    7576 
    76   virtual void 
    77   ExportPolygons(const PolygonContainer &polys); 
     77        bool 
     78                ExportRays(const RayContainer &rays, 
     79                const float length=1000, 
     80                const RgbColor &color = RgbColor(1,1,1)); 
    7881 
    79   virtual bool 
    80   ExportBox(const AxisAlignedBox3 &box); 
     82        bool 
     83                ExportRays(const VssRayContainer &rays, 
     84                const RgbColor &color = RgbColor(1,1,1)); 
    8185 
    82   virtual void 
    83   ExportMesh(Mesh *mesh); 
     86        virtual void 
     87                ExportBspSplitPlanes(const BspTree &tree); 
    8488 
    85   virtual void 
    86   ExportViewCell(ViewCell *viewCell); 
     89        virtual void 
     90                ExportBspSplits(const BspTree &tree, const bool exportDepth); 
    8791 
    88   bool 
    89   ExportRays(const RayContainer &rays, 
    90                          const float length=1000, 
    91                          const RgbColor &color = RgbColor(1,1,1)); 
     92        virtual void 
     93                ExportLeavesGeometry(const BspTree &tree, const vector<BspLeaf *> &leaves); 
    9294 
    93   bool 
    94   ExportRays(const VssRayContainer &rays, 
    95                          const RgbColor &color = RgbColor(1,1,1)); 
     95        virtual void ExportBspLeaves(const BspTree &tree, const int maxPvs = 0); 
    9696 
    97   virtual void 
    98   ExportBspSplitPlanes(const BspTree &tree); 
     97        virtual void ExportBspSplits(const VspBspTree &tree, const bool exportDepth); 
    9998 
    100   virtual void 
    101   ExportBspSplits(const BspTree &tree, const bool exportDepth); 
     99        virtual void ExportBeam(const Beam &beam, const AxisAlignedBox3 &box); 
    102100 
    103   virtual void 
    104   ExportLeavesGeometry(const BspTree &tree, const vector<BspLeaf *> &leaves); 
     101        bool ExportRaySets(const vector<VssRayContainer> &rays, 
     102                                           const RgbColor &color); 
    105103 
    106   virtual void 
    107   ExportBspLeaves(const BspTree &tree, const int maxPvs = 0); 
    108  
    109   virtual void 
    110   ExportBspSplits(const VspBspTree &tree, const bool exportDepth); 
    111  
    112   virtual void ExportBeam(const Beam &beam, const AxisAlignedBox3 &box); 
    113  
    114   bool 
    115   ExportRaySets(const vector<VssRayContainer> &rays, 
    116                                 const RgbColor &color); 
    117104 
    118105protected: 
    119106 
    120   virtual void 
    121   ExportSceneNode(SceneGraphNode *node); 
     107        virtual void ExportSceneNode(SceneGraphNode *node); 
    122108 
    123   bool 
    124   ExportKdTreeRayDensity(const KdTree &tree); 
     109        bool ExportKdTreeRayDensity(const KdTree &tree); 
    125110 
    126   bool 
    127   ExportBspTreeRayDensity(const BspTree &tree); 
     111        bool ExportBspTreeRayDensity(const BspTree &tree); 
    128112 
    129   void ExportBspNodeSplits(BspNode *root, 
    130                                                   const AxisAlignedBox3 &box, 
    131                                                   const bool exportDepth, 
    132                                                   const bool epsilon); 
     113        void ExportBspNodeSplits(BspNode *root, 
     114                                                        const AxisAlignedBox3 &box, 
     115                                                        const bool exportDepth, 
     116                                                        const bool epsilon); 
    133117 
    134  
    135   void ExportViewpoint(const Vector3 &point, const Vector3 &direction); 
    136  
     118        void ExportViewpoint(const Vector3 &point, const Vector3 &direction); 
    137119}; 
    138120 
Note: See TracChangeset for help on using the changeset viewer.