Skip to content

BoundingBox

Visual debug helper that renders the axis-aligned bounds of an object.

BoundingBox displays a wireframe box representing the extents of a Box3 volume. It is intended for debugging spatial queries, culling behavior, and validating geometry bounds. The box is rendered as a simple line mesh in the color provided.

cpp
auto geometry = vglx::SphereGeometry::Create();
my_scene->Add(vglx::BoundingBox::Create(
  geometry->BoundingBox(),
  0xFFFFFF
));

INFO

Derives from Node and inherits all public properties and methods.

Construction

Constructors


BoundingBox()

Constructs a bounding box debug node.

cpp
BoundingBox::BoundingBox(const Box3& box, const Color& color);
ParameterDescription
boxAxis-aligned bounds to visualize.
colorLine color used for rendering the box.

Factories preferred


BoundingBox::Create() std::unique_ptr<BoundingBox>

Creates an instance of BoundingBox.

cpp
static std::unique_ptr<BoundingBox> BoundingBox::Create(const Box3& box, const Color& color);
ParameterDescription
boxAxis-aligned bounds to visualize.
colorLine color used for rendering the box.

Released under the MIT License.