Module bevy_render::mesh::primitives
source · Expand description
Mesh generation for primitive shapes.
Primitives that support meshing implement the Meshable
trait.
Calling mesh
will return either a Mesh
or a builder
that can be used to specify shape-specific configuration for creating the Mesh
.
// Create circle mesh with default configuration
let circle = meshes.add(Circle { radius: 25.0 });
// Specify number of vertices
let circle = meshes.add(Circle { radius: 25.0 }.mesh().resolution(64));
Structs
Enums
- Manner in which UV coordinates are distributed vertically.
- An error when creating an icosphere
Mesh
from aSphereMeshBuilder
. - A type of sphere mesh.
Traits
- A trait for shapes that can be turned into a
Mesh
.