PROTO::KLUDGE  0.1
Quick prototyping library for games using SDL and OpenGL.
StaticPlatform.hpp
Go to the documentation of this file.
1 #ifndef STATICPLATFORM_HPP
2 #define STATICPLATFORM_HPP
3 
4 #include <Box2D/Box2D.h>
5 
8 
9 namespace pk
10 {
11 
21 {
22  private:
28  public:
34  StaticPlatform(b2World* world, GLRect rect);
35 
36  virtual ~StaticPlatform();
37 
43  b2World* getWorld(){ return m_world; };
44 
45  private:
46  b2World* m_world;
47  b2BodyDef m_bodyDef;
48  b2PolygonShape m_shape;
49  b2FixtureDef m_fixtureDef;
50  b2Body* m_body;
52 };
53 
54 }
55 
56 #endif // STATICPLATFORM_HPP
b2World * getWorld()
Get a pointer to the Box2D world the static platform is tied to.
Definition: StaticPlatform.hpp:43
Definition: Game.hpp:7
StaticPlatform()
Default constructor - Inaccessible.
Definition: StaticPlatform.hpp:27
b2FixtureDef m_fixtureDef
A Box2D fixture definition structure.
Definition: StaticPlatform.hpp:49
GLRect m_rect
A GLRect structure.
Definition: StaticPlatform.hpp:51
b2PolygonShape m_shape
A Box2D polygon shape.
Definition: StaticPlatform.hpp:48
Definition: StaticPlatform.hpp:20
virtual ~StaticPlatform()
b2World * m_world
A pointer to the Box2D world.
Definition: StaticPlatform.hpp:43
Useful for defining size and origin of an OpenGL object.
Definition: GLTransformable.hpp:15
b2BodyDef m_bodyDef
A Box2D body definition structure.
Definition: StaticPlatform.hpp:47
b2Body * m_body
A Box2D body.
Definition: StaticPlatform.hpp:50