picogl.core.geometry
Pure geometry helpers.
Submodules
Attributes
Classes
Parameters controlling sphere mesh generation. |
|
Build origin-centered sphere geometry from a |
Functions
|
Vertices on one latitude circle of a sphere centered at the origin. |
|
Yield longitude angles for each slice (including closure vertex). |
|
Latitude in radians for stack index |
Package Contents
- class picogl.core.geometry.SphereGeometrySpec[source]
Parameters controlling sphere mesh generation.
This is configuration only: it does not build geometry. Pass an instance to
SphereMesh.
- class picogl.core.geometry.SphereMesh(spec: SphereGeometrySpec)[source]
Build origin-centered sphere geometry from a
SphereGeometrySpec.Derived vertex and index counts live here so the spec stays parameters only.
build()returns colorlessMeshArrays.- spec
- build() picogl.renderer.mesh_arrays.MeshArrays[source]
Build a sphere template centered at the origin.
- Returns:
Positions, normals, and indices with no colors
- picogl.core.geometry.generate_ring(radius: float, latitude: float, slices: int) list[picogl.core.vec3.Vec3][source]
Vertices on one latitude circle of a sphere centered at the origin.
- picogl.core.geometry.iter_longitudes(slices: int) collections.abc.Iterator[float][source]
Yield longitude angles for each slice (including closure vertex).