hpp-core  4.9.0
Implement basic classes for canonical path planning for kinematic chains.
edge.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2014 CNRS
3 // Authors: Florent Lamiraux
4 //
5 // This file is part of hpp-core
6 // hpp-core is free software: you can redistribute it
7 // and/or modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation, either version
9 // 3 of the License, or (at your option) any later version.
10 //
11 // hpp-core is distributed in the hope that it will be
12 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Lesser Public License for more details. You should have
15 // received a copy of the GNU Lesser General Public License along with
16 // hpp-core If not, see
17 // <http://www.gnu.org/licenses/>.
18 
19 #ifndef HPP_CORE_EDGE_HH
20 # define HPP_CORE_EDGE_HH
21 
22 # include <hpp/core/config.hh>
23 # include <hpp/core/fwd.hh>
24 
25 namespace hpp {
26  namespace core {
29 
34  class HPP_CORE_DLLAPI Edge
35  {
36  public:
37  Edge (NodePtr_t n1, NodePtr_t n2, const PathPtr_t& path) :
38  n1_ (n1), n2_ (n2), path_ (path)
39  {
40  }
41  NodePtr_t from () const
42  {
43  return n1_;
44  }
45  NodePtr_t to () const
46  {
47  return n2_;
48  }
49  PathPtr_t path () const
50  {
51  return path_;
52  }
53  private:
54  NodePtr_t n1_;
55  NodePtr_t n2_;
56  PathPtr_t path_;
57  }; // class Edge
59  } // namespace core
60 } // namespace hpp
61 #endif // HPP_CORE_EDGE_HH
boost::shared_ptr< Path > PathPtr_t
Definition: fwd.hh:170
PathPtr_t path() const
Definition: edge.hh:49
Edge(NodePtr_t n1, NodePtr_t n2, const PathPtr_t &path)
Definition: edge.hh:37
Definition: edge.hh:34
NodePtr_t to() const
Definition: edge.hh:45
Definition: node.hh:34
NodePtr_t from() const
Definition: edge.hh:41