hpp-core  4.9.0
Implement basic classes for canonical path planning for kinematic chains.
configuration-shooter.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_CONFIGURATION_SHOOTER_HH
20 # define HPP_CORE_CONFIGURATION_SHOOTER_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 ConfigurationShooter
35  {
36  public:
38  virtual ConfigurationPtr_t shoot () const
39  {
41  shoot (*q);
42  return q;
43  }
44 
51  virtual void shoot (Configuration_t& q) const { impl_shoot(q); }
52 
53  virtual ~ConfigurationShooter () {};
54  protected:
56  {
57  }
59  void init (const ConfigurationShooterWkPtr_t& weak)
60  {
61  weakPtr_ = weak;
62  }
63 
64  virtual void impl_shoot (Configuration_t& q) const = 0;
65  private:
66  ConfigurationShooterWkPtr_t weakPtr_;
67  }; // class
68  } // namespace core
70 } // namespace hpp
71 #endif // HPP_CORE_CONFIGURATION_SHOOTER_HH
virtual ~ConfigurationShooter()
Definition: configuration-shooter.hh:53
ConfigurationShooter()
Definition: configuration-shooter.hh:55
virtual ConfigurationPtr_t shoot() const
Shoot a random configuration.
Definition: configuration-shooter.hh:38
void init(const ConfigurationShooterWkPtr_t &weak)
Store weak pointer to itself.
Definition: configuration-shooter.hh:59
pinocchio::ConfigurationPtr_t ConfigurationPtr_t
Definition: fwd.hh:99
virtual void shoot(Configuration_t &q) const
Definition: configuration-shooter.hh:51
pinocchio::Configuration_t Configuration_t
Definition: fwd.hh:96
Definition: configuration-shooter.hh:34