Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
SpotLightSystem.cpp
Go to the documentation of this file.
1
2
4
7
8namespace Divide {
10 : PlatformContextComponent(context),
11 ECSSystem(parentEngine)
12 {
13 }
14
17
19
20 for (SpotLightComponent* comp : _componentCache) {
21 if (comp->_drawImpostor) {
22 IM::ConeDescriptor descriptor;
23 descriptor.root = comp->positionCache();
24 descriptor.direction = comp->directionCache();
25 descriptor.length = comp->range();
26 descriptor.radius = comp->outerConeRadius();
27 descriptor.colour = Util::ToByteColour(comp->getDiffuseColour());
28 descriptor.noCull = true;
29
30 context().gfx().debugDrawCone(comp->getGUID() + 0, descriptor);
31 }
32 }
33 }
34
35} //namespace Divide
#define PROFILE_SCOPE_AUTO(CATEGORY)
Definition: Profiler.h:87
vector< SpotLightComponent * > _componentCache
Definition: ECSSystem.h:92
void debugDrawCone(const I64 ID, IM::ConeDescriptor descriptor) noexcept
Definition: GFXDevice.cpp:2966
PlatformContext & context() noexcept
GFXDevice & gfx() noexcept
void PreUpdate(F32 dt) override
SpotLightSystem(ECS::ECSEngine &parentEngine, PlatformContext &context)
constexpr Optick::Category::Type Scene
Definition: Profiler.h:66
UColour4 ToByteColour(const FColour4 &floatColour) noexcept
Definition: MathHelper.cpp:256
Handle console commands that start with a forward slash.
Definition: AIProcessor.cpp:7