Gazebo Physics

API Reference

7.8.0
Model.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_MODEL_HH_
19 #define GZ_PHYSICS_MODEL_HH_
20 
22 
23 namespace gz
24 {
25  namespace physics
26  {
30  class GZ_PHYSICS_VISIBLE ModelStaticState : public virtual Feature
31  {
33  public: template <typename PolicyT, typename FeaturesT>
34  class Model : public virtual Feature::Model<PolicyT, FeaturesT>
35  {
38  public: void SetStatic(bool _static);
39 
42  public: bool GetStatic() const;
43  };
44 
46  public: template <typename PolicyT>
47  class Implementation : public virtual Feature::Implementation<PolicyT>
48  {
52  public: virtual void SetModelStatic(
53  const Identity &_id, bool _static) = 0;
54 
58  public: virtual bool GetModelStatic(const Identity &_id) const = 0;
59  };
60  };
61 
66  class GZ_PHYSICS_VISIBLE ModelCollisionEnabled : public virtual Feature
67  {
69  public: template <typename PolicyT, typename FeaturesT>
70  class Model : public virtual Feature::Model<PolicyT, FeaturesT>
71  {
74  public: void SetCollisionEnabled(bool _enabled);
75 
78  public: bool GetCollisionEnabled() const;
79  };
80 
82  public: template <typename PolicyT>
83  class Implementation : public virtual Feature::Implementation<PolicyT>
84  {
88  public: virtual void SetModelCollisionEnabled(
89  const Identity &_id, bool _enabled) = 0;
90 
94  public: virtual bool GetModelCollisionEnabled(
95  const Identity &_id) const = 0;
96  };
97  };
98 
99  }
100 }
101 
102 #include <gz/physics/detail/Model.hh>
103 
104 #endif