4#include "Components/Core/RenderComponent.h"
6#include "Foundation/Geometry/BoundingBox.hpp"
16 class CameraComponent;
48 [[nodiscard]] COGSCORE_DLL_API
static Cogs::Geometry::BoundingBox getBounds(
Context * context,
const ComponentModel::Entity * entity,
bool ignoreVisibility =
false);
50 [[nodiscard]]
static Cogs::Geometry::BoundingBox getTransformedBounds(
const Cogs::Geometry::BoundingBox& bbox,
const glm::mat4 & m);
51 [[nodiscard]]
static Cogs::Geometry::BoundingBox getTransformedBoundsWithDivision(
const Cogs::Geometry::BoundingBox& bbox,
const glm::mat4 & m);
53 COGSCORE_DLL_API [[nodiscard]]
static Cogs::Geometry::BoundingBox getBounds(
Context * context,
const EntityId
id,
bool ignoreVisibility =
false);
54 COGSCORE_DLL_API [[nodiscard]]
static Cogs::Geometry::BoundingBox getBounds(
Context* context, std::span<const EntityId> ids,
bool ignoreVisibility =
false);
57 static void getCameraDepthBounds(
Context* context,
58 float& depthBoundNear,
62 [[nodiscard]]
static Cogs::Geometry::BoundingBox getShadowBounds(
Context* context);
72 [[nodiscard]] std::span<IGetBounds*>
getExtensions() {
return extensions; }
74 [[nodiscard]] Cogs::Geometry::BoundingBox getSceneBounds(
Context* context,
RenderLayers layerMask = RenderLayers::AllStandard);
75 void getSceneBounds(
Context * context,
float * values,
RenderLayers layerMask = RenderLayers::AllStandard);
76 void getClipPlanes(
Context* context,
float& nearDist,
float& farDist,
const CameraComponent & cameraComponent,
const glm::mat4 & viewMatrix);
79 std::vector<IGetBounds *> extensions;
Container for components, providing composition of dynamic entities.
Utility class for bounds calculation of Scene / Entity.
COGSCORE_DLL_API void removeBoundsExtension(IGetBounds *bounds)
De-register bounds calculation.
COGSCORE_DLL_API void addBoundsExtension(IGetBounds *bounds)
std::span< IGetBounds * > getExtensions()
Gets registered extensions.
A Context instance contains all the services, systems and runtime components needed to use Cogs.
virtual void getBounds(Context *context, Cogs::Geometry::BoundingBox &bounds)=0
Expand bounds including bounds of all entities in this system in world coordinates.
virtual bool getBounds(Context *, const ComponentModel::Entity *, Cogs::Geometry::BoundingBox &, bool) const
virtual void getBounds(Context *context, Cogs::Geometry::BoundingBox &bounds, float &)
RenderLayers
Contains common render layers.
Contains all Cogs related functionality.