[][src]Module nannou::mesh

An API for composing Meshs. Meshs may be composed of different sets of channels including position, color, texture-coordinate and normals. Note that this is quite a low-level representation. For a higher-level, graphics-related mesh API, see the draw module.

Re-exports

pub use self::channel::Channel;
pub use self::channel::ChannelMut;

Modules

channel
vertex

Vertex types yielded by the mesh adaptors and their implementations.

Structs

MeshPoints

The base mesh type with only a single vertex channel.

RawVertices

An iterator yielding the raw vertices (with combined channels) of a mesh.

Vertices

An iterator yielding vertices in the order specified via the mesh's Indices channel.

WithColors

A Mesh type with an added channel containing colors.

WithIndices

A mesh type with an added channel containing indices describing the edges between vertices.

WithNormals

A Mesh type with an added channel containing vertex normals.

WithTexCoords

A Mesh type with an added channel containing texture coordinates.

Traits

Clear

Meshes whose indices and vertices buffers may be cleared for re-use.

ClearIndices

Meshes whose Indices channel can be cleared.

ClearVertices

Meshes whose vertices channels can be cleared.

Colors

Meshes that contain a channel of colors.

GetVertex

Mesh types that can be indexed to produce a vertex.

Indices

Meshes that contain a channel of indices that describe the edges between points.

Normals

Meshes that contain a channel of vertex normals.

Points

All meshes must contain at least one vertex channel.

PushIndex

Meshes that contain an Indices channel and can push new indices to it.

PushVertex

Meshes that can push vertices of type V while keeping all non-index channels the same length before and after the push.

TexCoords

Meshes that contain a channel of texture coordinates.

Functions

clear

Clear all vertices and indices from the mesh.

clear_indices

Clear all indices from the mesh.

clear_vertices

Clear all vertices from the mesh.

extend_indices

Extend the given mesh with the given indices.

extend_vertices

Extend the given mesh with the given sequence of vertices.

from_points

Create a simple base mesh from the given channel of vertex points.

push_index

Push the given index to the given mesh.

push_vertex

Push the given vertex to the given mesh.

raw_vertex_count

Get the number of vertices in the mesh.

raw_vertices

An iterator yielding the raw vertices (with combined channels) of a mesh.

triangle_count

The number of triangles that would be yielded by a Triangles iterator for the given mesh.

triangles

Produce an iterator yielding triangles for every three vertices yielded in the order specified via the mesh's Indices channel.

vertex_count

The number of vertices that would be yielded by a Vertices iterator for the given mesh.

vertices

Produce an iterator yielding vertices in the order specified via the mesh's Indices channel.

with_colors

Combine the given mesh with the given channel of vertex colors.

with_indices

Combine the given mesh with the given channel of vertex indices.

with_normals

Combine the given mesh with the given Normals channel.

with_tex_coords

Combine the given mesh with the given channel of vertex texture coordinates.

Type Definitions

TexCoordScalarDefault

The fallback scalar type used for texture coordinates if none is specified.

Triangles

An iterator yielding triangles in the order specified via the mesh's Indices channel.