BoundingSphere
Debug node that renders a bounding sphere.
BoundingSphere is a visual helper used to display a wireframe sphere representing the spatial bounds of an object or volume. It is primarily used for debugging, spatial queries, or visibility testing.
The sphere is defined in local space using a Sphere object and rendered as a wireframe in the specified color.
cpp
auto geometry = vglx::BoxGeometry::Create();
auto bounds = vglx::BoundingSphere::Create(
geometry->BoundingSphere(),
0xFF0000
);
scene->Add(bounds);INFO
Derives from Node and inherits all public properties and methods.
Construction
Constructors
BoundingSphere()
Constructs a BoundingSphere object.
cpp
BoundingSphere::BoundingSphere(const Sphere& sphere, const Color& color);| Parameter | Description |
|---|---|
| sphere | Bounding sphere to visualize. |
| color | Color used to render the bounding sphere. |
Factories preferred
BoundingSphere::Create() auto
Creates a shared pointer to a BoundingSphere object.
cpp
static auto BoundingSphere::Create(const Sphere& sphere, const Color& color);| Parameter | Description |
|---|---|
| sphere | Bounding sphere to visualize. |
| color | Color used to render the bounding sphere. |