36 lines
936 B
C++
36 lines
936 B
C++
#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 */
|