[WIP] Transform Gizmo
This commit is contained in:
parent
ec6772657f
commit
3a3f7efb29
|
@ -0,0 +1,24 @@
|
|||
#include "SHpch.h"
|
||||
#include "SHTransformGizmo.h"
|
||||
|
||||
#include "ECS_Base/Managers/SHComponentManager.h"
|
||||
#include "ECS_Base/Managers/SHSystemManager.h"
|
||||
#include "Editor/SHEditor.hpp"
|
||||
|
||||
namespace SHADE
|
||||
{
|
||||
void SHTransformGizmo::Draw()
|
||||
{
|
||||
if(selectedEntityTranformComponent == nullptr)
|
||||
{
|
||||
SHEditor* editor = SHSystemManager::GetSystem<SHEditor>();
|
||||
if(editor->selectedEntities.empty())
|
||||
return;
|
||||
EntityID eid = editor->selectedEntities.back();
|
||||
selectedEntityTranformComponent = SHComponentManager::GetComponent_s<SHTransformComponent>(eid);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
#pragma once
|
||||
#include "Math/Transform/SHTransformComponent.h"
|
||||
|
||||
namespace SHADE
|
||||
{
|
||||
class SHTransformGizmo
|
||||
{
|
||||
public:
|
||||
void Draw();
|
||||
private:
|
||||
SHTransformComponent* selectedEntityTranformComponent{nullptr};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue