Aabb

Aabb

  • center : glam::Vec3A
  • half_extents : glam::Vec3A

Description

An axis-aligned bounding box, defined by:

  • a center,
  • the distances from the center to each faces along the axis, the faces are orthogonal to the axis.

It is typically used as a component on an entity to represent the local space occupied by this entity, with faces orthogonal to its local axis.

This component is notably used during "frustum culling", a process to determine if an entity should be rendered by a Camera if its bounding box intersects with the camera's [Frustum].

It will be added automatically by the systems in CalculateBounds to entities that:

  • could be subject to frustum culling, for example with a Mesh3d or Sprite component,
  • don't have the NoFrustumCulling component.

It won't be updated automatically if the space occupied by the entity changes, for example if the vertex positions of a Mesh3d are updated.

Functions