-
Notifications
You must be signed in to change notification settings - Fork 1
/
physBody.h
36 lines (25 loc) · 878 Bytes
/
physBody.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
#ifndef PHYSBODY_H
#define PHYSBODY_H
#include "chipmunk/chipmunk_private.h"
#include "defines.h"
typedef struct
{
cpBody* body;
cpShape* shape;
//float w, h;
bool isGrounded;
/*cpVect pos;
cpVect center;*/
} SPhysBody;
SPhysBody* PhysBodyCreateBox (cpSpace* space,
float mass, float radius, float friction, cpFloat moment,
float x, float y,
float w, float h);
SPhysBody* PhysBodyCreateCircle (cpSpace* space,
float mass, float radius, float friction,
float x, float y);
void PhysBodyDestroy (SPhysBody** physBody);
void PhysBodyUpdateState (SPhysBody* physBody);
void PhysBodyUpdateParameters (SPhysBody* physBody);
#endif // PHYSBODY_H