1#include "Foundation/Logging/Logger.h"
3#include "Systems/Core/TransformSystem.h"
5#include "Image360System.h"
9 using namespace Cogs::Core::Image360;
15 if (!ignoreVisibility && !im360Comp.
isVisible())
return false;
18 const glm::vec3 pos = context->transformSystem->getLocalToWorld(trComp)[3];
19 bounds.min = glm::min(bounds.min, pos - data.config.extent);
20 bounds.max = glm::max(bounds.max, pos + data.config.extent);
30Cogs::Core::Image360::Bounds::Bounds(
Image360System* im360System) : im360System(im360System) {}
36 const Image360Data& data = im360System->getData(&im360Comp);
37 ::getBounds(context, im360Comp, data, bounds,
false);
45 const Image360Data& data = im360System->getData(im360Comp);
46 return ::getBounds(context, *im360Comp, data, bounds, ignoreVisibility);
ComponentType * getComponent() const
Container for components, providing composition of dynamic entities.
T * getComponent() const
Get a pointer to the first component implementing the given type in the entity.
ComponentPool< ComponentType > pool
Pool of components managed by the system.
A Context instance contains all the services, systems and runtime components needed to use Cogs.
constexpr bool isVisible() const
Check if the entity is visible or not.
Log implementation class.
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
constexpr Log getLogger(const char(&name)[LEN]) noexcept
void getBounds(Context *context, Cogs::Geometry::BoundingBox &bounds) override
Expand bounds including bounds of all entities in this system in world coordinates.