pub struct MeshBuilder<const N: usize = 3> { /* private fields */ }Implementations§
Source§impl<const N: usize> MeshBuilder<N>
impl<const N: usize> MeshBuilder<N>
pub const DEFAULT_CAPACITY_VERTEX: usize = 512
pub const DEFAULT_CAPACITY_INDEX: usize
pub fn new() -> Self
pub fn with_capacity(nb_vertices: usize, nb_indices: usize) -> Self
pub fn from_vertices_and_indices( vertices: Vec<VertexOf<N>>, indices: Vec<VertexIndex>, ) -> Self
pub fn is_valid(&self) -> bool
pub fn is_empty(&self) -> bool
pub fn nb_vertex(&self) -> usize
pub fn vertices(&self) -> &[VertexOf<N>]
pub fn vertices_mut(&mut self) -> &mut [VertexOf<N>]
pub fn nb_index(&self) -> usize
pub fn indices(&self) -> &[VertexIndex] ⓘ
pub fn indices_mut(&mut self) -> &mut [VertexIndex] ⓘ
pub fn nb_triangle(&self) -> usize
pub fn triangles(&self) -> &[TriangleVertexIndex] ⓘ
pub fn triangles_mut(&mut self) -> &mut [TriangleVertexIndex] ⓘ
pub fn to_vertices_and_indices(self) -> (Vec<VertexOf<N>>, Vec<VertexIndex>)
pub fn to_vertices_and_triangles_indices( self, ) -> (Vec<VertexOf<N>>, Vec<TriangleVertexIndex>)
Trait Implementations§
Source§impl<const N: usize> Builder for MeshBuilder<N>
impl<const N: usize> Builder for MeshBuilder<N>
Source§impl<const N: usize> BuilderMesh<N> for MeshBuilder<N>
impl<const N: usize> BuilderMesh<N> for MeshBuilder<N>
Source§fn geometry(
&mut self,
vertex: impl IntoIterator<Item = VertexOf<N>>,
index: impl IntoIterator<Item = VertexIndex>,
)
fn geometry( &mut self, vertex: impl IntoIterator<Item = VertexOf<N>>, index: impl IntoIterator<Item = VertexIndex>, )
Index are relative to the vertex passed
fn triangles_indexed( &mut self, vertex: impl IntoIterator<Item = VertexOf<N>>, index: impl IntoIterator<Item = TriangleVertexIndex>, )
fn triangle(&mut self, triangle: TriangleVertex<N>)
fn triangles(&mut self, triangles: impl IntoIterator<Item = TriangleVertex<N>>)
Source§impl<const N: usize> Clone for MeshBuilder<N>
impl<const N: usize> Clone for MeshBuilder<N>
Source§fn clone(&self) -> MeshBuilder<N>
fn clone(&self) -> MeshBuilder<N>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const N: usize> Debug for MeshBuilder<N>
impl<const N: usize> Debug for MeshBuilder<N>
Source§impl<const N: usize> Default for MeshBuilder<N>
impl<const N: usize> Default for MeshBuilder<N>
Source§fn default() -> MeshBuilder<N>
fn default() -> MeshBuilder<N>
Returns the “default value” for a type. Read more
Source§impl<const N: usize> From<MeshBuilder<N>> for Mesh<N>
impl<const N: usize> From<MeshBuilder<N>> for Mesh<N>
Source§fn from(value: MeshBuilder<N>) -> Self
fn from(value: MeshBuilder<N>) -> Self
Converts to this type from the input type.
Source§impl<const N: usize> PartialEq for MeshBuilder<N>
impl<const N: usize> PartialEq for MeshBuilder<N>
Source§impl<const N: usize> PartialOrd for MeshBuilder<N>
impl<const N: usize> PartialOrd for MeshBuilder<N>
impl<const N: usize> StructuralPartialEq for MeshBuilder<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for MeshBuilder<N>
impl<const N: usize> RefUnwindSafe for MeshBuilder<N>
impl<const N: usize> Send for MeshBuilder<N>
impl<const N: usize> Sync for MeshBuilder<N>
impl<const N: usize> Unpin for MeshBuilder<N>
impl<const N: usize> UnsafeUnpin for MeshBuilder<N>
impl<const N: usize> UnwindSafe for MeshBuilder<N>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<S, T> CastRangeInto<T> for Swhere
T: CastRangeFrom<S>,
impl<S, T> CastRangeInto<T> for Swhere
T: CastRangeFrom<S>,
fn cast_range_into(self) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DefaultExtension for T
impl<T> DefaultExtension for T
fn is_default(&self) -> bool
fn is_not_default(&self) -> bool
Source§impl<T> DefaultIsTripleUnderscore for Twhere
T: Default,
impl<T> DefaultIsTripleUnderscore for Twhere
T: Default,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PartialOrdExtension for Twhere
T: PartialOrd,
impl<T> PartialOrdExtension for Twhere
T: PartialOrd,
Source§fn max_partial(self, other: Self) -> Selfwhere
Self: Sized,
fn max_partial(self, other: Self) -> Selfwhere
Self: Sized,
Using
PartialOrd operator, not component wiseSource§fn min_partial(self, other: Self) -> Selfwhere
Self: Sized,
fn min_partial(self, other: Self) -> Selfwhere
Self: Sized,
Using
PartialOrd operator, not component wiseSource§fn clamp_partial(self, min: Self, max: Self) -> Selfwhere
Self: Sized,
fn clamp_partial(self, min: Self, max: Self) -> Selfwhere
Self: Sized,
Using
PartialOrd operator, not component wise