Struct rend3::types::MeshBuilder[][src]

pub struct MeshBuilder { /* fields omitted */ }
Expand description

Easy to use builder for a Mesh that deals with common operations for you.

Implementations

Create a new MeshBuilder with a given set of positions.

All vertices must have positions.

Panic

Will panic if the length is zero.

Add vertex normals to the given mesh.

Panic

Will panic if the length is different from the position buffer length.

Add vertex tangents to the given mesh.

Panic

Will panic if the length is different from the position buffer length.

Add the first set of texture coordinates to the given mesh.

Panic

Will panic if the length is different from the position buffer length.

Add the second set of texture coordinates to the given mesh.

Panic

Will panic if the length is different from the position buffer length.

Add vertex colors to the given mesh.

Panic

Will panic if the length is different from the position buffer length.

Add material indices to the given mesh.

Panic

Will panic if the length is different from the position buffer length.

Add indices to the given mesh.

Panic

Will panic if the length is zero.

Mark this mesh as using a right handed (Counter Clockwise) winding order. It will be converted to rend3 native left handed (Clockwise) winding order on construction. This will not change the vertex normals. If this is called, it is advised to not provide a normal buffer so a buffer will be calculated for you.

See Mesh::flip_winding_order for more information.

Build a mesh, adding whatever components weren’t provided.

If normals weren’t provided, they will be calculated. If mesh is right handed, will be converted to left handed.

All others will be filled with defaults.

Trait Implementations

Formats the value using the given formatter. Read more

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

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.

Performs the conversion.

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.