Gazebo Physics

API Reference

7.8.0
Gravity.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2026 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_GRAVITY_HH_
19 #define GZ_PHYSICS_GRAVITY_HH_
20 
23 
24 namespace gz
25 {
26  namespace physics
27  {
30  class GZ_PHYSICS_VISIBLE GravityEnabled : public virtual Feature
31  {
33  public: template <typename PolicyT, typename FeaturesT>
34  class Link : public virtual Feature::Link<PolicyT, FeaturesT>
35  {
38  public: void SetGravityEnabled(bool _enabled);
39 
42  public: bool GetGravityEnabled() const;
43  };
44 
46  public: template <typename PolicyT, typename FeaturesT>
47  class Model : public virtual Feature::Model<PolicyT, FeaturesT>
48  {
52  public: void SetGravityEnabled(bool _enabled);
53 
57  public: bool GetGravityEnabled() const;
58  };
59 
61  public: template <typename PolicyT>
62  class Implementation : public virtual Feature::Implementation<PolicyT>
63  {
67  public: virtual void SetLinkGravityEnabled(
68  const Identity &_id, bool _enabled) = 0;
69 
73  public: virtual bool GetLinkGravityEnabled(
74  const Identity &_id) const = 0;
75 
79  public: virtual void SetModelGravityEnabled(
80  const Identity &_id, bool _enabled) = 0;
81 
85  public: virtual bool GetModelGravityEnabled(
86  const Identity &_id) const = 0;
87  };
88  };
89  }
90 }
91 
92 #include <gz/physics/detail/Gravity.hh>
93 
94 #endif