GPU instancing for rendering lines as connected box segments. More...
| Import Statement: | import Clayground.Canvas3D |
LineInstancing provides efficient rendering of lines by using GPU instancing. Each line segment between consecutive positions is rendered as an instance of a base geometry (typically a cube), automatically transformed to connect the points.
This is used internally by the BoxLine3D component for rendering thick, visible lines in 3D space.
Example usage:
import QtQuick3D import Clayground.Canvas3D Model { source: "#Cube" instancing: LineInstancing { positions: [ Qt.vector3d(0, 0, 0), Qt.vector3d(100, 50, 0), Qt.vector3d(200, 0, 0) ] width: 5.0 color: "red" } materials: DefaultMaterial { } }
See also BoxLine3D.
color : color |
The color applied to all line segment instances.
Defaults to blue.
positions : list<vector3d> |
List of 3D positions defining the line path.
Each consecutive pair of positions defines a line segment. The instancing system creates transformed instances to connect all points.
width : real |
The width of the line segments in world units.
Controls the thickness of each box-shaped line segment. Defaults to 0.1.