VR-Forces 4.2 Class Documentation
sharedMemoryFeaturesDebugDrawer.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 
10 
11 #pragma once
12 
13 #include <features/feature.h>
14 #include <features/featureSet.h>
15 
17 
18 #include <tbb/mutex.h>
19 
20 namespace MAKVRinTerra
21 {
30  {
31  public:
32  typedef tbb::mutex Mutex;
33 
37  {
38  public:
42  ScopedFrame(DtSharedMemoryFeaturesDebugDrawer& drawer, bool erase = true);
43 
44  private:
45  Mutex::scoped_lock myLock;
47  };
48 
49  static DtFeatureSet* MakeFeatureSet(std::auto_ptr<DtFeatureGeometry::GeometryVector>);
50  static DtFeatureSet* MakeFeatureSet(
51  std::auto_ptr<DtFeatureGeometry::GeometryVector>,
52  unsigned char red, unsigned char green, unsigned char blue);
53 
58  std::string tag = "Features", DtFeatureSet* fs = 0, unsigned long bufferSize=10485670/2);
59 
61 
63  virtual void addFeatureSet(DtFeatureSet*);
64 
66  virtual void setFeatureSet(DtFeatureSet*);
67 
69 
70  virtual void setPointColor(const DtDebugDrawerGeometryMemoryColor&);
71  virtual void setPathColor(const DtDebugDrawerGeometryMemoryColor&);
72  virtual void setAreaColor(const DtDebugDrawerGeometryMemoryColor&);
73  virtual void setPointRadius(unsigned radius);
75 
79  virtual void setHeight(double);
80 
83  virtual void draw(bool useFrame = true);
84 
85  virtual bool drawFeature(const DtFeature&);
86 
87  virtual bool draw(DtFeatureGeometry);
89  virtual bool draw(DtFeatureGeometry, DtDebugDrawerGeometryMemoryColor, double height);
90 
91  virtual bool drawAbove(DtFeatureGeometry, DtDebugDrawerGeometryMemoryColor, double addHeight = 1000);
92 
93  virtual bool drawAsPoints(DtFeatureGeometry);
94  virtual bool drawAsPoints(DtFeatureGeometry, DtDebugDrawerGeometryMemoryColor);
95 
96  private:
97  typedef std::pair<std::string, DtFeatureSet*> FeatureSetPair;
98  typedef std::vector<FeatureSetPair> FeatureSetMap;
99 
100  mutable Mutex myMutex;
101  boost::scoped_ptr<DtMultiBufferDebugDrawer> myMemManager;
102  boost::scoped_ptr<DtFeatureSet::List> myFeatureSets;
107  unsigned myPointRadius;
108  double myHeight;
110  };
111 }

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)