Skip to main content

create_cube

Function create_cube 

Source
pub fn create_cube(size: f32) -> Result<MeshData>
Expand description

Create a 3D axis-aligned cube (12 triangles, 24 vertices, size × size × size).

Each face has its own four vertices with an outward normal and per-face UVs. size must be finite and positive.

Donor: oa::FnMesh::createCube.

§Errors

Returns an error for non-finite or non-positive size.