Ignition Physics

API Reference

4.1.0
World.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 #ifndef IGNITION_PHYSICS_WORLD_HH_
19 #define IGNITION_PHYSICS_WORLD_HH_
20 
21 #include <string>
22 
24 
25 namespace ignition
26 {
27  namespace physics
28  {
30  class IGNITION_PHYSICS_VISIBLE CollisionDetector : public virtual Feature
31  {
33  public: template <typename PolicyT, typename FeaturesT>
34  class World : public virtual Feature::World<PolicyT, FeaturesT>
35  {
38  public: void SetCollisionDetector(
39  const std::string &_collisionDetector);
40 
43  public: const std::string &GetCollisionDetector() const;
44  };
45 
47  public: template <typename PolicyT>
48  class Implementation : public virtual Feature::Implementation<PolicyT>
49  {
53  public: virtual void SetWorldCollisionDetector(
54  const Identity &_id, const std::string &_collisionDetector) = 0;
55 
59  public: virtual const std::string &GetWorldCollisionDetector(
60  const Identity &_id) const = 0;
61  };
62  };
63 
65  class IGNITION_PHYSICS_VISIBLE Solver : public virtual Feature
66  {
68  public: template <typename PolicyT, typename FeaturesT>
69  class World : public virtual Feature::World<PolicyT, FeaturesT>
70  {
73  public: void SetSolver(const std::string &_solver);
74 
77  public: const std::string &GetSolver() const;
78  };
79 
81  public: template <typename PolicyT>
82  class Implementation : public virtual Feature::Implementation<PolicyT>
83  {
87  public: virtual void SetWorldSolver(
88  const Identity &_id, const std::string &_solver) = 0;
89 
93  public: virtual const std::string &GetWorldSolver(
94  const Identity &_id) const = 0;
95  };
96  };
97  }
98 }
99 
100 #include <ignition/physics/detail/World.hh>
101 
102 #endif
The implementation API for the collision detector.
Definition: World.hh:48
This class defines the concept of a Feature. It should be inherited by classes that define some plugi...
Definition: Feature.hh:35
STL class.
The World API for setting the solver.
Definition: World.hh:69
Placeholder class in case a Feature does not define its own World API.
Definition: Feature.hh:49
Definition: World.hh:65
The implementation API for the solver.
Definition: World.hh:82
The World API for setting the collision detector.
Definition: World.hh:34