Struct gfx::render::mesh::Slice [] [src]

pub struct Slice<R: Resources> {
    pub start: VertexCount,
    pub end: VertexCount,
    pub prim_type: PrimitiveType,
    pub kind: SliceKind<R>,
}

Description of a subset of Mesh data to render.

Only vertices between start and end are rendered. The source of the vertex data is dependent on the kind value.

The prim_type defines how the mesh contents are interpreted. For example, Point typed vertex slice can be used to do shape blending, while still rendereing it as an indexed TriangleList.

Fields

start

Start index of vertices to draw.

end

End index of vertices to draw.

prim_type

Primitive type to render collections of vertices as.

kind

Source of the vertex ordering when drawing.

Methods

impl<R: Resources> Slice<R>

fn get_prim_count(&self) -> u32

Get the number of primitives in this slice.

Trait Implementations

Derived Implementations

impl<R: PartialEq + Resources> PartialEq for Slice<R> where R: PartialEq

fn eq(&self, __arg_0: &Slice<R>) -> bool

fn ne(&self, __arg_0: &Slice<R>) -> bool

impl<R: Debug + Resources> Debug for Slice<R> where R: Debug

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl<R: Clone + Resources> Clone for Slice<R> where R: Clone

fn clone(&self) -> Slice<R>

fn clone_from(&mut self, source: &Self)