summaryrefslogtreecommitdiff
path: root/2d/softbody/softbody_1/damped.h
blob: 47ae0effce6ef6c9257c997562abc053aaba9df7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once
#include "../../../shared_cpp/types.h"

struct WebglContext;

namespace Damped {
    struct DampedInitVariables {
        float32 springLength = 150.f;
        float32 initialDisplacement = 10.f;
		float32 mass = 1.f;
		float32 k = 4.f;
		float32 c = 1.f;
    };

    void init(WebglContext* inContext);
    void setInitVariables(DampedInitVariables newVariables);
    DampedInitVariables getInitVariables();
}