From 410a072c3862481f729c293402ddd49c5ae98769 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Thu, 24 Jun 2021 13:49:23 -0400 Subject: (mkosarek) Decent enough discussion of 2d rotational forces --- 2d/rigidbody/rigidbody_2/snippet1.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 2d/rigidbody/rigidbody_2/snippet1.cpp (limited to '2d/rigidbody/rigidbody_2/snippet1.cpp') 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; + ... +} -- cgit v1.2.1