Files
HydraV3/HydraEngine/source/task/physics/HydraSetWorldTransformTask.hpp
T

36 lines
936 B
C++
Raw Normal View History

2026-08-24 20:59:24 +01:00
#ifndef HYDRASETWORLDTRANSFORMTASK
#define HYDRASETWORLDTRANSFORMTASK
#include "../HydraTask.h"
#include "../../engine/HydraEngine.h"
#include "../../renderer/HydraRenderer.h"
#include <GLMIncludes.h>
#include "../../GlewIncludes.h"
#include "../../buffer/HydraTextureBufferManager.h"
#include "../../actor/HydraActorManager.h"
#include <box3d/box3d.h>
class HydraSetWorldTransformTask : public HydraTask
{
private:
HydraID m_entity_id = INVALID_HYDRA_ID;
glm::dvec3 m_position = {};
glm::vec3 m_rotation = {};
protected:
public:
void Process() override
{
GetEngine()->ActorManager()->SetPositionAndOrientation(m_entity_id, m_position, m_rotation, true);
}
void Initialise(HydraID entity_id, glm::dvec3 position, glm::vec3 rotation)
{
m_entity_id = entity_id;
m_position = position;
m_rotation = rotation;
}
};
#endif /* HYDRASETWORLDTRANSFORMTASK */