Enum amethyst_renderer::Shape [−][src]
pub enum Shape { Sphere(usize, usize), Cone(usize), Cube, Cylinder(usize, Option<usize>), Torus(f32, f32, usize, usize), IcoSphere(Option<usize>), Plane(Option<(usize, usize)>), Circle(usize), }
Shape generators
Variants
Sphere(usize, usize)
Sphere, number of points around the equator, number of points pole to pole
Cone(usize)
Cone, number of subdivisions around the radius, must be > 1
Cube
Cube
Cylinder(usize, Option<usize>)
Cylinder, number of points across the radius, optional subdivides along the height
Torus(f32, f32, usize, usize)
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
IcoSphere(Option<usize>)
Icosahedral sphere, number of subdivisions > 0 if given
Plane(Option<(usize, usize)>)
Plane, located in the XY plane, number of subdivisions along x and y axis if given
Circle(usize)
Circle, located in the XY plane, number of points around the circle
Methods
impl Shape
[src]
impl Shape
pub fn upload<V, P>(
&self,
scale: Option<(f32, f32, f32)>,
upload: ShapeUpload,
progress: P
) -> MeshHandle where
V: From<InternalShape> + Into<MeshData>,
P: Progress,
[src]
pub fn upload<V, P>(
&self,
scale: Option<(f32, f32, f32)>,
upload: ShapeUpload,
progress: P
) -> MeshHandle where
V: From<InternalShape> + Into<MeshData>,
P: Progress,
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 axesupload
: ECS resources needed for uploading the meshprogress
: Progress tracker
Type parameters:
V
: Vertex format to use, must to be one of:
* Vec<PosTex>
* Vec<PosNormTex>
* Vec<PosNormTangTex>
* ComboMeshCreator
pub fn generate<V>(&self, scale: Option<(f32, f32, f32)>) -> MeshData where
V: From<InternalShape> + Into<MeshData>,
[src]
pub fn generate<V>(&self, scale: Option<(f32, f32, f32)>) -> MeshData where
V: From<InternalShape> + Into<MeshData>,
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
pub fn generate_vertices<V>(&self, scale: Option<(f32, f32, f32)>) -> V where
V: From<InternalShape>,
[src]
pub fn generate_vertices<V>(&self, scale: Option<(f32, f32, f32)>) -> V where
V: From<InternalShape>,
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]
impl Clone for Shape
fn clone(&self) -> Shape
[src]
fn clone(&self) -> Shape
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Shape
[src]
impl Debug for Shape