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({
.sphere = geometry->BoundingSphere(),
.color = 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 Parameters& params);| Parameter | Description |
|---|---|
| params | Initialization parameters for constructing the bounding sphere. |
Factories preferred
BoundingSphere::Create() std::unique_ptr<BoundingSphere>
Creates an instance of BoundingSphere.
cpp
static std::unique_ptr<BoundingSphere> BoundingSphere::Create(const Parameters& params);| Parameter | Description |
|---|---|
| params | Initialization parameters for constructing the bounding sphere. |
Types
BoundingSphere::Parameters struct
Parameters for constructing a BoundingSphere object.
| Parameter | Description |
|---|---|
| sphere Sphere | Spherical bounds to visualize. |
| color Color | Line color used for rendering the wireframe sphere. |