Enum amethyst_renderer::Shape[][src]

pub enum Shape {
    Sphere(usizeusize),
    Cone(usize),
    Cube,
    Cylinder(usizeOption<usize>),
    Torus(f32f32usizeusize),
    IcoSphere(Option<usize>),
    Plane(Option<(usize, usize)>),
    Circle(usize),
}

Shape generators

Variants

Sphere, number of points around the equator, number of points pole to pole

Cone, number of subdivisions around the radius, must be > 1

Cube

Cylinder, number of points across the radius, optional subdivides along the height

Torus, radius from origin to center of tubular, tubular radius from toridal to surface, number of tube segments >= 3, number of segments around the tube

Icosahedral sphere, number of subdivisions > 0 if given

Plane, located in the XY plane, number of subdivisions along x and y axis if given

Circle, located in the XY plane, number of points around the circle

Methods

impl Shape
[src]

Generate Mesh for the Shape, and convert it into a MeshHandle.

Parameters:

  • scale: Scale the shape by the given amounts along the x, y, z axes
  • upload: ECS resources needed for uploading the mesh
  • progress: Progress tracker

Type parameters:

V: Vertex format to use, must to be one of: * Vec<PosTex> * Vec<PosNormTex> * Vec<PosNormTangTex> * ComboMeshCreator

Generate MeshData for the Shape

Parameters:

  • scale: Scale the shape by the given amounts along the x, y, z axes

Type parameters:

V: Vertex format to use, must to be one of: * Vec<PosTex> * Vec<PosNormTex> * Vec<PosNormTangTex> * ComboMeshCreator

Generate vertices for the Shape, in format V

Parameters:

  • scale: Scale the shape by the given amounts along the x, y, z axes

Type parameters:

V: Vertex format to use, must to be one of: * Vec<PosTex> * Vec<PosNormTex> * Vec<PosNormTangTex> * ComboMeshCreator

Trait Implementations

impl Clone for Shape
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Shape
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Shape

impl Sync for Shape