diff options
| author | Matthew Kosarek <mattkae@protonmail.com> | 2021-06-24 13:49:23 -0400 |
|---|---|---|
| committer | Matthew Kosarek <mattkae@protonmail.com> | 2021-06-24 13:49:23 -0400 |
| commit | 410a072c3862481f729c293402ddd49c5ae98769 (patch) | |
| tree | 6fbd4b31b355cd0228bd790415762b446dcd4ab3 /2d/rigidbody/rigidbody_2/snippet1.cpp | |
| parent | 0f1275d7ba1a7e3ad838423c15d78e23c960f80e (diff) | |
(mkosarek) Decent enough discussion of 2d rotational forces
Diffstat (limited to '2d/rigidbody/rigidbody_2/snippet1.cpp')
| -rw-r--r-- | 2d/rigidbody/rigidbody_2/snippet1.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/2d/rigidbody/rigidbody_2/snippet1.cpp b/2d/rigidbody/rigidbody_2/snippet1.cpp new file mode 100644 index 0000000..fbc7bf1 --- /dev/null +++ b/2d/rigidbody/rigidbody_2/snippet1.cpp @@ -0,0 +1,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; + ... +} |
