Skip to content

BoundingPlane

Debug node that renders a bounding plane.

[BoundingPlane](/reference/nodes/bounding_plane) is a visual helper used to display an infinite mathematical plane as a finite square region in the scene. This is particularly useful for visualizing clipping planes, frustum culling boundaries, or geometry intersections during debugging.

The plane is rendered as a flat square centered around the origin of the plane, oriented using the plane’s normal vector, and scaled based on the specified size.

cpp
auto plane = vglx::Plane {Vector3::Forward(), 0.0f};
auto bounds = vglx::BoundingPlane::Create(plane, 2, 0xFF0000);
scene->Add(bounds);

INFO

Derives from Node and inherits all public properties and methods.

Construction

Constructors


BoundingPlane()

cpp
vglx::BoundingPlane::BoundingPlane(const Plane &plane, float size, const Color &color)
ParameterDescription
planePlane definition in 3D space.
sizeLength of the plane's rendered square region.
colorColor used to render the plane.

Constructs a BoundingPlane object.

Factories preferred


BoundingPlane::Create() auto

cpp
static auto vglx::BoundingPlane::Create(const Plane &plane, float size, const Color &color)
ParameterDescription
planePlane definition in 3D space.
sizeLength of the plane's rendered square region.
colorColor used to render the plane.

Creates a shared pointer to a BoundingPlane object.

Released under the MIT License.