mirror of
https://github.com/barkeser2002/flower.git
synced 2026-09-25 20:56:34 +03:00
21 lines
605 B
C++
21 lines
605 B
C++
#include "Pch.h"
|
|
#include "../Detail.h"
|
|
#include "DrawComponent.h"
|
|
|
|
using namespace Flower;
|
|
using namespace Flower::UI;
|
|
|
|
void ComponentDrawer::drawSpotLight(std::shared_ptr<SceneNode> node)
|
|
{
|
|
std::shared_ptr<SpotLightComponent> comp = node->getComponent<SpotLightComponent>();
|
|
|
|
drawLight(comp);
|
|
|
|
ImGui::Separator();
|
|
|
|
ImGui::Checkbox("Cast Shadow", &comp->bCastShadow);
|
|
|
|
ImGui::DragFloat("Inner Cone", &comp->innerCone, 0.1, 0.0, comp->outerCone);
|
|
ImGui::DragFloat("Outer Cone", &comp->outerCone, 0.1, comp->innerCone, glm::pi<float>() * 0.5f);
|
|
ImGui::DragFloat("Range", &comp->range, 1.0f, 0.0f);
|
|
} |