VR-Forces 4.1 Class Documentation
featureDebugger.h
Go to the documentation of this file.
1 
2 
3 
4 
5 #pragma once
6 
7 #include <features/featureSet.h>
9 
10 #include <tbb/mutex.h>
11 #include <tbb/compat/condition_variable>
12 
16 
17 namespace MAKVRinTerra
18 {
19  class DtSharedMemoryFeaturesDebugDrawer;
20  class DtAttributeConfigParser;
21  class DtUnusedFeatureTileTracker;
22 
24  {
25  public:
27  boost::shared_ptr<DtAttributeConfigParser> = boost::shared_ptr<DtAttributeConfigParser>(),
28  boost::shared_ptr<DtUnusedFeatureTileTracker> = boost::shared_ptr<DtUnusedFeatureTileTracker>(),
30 
32 
35  void add(std::string name, DtFeatureSet*, bool draw = false);
36 
37  template <typename F>
38  void add(std::string name, DtFeatureSetTemplate<F>* fs, bool draw = false)
39  {
40  add(name, new DtFeatureSet::Wrapper<F>(fs), draw);
41  }
42 
44  bool loadConfig(std::string);
45 
47  std::string printConfig() const;
48 
50  bool createFiltered(std::string newname, unsigned set, std::string query);
51 
53  bool createTransformed(std::string newname, unsigned set);
54 
56  std::string listFeatureSets(unsigned indent=0) const;
57 
59  void printFeatureSet(std::ostream&, unsigned set, unsigned max=0) const;
60 
62  std::string schema(std::string sets) const;
63 
65  std::string info() const;
66 
68  void draw(std::string sets);
69 
71  void clearDrawer();
72 
73  void redraw();
74 
75  void setQueryDebugging(bool);
76 
78  bool pageInPoint(unsigned set, double x, double y);
79 
80  void pageOut(unsigned maxsize);
81 
82  void setProjection(const DtProj&);
83 
84  private:
85  void doDraw();
86 
87  struct Record
88  {
89  boost::shared_ptr<DtFeatureSet> featureSet;
90  std::string name;
91 
92  Record(DtFeatureSet*, std::string);
93  };
94 
95  typedef std::vector<Record> RecordVector;
96 
97  mutable tbb::mutex myMutex;
98  mutable tbb::mutex myConditionMutex;
99  tbb::interface5::condition_variable myDrawCondition;
100  boost::scoped_ptr<tbb::tbb_thread> myDrawThread;
103 
105  boost::scoped_ptr<DtSharedMemoryFeaturesDebugDrawer> myDrawer;
106  boost::shared_ptr<DtAttributeConfigParser> myAttributeParser;
107  boost::scoped_ptr<DtSubCommandManager> myCommandManager;
108  boost::scoped_ptr<DtConsoleCommandOwner> myCommandOwner;
110  boost::shared_ptr<DtUnusedFeatureTileTracker> myUnusedTracker;
111  };
112 }

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)