BoundingBox
Debug node that renders an axis-aligned bounding box.
[BoundingBox](/reference/nodes/bounding_box)
is a visual helper used to display a wireframe box representing the spatial bounds of an object or region. It is commonly used for debugging, collision visualization, or spatial partitioning diagnostics.
The box is defined in local space using a [Box3](/reference/math/box3)
volume and rendered as lines in the specified color.
cpp
auto geometry = vglx::SphereGeometry::Create();
auto bounds = vglx::BoundingBox::Create(
geometry->BoundingBox(),
0xFFFFFF
);
scene->Add(bounds);
INFO
Derives from Node and inherits all public properties and methods.
Construction
Constructors
BoundingBox()
cpp
vglx::BoundingBox::BoundingBox(const Box3 &box, const Color &color)
Parameter | Description |
---|---|
box | Axis-aligned bounding box to visualize. |
color | Color used to render the bounding box lines. |
Constructs a BoundingBox object.
Factories preferred
BoundingBox::Create() auto
cpp
static auto vglx::BoundingBox::Create(const Box3 &box, const Color &color)
Parameter | Description |
---|---|
box | Axis-aligned bounding box to visualize. |
color | Color used to render the bounding box lines. |
Creates a shared pointer to a BoundingBox object.