Struct dotrix_egui::epaint::Mesh[]

pub struct Mesh {
    pub indices: Vec<u32, Global>,
    pub vertices: Vec<Vertex, Global>,
    pub texture_id: TextureId,
}
Expand description

Textured triangles in two dimensions.

Fields

indices: Vec<u32, Global>

Draw as triangles (i.e. the length is always multiple of three).

If you only support 16-bit indices you can use Mesh::split_to_u16.

egui is NOT consistent with what winding order it uses, so turn off backface culling.

vertices: Vec<Vertex, Global>

The vertex data indexed by indices.

texture_id: TextureId

The texture to use when drawing these triangles.

Implementations

Restore to default state, but without freeing memory.

Are all indices within the bounds of the contained vertices?

Append all the indices and vertices of other to self.

Add a triangle.

Make room for this many additional triangles (will reserve 3x as many indices). See also reserve_vertices.

Make room for this many additional vertices. See also reserve_triangles.

Rectangle with a texture and color.

Uniformly colored rectangle.

This is for platforms that only support 16-bit index buffers.

Splits this mesh into many smaller meshes (if needed) where the smaller meshes have 16-bit indices.

Translate location by this much, in-place

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Constructs wrapped service

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.