Choreonoid  1.5
LinkPath.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_BODY_LINK_PATH_H
7 #define CNOID_BODY_LINK_PATH_H
8 
9 #include "LinkTraverse.h"
10 #include "exportdecl.h"
11 
12 namespace cnoid {
13 
15 {
16 public:
17  LinkPath();
18  LinkPath(Link* base, Link* end);
19  LinkPath(Link* end);
20 
21  bool setPath(Link* base, Link* end);
22  void setPath(Link* end);
23 
24  inline Link* baseLink() const {
25  return links.front();
26  }
27 
28  inline Link* endLink() const {
29  return links.back();
30  }
31 
32 #ifdef CNOID_BACKWARD_COMPATIBILITY
33  bool find(Link* base, Link* end) { return setPath(base, end); }
36  void find(Link* end) { return setPath(end); }
37 #endif
38 
39 private:
40  virtual void find(Link* root, bool doUpward, bool doDownward);
41 
42  bool findPathSub(Link* link, Link* prev, Link* end, bool isForwardDirection);
43  void findPathFromRootSub(Link* link);
44 };
45 
46 }
47 
48 #endif
The header file of the LinkTraverse class.
Definition: LinkPath.h:14
Link * endLink() const
Definition: LinkPath.h:28
Defines the minimum processing for performing pasing file for STL.
Definition: AbstractSceneLoader.h:9
Link * baseLink() const
Definition: LinkPath.h:24
Definition: LinkTraverse.h:17
#define CNOID_EXPORT
Definition: Util/exportdecl.h:37