entttree 0.1.0
Hierarchical entity management for EnTT
Loading...
Searching...
No Matches
bounding_hierarchy.h File Reference

Hierarchical bounding volume system with lazy recomputation. More...

#include <type_traits>
#include <geomc/shape/Transformed.h>
#include <entttree/transform_hierarchy.h>

Go to the source code of this file.

Classes

struct  entttree::BoundsSystem< HTag, T, N, BTag, XTag >
 A system for maintaining hierarchical bounding boxes. More...
 

Typedefs

template<typename HTag , typename BTag = HTag, typename XTag = HTag>
using entttree::BoundsSystem2d = BoundsSystem< HTag, double, 2, BTag, XTag >
 
template<typename HTag , typename BTag = HTag, typename XTag = HTag>
using entttree::BoundsSystem3d = BoundsSystem< HTag, double, 3, BTag, XTag >
 

Functions

template<typename BTag = void, typename HTag , typename T , size_t N, typename XTag >
auto entttree::add_bounds (entt::registry &reg, TransformSystem< HTag, T, N, XTag > &transforms)
 Construct a BoundsSystem with deduced types from a TransformSystem.
 

Detailed Description

Hierarchical bounding volume system with lazy recomputation.

Definition in file bounding_hierarchy.h.

Typedef Documentation

◆ BoundsSystem2d

template<typename HTag , typename BTag = HTag, typename XTag = HTag>
using entttree::BoundsSystem2d = typedef BoundsSystem<HTag, double, 2, BTag, XTag>

Definition at line 478 of file bounding_hierarchy.h.

◆ BoundsSystem3d

template<typename HTag , typename BTag = HTag, typename XTag = HTag>
using entttree::BoundsSystem3d = typedef BoundsSystem<HTag, double, 3, BTag, XTag>

Definition at line 481 of file bounding_hierarchy.h.

Function Documentation

◆ add_bounds()

template<typename BTag = void, typename HTag , typename T , size_t N, typename XTag >
auto entttree::add_bounds ( entt::registry &  reg,
TransformSystem< HTag, T, N, XTag > &  transforms 
)

Construct a BoundsSystem with deduced types from a TransformSystem.

Easy path: auto bs = add_bounds(reg, transforms);

Layered path: auto bs = add_bounds<RenderBounds>(reg, transforms);

Template Parameters
BTagBounds-layer tag. Defaults to the hierarchy tag when omitted.
HTagHierarchy tag (deduced from transforms).
TScalar type (deduced from transforms).
NSpatial dimension (deduced from transforms).
XTagTransform-layer tag observed by this bounds system (deduced).

Definition at line 468 of file bounding_hierarchy.h.

References entttree::add_bounds().

Referenced by entttree::add_bounds().