13 _instances.push_back(
this);
18 std::erase(_instances,
this);
29 if (
const auto* render =
entity()->findComponent<RenderComponent>(); render && !render->meshInstances().empty()) {
30 bool hasBounds =
false;
32 for (
auto* meshInstance : render->meshInstances()) {
41 merged.
add(worldAabb);
Axis-Aligned Bounding Box defined by center and half-extents.
void add(const BoundingBox &other)
const Vector3 & center() const
const Vector3 & halfExtents() const
Bounding sphere defined by center and radius for intersection and containment tests.
BoundingSphere worldBounds() const
~CollisionComponent() override
CollisionComponent(IComponentSystem *system, Entity *entity)
Component(IComponentSystem *system, Entity *entity)
IComponentSystem * system() const
ECS entity — a GraphNode that hosts components defining its behavior.
3D vector for positions, directions, and normals with multi-backend SIMD acceleration.