Skip to content

BoundingSphere

Visual debug helper that renders the bounds of a spherical volume.

BoundingSphere displays a wireframe sphere representing the extents of a Sphere. It is useful for inspecting spatial queries, validating geometry bounds, or visualizing collision volumes. The sphere is rendered as a simple line mesh colored as specified.

cpp
auto geometry = vglx::BoxGeometry::Create();
my_scene->Add(vglx::BoundingSphere::Create(
  geometry->BoundingSphere(),
  0xFF0000
));

INFO

Derives from Node and inherits all public properties and methods.

Construction

Constructors


BoundingSphere()

Constructs a bounding-sphere debug node.

cpp
BoundingSphere::BoundingSphere(const Sphere& sphere, const Color& color);
ParameterDescription
sphereSpherical bounds to visualize.
colorLine color used for rendering the wireframe sphere.

Factories preferred


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

Creates an instance of BoundingSphere.

cpp
static std::unique_ptr<BoundingSphere> BoundingSphere::Create(const Sphere& sphere, const Color& color);
ParameterDescription
sphereSpherical bounds to visualize.
colorLine color used for rendering.

Released under the MIT License.