]> git.tdb.fi Git - libs/game.git/blobdiff - examples/bassteroids/source/physics.h
Add rotation to physics simulation
[libs/game.git] / examples / bassteroids / source / physics.h
index a611789ebd1cfa9b16d2c15f1d841ec7b181de27..3d9d7081e7f540e7c7edebcd7f71220fc2ee8d22 100644 (file)
@@ -17,10 +17,13 @@ private:
        {
                Msp::Game::Handle<PhysicalEntity> entity;
                float inverse_mass = 1.0f;
+               float moment_of_inertia = 1.0f;
                Msp::LinAl::Vector<float, 2> external_force;
 
                Msp::LinAl::Vector<float, 2> position;
+               Msp::Geometry::Angle<float> rotation;
                Msp::LinAl::Vector<float, 2> velocity;
+               Msp::Geometry::Angle<float> angular_velocity;
 
                unsigned collision_count;
                Msp::LinAl::Vector<float, 2> position_adjust;
@@ -63,6 +66,7 @@ private:
 
        Collision &get_collision(unsigned, unsigned);
        void collide_circle_circle(unsigned, unsigned);
+       void collide_circle_box(unsigned, unsigned);
 };
 
 #endif