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,38 @@
#ifndef HYDRASETPHYSICSTRANSFORM
#define HYDRASETPHYSICSTRANSFORM
#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 HydraSetPhysicsTransform : public HydraTask
{
private:
b3BodyId m_body_id = {};
glm::vec3 m_position = {};
glm::quat m_rotation = {};
protected:
public:
void Process() override
{
b3Vec3 position = {m_position.x, m_position.y, m_position.z};
b3Quat rotation = {m_rotation.x, m_rotation.y, m_rotation.z, m_rotation.w};
b3Body_SetTransform(m_body_id, position, rotation);
}
void Initialise(b3BodyId body_id, glm::vec3 position, glm::quat rotation)
{
m_body_id = body_id;
m_position = position;
m_rotation = rotation;
}
};
#endif /* HYDRASETPHYSICSTRANSFORM */