Skip to main content

build_icosphere

Function build_icosphere 

Source
pub fn build_icosphere(subdivisions: usize) -> MeshStorage
Expand description

构造一个单位 icosphere(球心在原点,半径 1)。

§参数

  • subdivisions:细分次数。0 = 基础 icosahedron(12 顶点 20 面); n = 每个面分裂为 $4^n$ 个小三角形。

§复杂度

顶点数 $O(4^n)$,构建时间 $O(4^n)$。

§用途

仅用于测试与调试。生产场景请使用更高效的网格生成器。