Skip to content

BoundingPlane ​

Visual debug helper that renders a finite preview of an infinite plane.

BoundingPlane draws a square region aligned with the given Plane. Since mathematical planes extend infinitely, this helper renders a finite, centered patch of configurable size, useful for visualizing clipping planes, ground planes, or intersection tests during debugging. The patch is drawn as a simple wireframe in the color provided.

cpp
my_scene->Add(vglx::BoundingPlane::Create({
  .plane = vglx::Plane {vglx::Vector3::UnitZ(), 0.0f},
  .size = 2.0f,
  .color = 0xFF0000u
}));

INFO

Derives from Node and inherits all public properties and methods.

Construction ​

Constructors ​


BoundingPlane() ​

Constructs a bounding plane debug node.

cpp
BoundingPlane::BoundingPlane(const Parameters& params);
ParameterDescription
paramsInitialization parameters for constructing the bounding plane.

Factories preferred ​


BoundingPlane::Create() std::unique_ptr<BoundingPlane> ​

Creates an instance of BoundingPlane.

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

Types ​

BoundingPlane::Parameters struct ​

Parameters for constructing a BoundingPlane object.

ParameterDescription
plane PlaneInfinite geometric plane to visualize.
size floatExtent of the rendered square patch, measured from center to edge.
color ColorLine color used to draw the patch.

Released under the MIT License.