Struct michelangelo::Mesh
source · Fields
vertices: CVec<Vertex>
indices: CVec<u16>
Implementations
Trait Implementations
sourceimpl<'a> AddAssign<&'a Mesh> for Mesh
impl<'a> AddAssign<&'a Mesh> for Mesh
sourcefn add_assign(&mut self, rhs: &'a Mesh)
fn add_assign(&mut self, rhs: &'a Mesh)
Performs the
+=
operation. Read moresourceimpl AddAssign<Mesh> for Mesh
impl AddAssign<Mesh> for Mesh
sourcefn add_assign(&mut self, rhs: Mesh)
fn add_assign(&mut self, rhs: Mesh)
Performs the
+=
operation. Read moresourceimpl Compact for Mesh
impl Compact for Mesh
sourcefn is_still_compact(&self) -> bool
fn is_still_compact(&self) -> bool
Is the object’s dynamic part stored compactly?
sourcefn dynamic_size_bytes(&self) -> usize
fn dynamic_size_bytes(&self) -> usize
Size of the dynamic part in bytes
sourceunsafe fn compact(source: *mut Self, dest: *mut Self, new_dynamic_part: *mut u8)
unsafe fn compact(source: *mut Self, dest: *mut Self, new_dynamic_part: *mut u8)
Copy the static part of
source
to dest
and compactly store
the dynamic part of source
as the new dynamic part of dest
at new_dynamic_part
.
This semantically moves source into dest. Read moresourceunsafe fn decompact(source: *const Self) -> Self
unsafe fn decompact(source: *const Self) -> Self
Creates a clone of self with the dynamic part guaranteed to be stored freely. Read more
sourcefn total_size_bytes(&self) -> usize
fn total_size_bytes(&self) -> usize
Total size of the object (static part + dynamic part)
sourceunsafe fn behind(ptr: *mut Self) -> *mut u8
unsafe fn behind(ptr: *mut Self) -> *mut u8
Get a pointer to behind the static part of
self
(commonly used place for the dynamic part)sourceunsafe fn compact_behind(source: *mut Self, dest: *mut Self)
unsafe fn compact_behind(source: *mut Self, dest: *mut Self)
Like
compact
with new_dynamic_part
set to dest.behind()
sourceimpl GeometryBuilder<FillVertex> for Mesh
impl GeometryBuilder<FillVertex> for Mesh
sourcefn begin_geometry(&mut self)
fn begin_geometry(&mut self)
Called at the beginning of a generation. Read more
sourcefn end_geometry(&mut self) -> Count
fn end_geometry(&mut self) -> Count
Called at the end of a generation.
Returns the number of vertices and indices added since the last time begin_geometry was
called. Read more
sourcefn abort_geometry(&mut self)
fn abort_geometry(&mut self)
abort_geometry is called instead of end_geometry if an error occured while producing
the geometry and we won’t be able to finish. Read more
sourcefn add_vertex(&mut self, input: FillVertex) -> VertexId
fn add_vertex(&mut self, input: FillVertex) -> VertexId
Inserts a vertex, providing its position, and optionally a normal.
Retuns a vertex id that is only valid between begin_geometry and end_geometry. Read more
Auto Trait Implementations
impl RefUnwindSafe for Mesh
impl !Send for Mesh
impl !Sync for Mesh
impl Unpin for Mesh
impl UnwindSafe for Mesh
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.