Files
HydraV3/HydraEngine/source/task/physics/HydraSetPhysicsLinearVelocity.hpp
2026-08-25 22:10:54 +01:00

32 lines
805 B
C++

#ifndef HYDRASETPHYSICSLINEARVELOCITY
#define HYDRASETPHYSICSLINEARVELOCITY
#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 HydraSetPhysicsLinearVelocity : public HydraTask
{
private:
b3BodyId m_body_id = {};
glm::vec3 m_velocity = {};
protected:
public:
void Process() override
{
b3Vec3 velocity = {m_velocity.x, m_velocity.y, m_velocity.z};
b3Body_SetLinearVelocity(m_body_id, velocity);
}
void Initialise(b3BodyId body_id, glm::vec3 velocity)
{
m_body_id = body_id;
m_velocity = velocity;
}
};
#endif /* HYDRASETPHYSICSLINEARVELOCITY */