Skip to content

Instantly share code, notes, and snippets.

@ChristianHohlfeld
Created October 4, 2018 20:20
Show Gist options
  • Save ChristianHohlfeld/3ce7e4649e269c6d18fab4b5cff47084 to your computer and use it in GitHub Desktop.
Save ChristianHohlfeld/3ce7e4649e269c6d18fab4b5cff47084 to your computer and use it in GitHub Desktop.
Physics.h
//
// 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