bevy_render::mesh

Module 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§

Traits§

  • A trait for required for implementing Meshable for Extrusion<T>.
  • A trait used to build Meshes from a configuration
  • A trait for shapes that can be turned into a Mesh.