Simulant  21.12-574
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
rigid_body.h
1 /* * Copyright (c) 2011-2017 Luke Benstead https://simulant-engine.appspot.com
2  *
3  * This file is part of Simulant.
4  *
5  * Simulant is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * Simulant is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with Simulant. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #pragma once
20 
21 #include <queue>
22 
23 #include "./dynamic_body.h"
24 
25 #include "../../generic/managed.h"
26 #include "../../types.h"
27 #include "../../nodes/stage_node.h"
28 #include "../../time_keeper.h"
29 
30 namespace smlt {
31 namespace behaviours {
32 
33 /*
34  * A rigid body controller
35  */
36 class RigidBody:
37  public impl::DynamicBody,
38  public RefCounted<RigidBody> {
39 
40 public:
41  RigidBody(RigidBodySimulation *simulation);
42  virtual ~RigidBody();
43 
44  using impl::Body::init;
45  using impl::Body::clean_up;
46 
47  const char* name() const { return "Rigid Body"; }
48 private:
49  friend class RigidBodySimulation;
50 };
51 
52 }
53 }
smlt::behaviours::RigidBody
Definition: rigid_body.h:38
smlt::RefCounted
Definition: managed.h:65
smlt
Definition: animation.cpp:25
smlt::behaviours::impl::DynamicBody
Definition: dynamic_body.h:10
smlt::behaviours::RigidBodySimulation
Definition: simulation.h:71