Gazebo Physics

API Reference

2.6.2
gz/physics/Feature.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 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 GZ_PHYSICS_FEATURE_HH_
19 #define GZ_PHYSICS_FEATURE_HH_
20 
21 #include <cstddef>
22 #include <memory>
23 #include <tuple>
24 
25 #include <gz/physics/Export.hh>
26 #include <gz/physics/Entity.hh>
27 
28 namespace ignition
29 {
30  namespace physics
31  {
35  class Feature
36  {
39  public: template <typename Policy, typename FeaturesT>
40  class Engine : public virtual Entity<Policy, FeaturesT>
41  {
43  public: virtual ~Engine() = default;
44  };
45 
48  public: template <typename Policy, typename FeaturesT>
49  class World : public virtual Entity<Policy, FeaturesT>
50  {
52  public: virtual ~World() = default;
53  };
54 
57  public: template <typename Policy, typename FeaturesT>
58  class Model : public virtual Entity<Policy, FeaturesT>
59  {
61  public: virtual ~Model() = default;
62  };
63 
66  public: template <typename Policy, typename FeaturesT>
67  class Link : public virtual Entity<Policy, FeaturesT>
68  {
70  public: virtual ~Link() = default;
71  };
72 
75  public: template <typename Policy, typename FeaturesT>
76  class Joint : public virtual Entity<Policy, FeaturesT>
77  {
79  public: virtual ~Joint() = default;
80  };
81 
84  public: template <typename Policy, typename FeaturesT>
85  class Shape : public virtual Entity<Policy, FeaturesT>
86  {
88  public: virtual ~Shape() = default;
89  };
90 
91  public: template <typename Policy>
92  class Implementation : public detail::Implementation
93  {
107  public: virtual Identity InitiateEngine(std::size_t engineID = 0) = 0;
108 
110  public: virtual ~Implementation() = default;
111  };
112 
117  template <typename SomeFeatureList, bool /*AssertNoConflict*/ = false>
118  static constexpr bool ConflictsWith()
119  {
120  return false;
121  }
122 
127  using RequiredFeatures = void;
128  };
129  }
130 }
131 
132 #endif
This is the base class of all "proxy objects". The "proxy objects" are essentially interfaces into th...
Definition: gz/physics/Entity.hh:216
Placeholder class in case a Feature does not define its own Shape API.
Definition: gz/physics/Feature.hh:85
virtual ~Shape()=default
Virtual destructor.
virtual ~Joint()=default
Virtual destructor.
static constexpr bool ConflictsWith()
By default, a blank feature will not conflict with any other features. If your feature does conflict ...
Definition: gz/physics/Feature.hh:118
virtual ~Implementation()=default
Virtual destructor.
virtual Identity InitiateEngine(std::size_t engineID=0)=0
Tell the physics plugin to initiate a physics engine.
virtual ~Model()=default
Virtual destructor.
void RequiredFeatures
By default, a blank feature will not require any other features. If your feature does require some ot...
Definition: gz/physics/Feature.hh:127
Definition: gz/physics/Feature.hh:92
This class defines the concept of a Feature. It should be inherited by classes that define some plugi...
Definition: gz/physics/Feature.hh:35
Placeholder class in case a Feature does not define its own Joint API.
Definition: gz/physics/Feature.hh:76
Placeholder class in case a Feature does not define its own Model API.
Definition: gz/physics/Feature.hh:58
Placeholder class in case a Feature does not define its own World API.
Definition: gz/physics/Feature.hh:49
virtual ~World()=default
Virtual destructor.
Placeholder class for the Engine API. Every Engine feature MUST inherit this class.
Definition: gz/physics/Feature.hh:40
virtual ~Engine()=default
Virtual destructor.