Gazebo Sim

API Reference

9.0.0~pre1
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
86
87 class Physics:
88 public System,
89 public ISystemConfigure,
91 public ISystemReset,
92 public ISystemUpdate
93 {
95 public: explicit Physics();
96
98 public: ~Physics() override;
99
100 // Documentation inherited
101 public: void Configure(const Entity &_entity,
104 EventManager &_eventMgr) final;
105
108
109 // Documentation inherited
110 public: void Reset(const UpdateInfo &_info,
111 EntityComponentManager &_ecm) final;
112
113 // Documentation inherited
114 public: void Update(const UpdateInfo &_info,
115 EntityComponentManager &_ecm) final;
116
118 private: std::unique_ptr<PhysicsPrivate> dataPtr;
119 };
120}
121}
122}
123}
124#endif