picogl.core.vertex_attributes

Classes

VertexAttributes

Container for per-vertex geometric attributes.

Module Contents

class picogl.core.vertex_attributes.VertexAttributes[source]

Container for per-vertex geometric attributes.

Typically returned by geometry generation, analysis, or processing functions. Provides a clean, strongly-typed interface for positions, normals, and colors.

positions[source]

(N, 3) float32 array of vertex positions

normals[source]

(N, 3) float32 array of vertex normals

colors[source]

(N, 3) float32 array of RGB vertex colors (0-1 range)

positions: numpy.ndarray[source]
normals: numpy.ndarray[source]
colors: numpy.ndarray[source]
property vertex_count: int[source]

Number of vertices.

to_mesh_data(indices: numpy.ndarray | None = None, texcoords: numpy.ndarray | None = None) → picogl.renderer.MeshData[source]

Convert to MeshData for rendering.