Skip to content

File physics_engine.hpp

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

Go to the documentation of this file

#pragma once
#include <core/core.hpp>
#include <physics/jolt-cpp/jolt_components.hpp>
#include <physics/physics_3d/jolt/jolt_context.hpp>
#include <physics/physics_3d/physics_api.hpp>

namespace atlas::physics {

    class physics_engine {
    public:
        // Required by maps but should not be used in anyother circumstance.
        physics_engine() = default;
        physics_engine(const jolt_settings& p_settings,
                       const ref<physics_context>& p_engine,
                       const ref<physics_api>& p_user_api);

        void start_runtime();

        void physics_step();

        void stop_runtime();

        void run_contact_add();

    private:
        jolt_settings m_settings;
        ref<physics_context> m_engine_api;
        ref<physics_api> m_backend_api;
    };
};