Created
October 4, 2018 20:20
-
-
Save ChristianHohlfeld/3ce7e4649e269c6d18fab4b5cff47084 to your computer and use it in GitHub Desktop.
Physics.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Physics.h | |
// UDPTEST | |
// | |
// Created by Christian Hohlfeld on 22.09.18. | |
// | |
#ifndef Physics_h | |
#define Physics_h | |
#include "Box2D/Box2D.h" | |
static const float PTM = 32.0f; | |
class Physics { | |
public: | |
Physics(); | |
void tick(const float deltaTime); | |
void renderFullStep(); | |
void renderPartStep(const float alpha); | |
b2World* getWorld(){return world;} | |
private: | |
b2World* world = nullptr; | |
double fixedTimestepAccumulator_; | |
}; | |
#endif /* Physics_h */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment