SuperTuxKart
Loading...
Searching...
No Matches
stk_dynamics_world.hpp
1//
2// SuperTuxKart - a fun racing game with go-kart
3// Copyright (C) 2011-2015 Joerg Henrichs
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 3
8// of the License, or (at your option) any later version.
9//
10// This program 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 General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19#ifndef HEADER_STK_DYNAMICS_WORLD_HPP
20#define HEADER_STK_DYNAMICS_WORLD_HPP
21
22#include "btBulletDynamicsCommon.h"
23
28class STKDynamicsWorld : public btDiscreteDynamicsWorld
29{
30public:
32 STKDynamicsWorld(btDispatcher* dispatcher,
33 btBroadphaseInterface* pairCache,
34 btConstraintSolver* constraintSolver,
35 btCollisionConfiguration* collisionConfiguration)
36
37 : btDiscreteDynamicsWorld(dispatcher, pairCache,
38 constraintSolver,
39 collisionConfiguration)
40 {
41 }
42
45 void resetLocalTime() { m_localTime = 0; }
46 // ------------------------------------------------------------------------
48 void setLocalTime(float t) { m_localTime = t; }
49 // ------------------------------------------------------------------------
51 float getLocalTime() const { return m_localTime; }
52}; // STKDynamicsWorld
53#endif
54/* EOF */
55
A thin wrapper around bullet's btDiscreteDynamicsWorld.
Definition: stk_dynamics_world.hpp:29
float getLocalTime() const
Gets the local time.
Definition: stk_dynamics_world.hpp:51
STKDynamicsWorld(btDispatcher *dispatcher, btBroadphaseInterface *pairCache, btConstraintSolver *constraintSolver, btCollisionConfiguration *collisionConfiguration)
The standard constructor which just created a btDiscreteDynamicsWorld.
Definition: stk_dynamics_world.hpp:32
void resetLocalTime()
Resets m_localTime to 0.
Definition: stk_dynamics_world.hpp:45
void setLocalTime(float t)
Sets the local time to a specified value.
Definition: stk_dynamics_world.hpp:48