Choreonoid  1.1
LinkPath.h
説明を見る。
1 
6 #ifndef CNOID_BODY_LINK_PATH_H_INCLUDED
7 #define CNOID_BODY_LINK_PATH_H_INCLUDED
8 
9 #include "LinkTraverse.h"
10 #include "exportdecl.h"
11 
12 namespace cnoid {
13 
15  {
16  public:
17 
18  LinkPath();
19  LinkPath(Link* base, Link* end);
20  LinkPath(Link* end);
21 
22  bool find(Link* base, Link* end);
23  void find(Link* end);
24 
25  inline Link* baseLink() const {
26  return links.front();
27  }
28 
29  inline Link* endLink() const {
30  return links.back();
31  }
32 
33  private:
34 
35  virtual void find(Link* root, bool doUpward, bool doDownward);
36 
37  bool findPathSub(Link* link, Link* prev, Link* end, bool isForwardDirection);
38  void findPathFromRootSub(Link* link);
39  };
40 
41 };
42 
43 #endif