GCubeSDK
©2026 FenixFox®Studios

Line

Line ⟵ Object3D

A geometry class for rendering line segments using BufferGeometry.
Line creates a line geometry that renders connected vertices as line segments. This is useful for wireframes, paths, and other line-based rendering.

InheritanceDiagram node_AxesHelper AxesHelper node_Box3Helper Box3Helper node_BoxHelper BoxHelper node_GridHelper GridHelper node_Line Line node_Line->node_AxesHelper node_Line->node_Box3Helper node_Line->node_BoxHelper node_Line->node_GridHelper node_OctreeHelper OctreeHelper node_Line->node_OctreeHelper node_SphereHelper SphereHelper node_Line->node_SphereHelper node_Object3D Object3D node_Object3D->node_Line

Methods

Line()

Default constructor - creates empty line object

Line(BufferGeometry* geometry, Material* material)

Constructor with geometry and material

geometry BufferGeometry containing vertex positions nullptr
material Material for the line nullptr

virtual Object3D* clone(bool recursive) const override

Creates a copy of this object

recursive Whether to clone children true

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

Copies properties from another object

object Source
recursive Copy children too true

void setGeometry(BufferGeometry* geometry)

Sets the geometry for this line object

geometry BufferGeometry containing vertex positions

BufferGeometry* getGeometry() const

Gets the geometry of this line object

void render()

Renders this line object

void setMaterial(Material* material)

Sets the material for this line object

material Material to use for rendering

Material* getMaterial() const

Gets the material of this line object

void dispose()

Releases resources (CPU/GPU)

void updateGXState()

Updates GX state for line rendering

void setupGXLight()

Sets up GX lighting for lines

Properties

isLine bool Read
name std Optional display name
id u32 Unique identifier
uuid std UUID string
enabled bool Active/inactive
version u32 Bumps on change
lineWidth u8 Width of lines in pixels
lineAdjust u8 Line width adjustment mode (GX_TO_ZERO, GX_TO_ONE)
geometry BufferGeometry * BufferGeometry containing vertex data
material Material * Material for rendering