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
6
#include "
graphics/GLTransformable.hpp
"
7
#include "
physics/PhysicsHelpers.hpp
"
8
9
namespace
pk
10
{
11
20
class
StaticPlatform
21
{
22
private
:
27
StaticPlatform
(){};
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
;
51
GLRect
m_rect
;
52
};
53
54
}
55
56
#endif // STATICPLATFORM_HPP
pk::StaticPlatform::getWorld
b2World * getWorld()
Get a pointer to the Box2D world the static platform is tied to.
Definition:
StaticPlatform.hpp:43
pk
Definition:
Game.hpp:7
PhysicsHelpers.hpp
pk::StaticPlatform::StaticPlatform
StaticPlatform()
Default constructor - Inaccessible.
Definition:
StaticPlatform.hpp:27
pk::StaticPlatform::m_fixtureDef
b2FixtureDef m_fixtureDef
A Box2D fixture definition structure.
Definition:
StaticPlatform.hpp:49
pk::StaticPlatform::m_rect
GLRect m_rect
A GLRect structure.
Definition:
StaticPlatform.hpp:51
pk::StaticPlatform::m_shape
b2PolygonShape m_shape
A Box2D polygon shape.
Definition:
StaticPlatform.hpp:48
pk::StaticPlatform
Definition:
StaticPlatform.hpp:20
GLTransformable.hpp
pk::StaticPlatform::~StaticPlatform
virtual ~StaticPlatform()
pk::StaticPlatform::m_world
b2World * m_world
A pointer to the Box2D world.
Definition:
StaticPlatform.hpp:43
pk::GLRect
Useful for defining size and origin of an OpenGL object.
Definition:
GLTransformable.hpp:15
pk::StaticPlatform::m_bodyDef
b2BodyDef m_bodyDef
A Box2D body definition structure.
Definition:
StaticPlatform.hpp:47
pk::StaticPlatform::m_body
b2Body * m_body
A Box2D body.
Definition:
StaticPlatform.hpp:50
include
physics
StaticPlatform.hpp
Generated on Sun Dec 1 2019 17:04:23 for PROTO::KLUDGE by
1.8.14