Gazebo Sim

API Reference

9.3.0
src/systems/physics/Physics.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018 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#ifndef GZ_SIM_SYSTEMS_PHYSICS_HH_
18#define GZ_SIM_SYSTEMS_PHYSICS_HH_
19
20#include <memory>
21#include <unordered_map>
22#include <utility>
25
26// Features need to be defined ahead of entityCast
38#include <gz/physics/Joint.hh>
39#include <gz/physics/Link.hh>
41#include <gz/physics/Shape.hh>
43#include <gz/physics/World.hh>
51
52#include <gz/sim/config.hh>
53#include <gz/sim/System.hh>
54
55namespace gz
56{
57namespace sim
58{
59// Inline bracket to help doxygen filtering.
60inline namespace GZ_SIM_VERSION_NAMESPACE {
61namespace systems
62{
63 // Forward declarations.
64 class PhysicsPrivate;
65
95
96 class Physics:
97 public System,
98 public ISystemConfigure,
100 public ISystemReset,
101 public ISystemUpdate
102 {
104 public: explicit Physics();
105
107 public: ~Physics() override;
108
109 // Documentation inherited
110 public: void Configure(const Entity &_entity,
113 EventManager &_eventMgr) final;
114
117
118 // Documentation inherited
119 public: void Reset(const UpdateInfo &_info,
120 EntityComponentManager &_ecm) final;
121
122 // Documentation inherited
123 public: void Update(const UpdateInfo &_info,
124 EntityComponentManager &_ecm) final;
125
127 private: std::unique_ptr<PhysicsPrivate> dataPtr;
128 };
129}
130}
131}
132}
133#endif