VR-Forces 4.2 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 const char* TypeName;
29 
30  static CPtr GetPtr(const DtPathFeature&);
31 
32  virtual CPtr getPathPtr() const;
33 
34  virtual DtFeatureGeometry::Path pathGeometry() const = 0;
35  };
36 
38 
40  {
41  public:
42  static DtPathFeatureSet* MakeSet(DtFeatureSet*);
43 
44  explicit DtSimplePathFeature(const DtFeature& feature);
45 
46  DtFeatureGeometry::Path pathGeometry() const
47  {
48  return myPathGeometry;
49  }
50 
53 
54  boost::optional<Attribute> attribute(const Key & key) const
55  {
56  return myFeature->attribute(key);
57  }
58 
59  void forEachAttribute(ForEachFunction f) const
60  {
61  myFeature->forEachAttribute(f);
62  }
63 
64  unsigned numberOfAttributes(const Key::String & name) const
65  {
66  return myFeature->numberOfAttributes(name);
67  }
68 
69  DtFeatureGeometry geometry() const
70  {
71  return myFeature->geometry();
72  }
73 
74  private:
77  };
78 
79  //Use on a feature set with findeachFeature to get the closest
80  //path feature to the given point. Once the closest feature
81  //has been found, call findClosestPointOnFeature() to get
82  //the closest edge and closest point on that edge.
84  {
85  public:
87 
88  explicit DtClosestPathFeatureFinder(const DtPoint& point,
89  DtProj::CPtr localProj);
90 
91  void operator()(const DtPathFeature & feature);
92 
93  void findClosestPointOnFeature();
94 
95  bool foundClosestFeature() const;
96 
100  DtPoint myClosestPoint;
101  DtPoint myClosestEdgeA;
102  DtPoint myClosestEdgeB;
105  };
106 }
107 

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)