![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Static helpers for AABB-based viewport culling. More...
#include <ViewportCulling.h>
Static Public Member Functions | |
| static bool | IsNodeVisible (float nodeX, float nodeY, float nodeW, float nodeH, const ViewRect &viewport, float margin=50.0f) |
| Tests whether a single node rectangle overlaps the viewport. | |
| static std::vector< int > | FilterVisibleNodes (const std::vector< std::pair< int, ViewRect > > &nodeRects, const ViewRect &viewport, float margin=50.0f) |
| Filters a list of (id, rect) pairs and returns only the visible IDs. | |
Static helpers for AABB-based viewport culling.
Typical usage:
Definition at line 54 of file ViewportCulling.h.
|
static |
Filters a list of (id, rect) pairs and returns only the visible IDs.
| nodeRects | List of (nodeId, ViewRect) pairs. |
| viewport | Current visible rectangle in graph space. |
| margin | Extra padding applied to the viewport before testing. |
Definition at line 48 of file ViewportCulling.cpp.
References GetComponentTypeID_Static(), and IsNodeVisible().
Here is the call graph for this function:
|
static |
Tests whether a single node rectangle overlaps the viewport.
| nodeX | Node left edge in graph space. |
| nodeY | Node top edge in graph space. |
| nodeW | Node width. |
| nodeH | Node height. |
| viewport | Current visible rectangle in graph space. |
| margin | Extra padding applied to the viewport before testing. |
Definition at line 18 of file ViewportCulling.cpp.
References GetComponentTypeID_Static(), Olympe::ViewRect::h, Olympe::ViewRect::w, Olympe::ViewRect::x, and Olympe::ViewRect::y.
Referenced by FilterVisibleNodes().
Here is the call graph for this function:
Here is the caller graph for this function: