VR-Forces 4.1 Class Documentation
pathFeature.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <features/feature.h>
13 #include <features/featureSet.h>
14 
15 #include <vrfutil/kinTools.h>
16 
17 #include <list>
18 
20 namespace MAKVRinTerra
21 {
23  {
24  public:
25  typedef boost::shared_ptr<DtPathFeature> Ptr;
26  typedef boost::shared_ptr<const DtPathFeature> CPtr;
27 
28  static CPtr GetPtr(const DtPathFeature&);
29 
30  virtual CPtr getPathPtr() const;
31 
32  virtual DtFeatureGeometry::Path pathGeometry() const = 0;
33  };
34 
36 
38  {
39  public:
40  static DtPathFeatureSet* MakeSet(DtFeatureSet*);
41 
42  explicit DtSimplePathFeature(const DtFeature& feature);
43 
44  DtFeatureGeometry::Path pathGeometry() const
45  {
46  return myPathGeometry;
47  }
48 
51 
52  boost::optional<Attribute> attribute(const Key & key) const
53  {
54  return myFeature->attribute(key);
55  }
56 
57  void forEachAttribute(ForEachFunction f) const
58  {
59  myFeature->forEachAttribute(f);
60  }
61 
62  unsigned numberOfAttributes(const Key::String & name) const
63  {
64  return myFeature->numberOfAttributes(name);
65  }
66 
67  DtFeatureGeometry geometry() const
68  {
69  return myFeature->geometry();
70  }
71 
72  private:
75  };
76 
77  //Use on a feature set with findeachFeature to get the closest
78  //path feature to the given point. Once the closest feature
79  //has been found, call findClosestPointOnFeature() to get
80  //the closest edge and closest point on that edge.
82  {
83  public:
85 
87  DtProj::CPtr localProj);
88 
89  void operator()(const DtPathFeature & feature);
90 
91  void findClosestPointOnFeature();
92 
93  bool foundClosestFeature() const;
94 
103  };
104 }
105 

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)