summaryrefslogtreecommitdiff
path: root/2d/rigidbody/rigidbody_2/snippet1.cpp
blob: fbc7bf1c862158209d3dd4e73455f61cfc2db01a (plain)
1
2
3
4
5
6
7
8
9
10
11
12

struct Rigidbody {
    int32 numImpulses = 0;
    Impulse activeImpulses[NUM_IMPULSES];
    Vector2 velocity = { 0, 0 };
    Vector2 position = { 0, 0 };
    float32 mass = 1.f;
    float32 rotationalVelocity = 0.f;
    float32 rotation = 0.f;
    float32 momentOfInertia = 1.f;
    ...
}