Skip to main content

Module geometry3d

Module geometry3d 

Source
Expand description

Parametric 3D Geometry Generators: Box, Sphere, Plane, Cylinder, and Custom Buffers.

Structs§

MeshBuffers
Generated GPU mesh buffers (interleaved vertices and index list).
Vertex3D
An interleaved 3D vertex with position, normal, and UV coordinates.

Constants§

TEXTURED_VERTEX_STRIDE
Interleaved float stride of the textured custom vertex layout.

Functions§

generate_box
Generates a 3D Box (cube) with distinct face normals (24 vertices, 36 indices).
generate_custom
Wraps arbitrary flat vertices into MeshBuffers.
generate_custom_textured
Builds mesh buffers for a textured custom mesh.
generate_cylinder
Generates a cylinder geometry with top and bottom caps.
generate_plane
Generates a planar subdivided grid quad.
generate_sphere
Generates a UV Sphere with configurable radial rings and segments.