Skip to content

File physics_context.hpp

File List > atlas > physics > physics_3d > physics_context.hpp

Go to the documentation of this file

#pragma once
namespace atlas::physics {
    class physics_context {
    public:
        // Pass through function to allow private virtual functions to be called
        // publically without messing up the virtual table.
        void create_bodies();
        void clean_bodies();
        void run_physics_step();
        void contact_added_event();

        virtual ~physics_context() = default;

    private:
        virtual void engine_create_physics_bodies() = 0;
        virtual void engine_clean_physics_bodies() = 0;
        virtual void engine_run_physics_step() = 0;
        virtual void engine_run_contact_added() = 0;
    };
};