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({
  .box = geometry->BoundingBox(),
  .color = 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 Parameters& params);
ParameterDescription
paramsInitialization parameters for constructing the bounding box.

Factories preferred


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

Creates an instance of BoundingBox.

cpp
static std::unique_ptr<BoundingBox> BoundingBox::Create(const Parameters& params);
ParameterDescription
paramsInitialization parameters for constructing the bounding box.

Types

BoundingBox::Parameters struct

Parameters for constructing a BoundingBox object.

ParameterDescription
box Box3Axis-aligned bounds to visualize.
color ColorLine color used for rendering the box.

Released under the MIT License.