Expand description
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.
Modules§
Structs§
- Mesh
Points - 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.
- With
Colors - A
Mesh
type with an added channel containing colors. - With
Indices - A mesh type with an added channel containing indices describing the edges between vertices.
- With
Normals - A
Mesh
type with an added channel containing vertex normals. - With
TexCoords - A
Mesh
type with an added channel containing texture coordinates.
Traits§
- Channel
- Types that may be used as a data channel within a mesh.
- Channel
Mut - Types that may be used as a data channel within a mesh.
- Clear
- Meshes whose indices and vertices buffers may be cleared for re-use.
- Clear
Indices - Meshes whose Indices channel can be cleared.
- Clear
Vertices - Meshes whose vertices channels can be cleared.
- Colors
- Meshes that contain a channel of colors.
- Extend
From Slice - Meshes that may be extended from a slice of data.
- 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.
- Push
Index - Meshes that contain an Indices channel and can push new indices to it.
- Push
Vertex - 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 Aliases§
- Triangles
- An iterator yielding triangles in the order specified via the mesh’s Indices channel.