GCubeSDK
©2026 FenixFox®Studios

BoxHelper

BoxHelper ⟵ LineObject3D

Helper object to graphically show the world-axis-aligned bounding box around an object.
BoxHelper creates a wireframe box that encases the passed object. This is useful for debugging and visualizing the bounding volume of 3D objects. The actual bounding box calculation is handled internally, this is just a visual helper. Works with any Object3D that has BufferGeometry.

Methods

BoxHelper()

Default constructor - creates empty box helper

BoxHelper(Object3D* object, Color color)

Constructor with object and color

object Object3D to show bounding box for nullptr
color Hexadecimal color for the wireframe 0xffff00

virtual Object3D* clone(bool recursive = true) const override

Creates a copy of this object

recursive Whether to clone children

virtual void copy(const Object3D& object, bool recursive = true) override

Copies properties from another object

object Source
recursive Copy children too

void update()

Updates the helper's geometry to match the dimensions of the object

void setFromObject(Object3D* object)

Updates the wireframe box for the passed object

object Object3D to create the helper of

void setColor(Color color)

Sets the color of the wireframe box

color Hexadecimal color value

Color getColor() const

Gets the current color of the wireframe box

Properties

color Color Wireframe color
enabled bool Active/inactive
id u32 Unique identifier
isBoxHelper bool Read-only tag
name std::string Optional display name
object Object3D* Target object being visualized
uuid std::string UUID string
version u32 Bumps on change