Cogs.Core
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Cogs::Core::Bounds Class Reference

Utility class for bounds calculation of Scene / Entity. More...

#include <GetBounds.h>

Public Member Functions

COGSCORE_DLL_API void addBoundsExtension (IGetBounds *bounds)
 
COGSCORE_DLL_API void removeBoundsExtension (IGetBounds *bounds)
 De-register bounds calculation.
 
std::span< IGetBounds * > getExtensions ()
 Gets registered extensions.
 
Cogs::Geometry::BoundingBox getSceneBounds (Context *context, RenderLayers layerMask=RenderLayers::AllStandard)
 
void getSceneBounds (Context *context, float *values, RenderLayers layerMask=RenderLayers::AllStandard)
 
void getClipPlanes (Context *context, float &nearDist, float &farDist, const CameraComponent &cameraComponent, const glm::mat4 &viewMatrix)
 

Static Public Member Functions

static COGSCORE_DLL_API Cogs::Geometry::BoundingBox getBounds (Context *context, const ComponentModel::Entity *entity, bool ignoreVisibility=false)
 
static Cogs::Geometry::BoundingBox getTransformedBounds (const Cogs::Geometry::BoundingBox &bbox, const glm::mat4 &m)
 
static Cogs::Geometry::BoundingBox getTransformedBoundsWithDivision (const Cogs::Geometry::BoundingBox &bbox, const glm::mat4 &m)
 
static COGSCORE_DLL_API Cogs::Geometry::BoundingBox getBounds (Context *context, const EntityId id, bool ignoreVisibility=false)
 
static COGSCORE_DLL_API Cogs::Geometry::BoundingBox getBounds (Context *context, std::span< const EntityId > ids, bool ignoreVisibility=false)
 
static void getCameraDepthBounds (Context *context, float &depthBoundNear, float &depthBoundFar, const CameraComponent &cameraComponent)
 
static Cogs::Geometry::BoundingBox getShadowBounds (Context *context)
 

Private Attributes

std::vector< IGetBounds * > extensions
 

Detailed Description

Utility class for bounds calculation of Scene / Entity.

Definition at line 45 of file GetBounds.h.

Member Function Documentation

◆ addBoundsExtension()

void Cogs::Core::Bounds::addBoundsExtension ( IGetBounds bounds)

Use by extension to register Bounds calculations for Components in the extension. Registration should only be active when components in use.

Definition at line 895 of file GetBounds.cpp.

◆ getBounds() [1/3]

Cogs::Geometry::BoundingBox Cogs::Core::Bounds::getBounds ( Context context,
const ComponentModel::Entity entity,
bool  ignoreVisibility = false 
)
static

Definition at line 510 of file GetBounds.cpp.

◆ getBounds() [2/3]

Cogs::Geometry::BoundingBox Cogs::Core::Bounds::getBounds ( Context context,
const EntityId  id,
bool  ignoreVisibility = false 
)
static

Definition at line 539 of file GetBounds.cpp.

◆ getBounds() [3/3]

Cogs::Geometry::BoundingBox Cogs::Core::Bounds::getBounds ( Context context,
std::span< const EntityId >  ids,
bool  ignoreVisibility = false 
)
static

Definition at line 550 of file GetBounds.cpp.

◆ getCameraDepthBounds()

void Cogs::Core::Bounds::getCameraDepthBounds ( Context context,
float &  depthBoundNear,
float &  depthBoundFar,
const CameraComponent cameraComponent 
)
static

Definition at line 686 of file GetBounds.cpp.

◆ getClipPlanes()

void Cogs::Core::Bounds::getClipPlanes ( Context context,
float &  nearDist,
float &  farDist,
const CameraComponent cameraComponent,
const glm::mat4 &  viewMatrix 
)

Definition at line 627 of file GetBounds.cpp.

◆ getExtensions()

std::span< IGetBounds * > Cogs::Core::Bounds::getExtensions ( )
inline

Gets registered extensions.

Definition at line 72 of file GetBounds.h.

◆ getSceneBounds() [1/2]

void Cogs::Core::Bounds::getSceneBounds ( Context context,
float *  values,
RenderLayers  layerMask = RenderLayers::AllStandard 
)

Definition at line 621 of file GetBounds.cpp.

◆ getSceneBounds() [2/2]

Cogs::Geometry::BoundingBox Cogs::Core::Bounds::getSceneBounds ( Context context,
RenderLayers  layerMask = RenderLayers::AllStandard 
)

Definition at line 571 of file GetBounds.cpp.

◆ getShadowBounds()

Cogs::Geometry::BoundingBox Cogs::Core::Bounds::getShadowBounds ( Context context)
static

Definition at line 857 of file GetBounds.cpp.

◆ getTransformedBounds()

Cogs::Geometry::BoundingBox Cogs::Core::Bounds::getTransformedBounds ( const Cogs::Geometry::BoundingBox &  bbox,
const glm::mat4 &  m 
)
static

Definition at line 515 of file GetBounds.cpp.

◆ getTransformedBoundsWithDivision()

Cogs::Geometry::BoundingBox Cogs::Core::Bounds::getTransformedBoundsWithDivision ( const Cogs::Geometry::BoundingBox &  bbox,
const glm::mat4 &  m 
)
static

Definition at line 527 of file GetBounds.cpp.

◆ removeBoundsExtension()

void Cogs::Core::Bounds::removeBoundsExtension ( IGetBounds bounds)

De-register bounds calculation.

Definition at line 900 of file GetBounds.cpp.

Member Data Documentation

◆ extensions

std::vector<IGetBounds *> Cogs::Core::Bounds::extensions
private

Definition at line 79 of file GetBounds.h.


The documentation for this class was generated from the following files: