aboutsummaryrefslogtreecommitdiff
path: root/Client/Source/Phy2DLite/Body.h
blob: 050c719b51cf4da8b833447dfdbebb1e38c16e0c (plain)
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
#pragma once

#include "Math.h"

namespace Phy2D
{

    struct Body
    {
        Body();
        void Set(const Vec2& w, number m);

        void AddForce(const Vec2& f)
        {
            force += f;
        }

        Vec2 position;
        number rotation;

        Vec2 velocity;
        number angularVelocity;

        Vec2 force;
        number torque;

        Vec2 width;

        number friction;
        number mass, invMass;
        number I, invI;
    };

}