Physics working

This commit is contained in:
Confideo-IOM
2026-08-24 20:59:24 +01:00
parent 20c0794d10
commit 1253571c17
146 changed files with 4469 additions and 1273 deletions
@@ -0,0 +1,41 @@
#ifndef HYDRAINITIALISEPHYSICSWORLDTASK
#define HYDRAINITIALISEPHYSICSWORLDTASK
#include "../HydraTask.h"
#include "../../engine/HydraEngine.h"
#include "../../renderer/HydraRenderer.h"
#include <GLMIncludes.h>
#include "../../GlewIncludes.h"
#include "../../buffer/HydraTextureBufferManager.h"
#include <box3d/box3d.h>
class HydraInitialisePhysicsWorldTask : public HydraTask
{
private:
b3WorldId* m_world_id = nullptr;
protected:
public:
void Process() override
{
b3WorldDef world_def = b3DefaultWorldDef();
world_def.workerCount = 1;
world_def.enableSleep = true;
*m_world_id = b3CreateWorld( &world_def );
b3World_SetContactRecycleDistance(*m_world_id, 0.05f);
}
void Initialise(b3WorldId *world_id)
{
m_world_id = world_id;
}
};
#endif /* HYDRAINITIALISEPHYSICSWORLDTASK */