b3dCreateSphere

Creates a UV sphere mesh primitive (radius 1, centered at origin, smooth shading). Takes textureSlots, uvMode, unique, segments (horizontal/vertical subdivision count, clamped 3-128). Returns mesh entity handle or 0 on failure.

3D Graphics

Parameters & Returns

Parameters

textureSlots Int
uvMode Int
unique Int
segments Int

Returns

Int

Quick Summary

Creates a UV sphere mesh primitive (radius 1, centered at origin, smooth shading). Takes textureSlots, uvMode, unique, segments (horizontal/vertical subdivision count, clamped 3-128). Returns mesh entity handle or 0 on failure.

Technical Exegesis...

Creates a UV sphere mesh primitive (radius 1, centered at origin, smooth shading). Takes textureSlots, uvMode, unique, segments (horizontal/vertical subdivision count, clamped 3-128). Returns mesh entity handle or 0 on failure. Creates surface-based mesh, adds top/bottom pole vertices, generates ring vertices using spherical coordinates (latitude/longitude), sets normals equal to positions (unit sphere property), adds triangles for top cap, body, bottom cap, unlocks. Sphere radius: 1.

Example

Example.bam
; No example implemented yet