BoundingPlane
Debug node that renders a bounding plane.
BoundingPlane 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()
Constructs a BoundingPlane object.
cpp
BoundingPlane::BoundingPlane(const Plane& plane, float size, const Color& color);| Parameter | Description |
|---|---|
| plane | Plane definition in 3D space. |
| size | Length of the plane's rendered square region. |
| color | Color used to render the plane. |
Factories preferred
BoundingPlane::Create() auto
Creates a shared pointer to a BoundingPlane object.
cpp
static auto BoundingPlane::Create(const Plane& plane, float size, const Color& color);| Parameter | Description |
|---|---|
| plane | Plane definition in 3D space. |
| size | Length of the plane's rendered square region. |
| color | Color used to render the plane. |