pub enum Mesh {
TriMesh(Box<TriMesh<f32>>),
PointCloud(PointCloud<f32>),
}
Expand description
Supported output mesh types.
Variants§
Implementations§
source§impl Mesh
impl Mesh
pub fn is_empty(&self) -> bool
pub fn reverse(&mut self)
sourcepub fn eq_topo(&self, other: &Mesh) -> bool
pub fn eq_topo(&self, other: &Mesh) -> bool
Returns true if the other
mesh has equivalent topology to self
.
pub fn build_topology( &self, attrib_transfer: &AttribTransfer, data: &mut Vec<u8>, buffer_views: &mut Vec<View>, accessors: &mut Vec<Accessor> ) -> (&[[f32; 3]], Option<Vec<Index<Accessor>>>)
Trait Implementations§
source§impl From<PointCloud<f32>> for Mesh
impl From<PointCloud<f32>> for Mesh
source§fn from(mesh: PointCloud<f32>) -> Self
fn from(mesh: PointCloud<f32>) -> Self
Converts to this type from the input type.
source§impl From<PointCloud<f64>> for Mesh
impl From<PointCloud<f64>> for Mesh
source§fn from(mesh: PointCloud<f64>) -> Self
fn from(mesh: PointCloud<f64>) -> Self
Converts to this type from the input type.
source§impl VertexPositions for Mesh
impl VertexPositions for Mesh
type Element = [f32; 3]
source§fn vertex_positions(&self) -> &[Self::Element]
fn vertex_positions(&self) -> &[Self::Element]
Vertex positions as a slice of triplets.
source§fn vertex_positions_mut(&mut self) -> &mut [Self::Element]
fn vertex_positions_mut(&mut self) -> &mut [Self::Element]
Vertex positions as a mutable slice of triplets.
source§fn vertex_position_iter(&self) -> Iter<'_, Self::Element>
fn vertex_position_iter(&self) -> Iter<'_, Self::Element>
Vertex iterator.
source§fn vertex_position_iter_mut(&mut self) -> IterMut<'_, Self::Element>
fn vertex_position_iter_mut(&mut self) -> IterMut<'_, Self::Element>
Mutable vertex iterator.
source§fn vertex_position<VI>(&self, vidx: VI) -> Self::Elementwhere
VI: Into<VertexIndex>,
Self::Element: Clone,
fn vertex_position<VI>(&self, vidx: VI) -> Self::Elementwhere VI: Into<VertexIndex>, Self::Element: Clone,
Vertex accessor.
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§
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<M, T> BoundingBox<T> for Mwhere
T: Real,
M: VertexPositions<Element = [T; 3]>,
impl<M, T> BoundingBox<T> for Mwhere T: Real, M: VertexPositions<Element = [T; 3]>,
source§fn bounding_box(&self) -> BBox<T>
fn bounding_box(&self) -> BBox<T>
Compute the bounding box of this object.
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DropBytes for Twhere
T: 'static,
impl<T> DropBytes for Twhere T: 'static,
unsafe fn drop_bytes(bytes: &mut [MaybeUninit<u8>])
§impl<'a, S, I> Get<'a, I> for Swhere
I: GetIndex<'a, S>,
impl<'a, S, I> Get<'a, I> for Swhere I: GetIndex<'a, S>,
type Output = <I as GetIndex<'a, S>>::Output
fn get(&self, idx: I) -> Option<<I as GetIndex<'a, S>>::Output>
§fn at(&self, idx: I) -> Self::Output
fn at(&self, idx: I) -> Self::Output
Return a value at the given index. This is provided as the checked
version of
get
that will panic if the equivalent get
call is None
,
which typically means that the given index is out of bounds. Read more§unsafe fn at_unchecked(&self, idx: I) -> Self::Output
unsafe fn at_unchecked(&self, idx: I) -> Self::Output
Return a value at the given index. Read more
§impl<S, I> Isolate<I> for Swhere
I: IsolateIndex<S>,
impl<S, I> Isolate<I> for Swhere I: IsolateIndex<S>,
type Output = <I as IsolateIndex<S>>::Output
§unsafe fn isolate_unchecked(self, idx: I) -> <S as Isolate<I>>::Output
unsafe fn isolate_unchecked(self, idx: I) -> <S as Isolate<I>>::Output
Unchecked version of
isolate
. Read morefn try_isolate(self, idx: I) -> Option<<S as Isolate<I>>::Output>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T, M> Rotate<T> for Mwhere
T: RealField + Float,
M: VertexPositions<Element = [T; 3]>,
impl<T, M> Rotate<T> for Mwhere T: RealField + Float, M: VertexPositions<Element = [T; 3]>,
source§fn rotate_by_matrix(&mut self, mtx: [[T; 3]; 3])
fn rotate_by_matrix(&mut self, mtx: [[T; 3]; 3])
Rotate the mesh using the given column-major rotation matrix.
source§fn rotate_by_vector(&mut self, e: [T; 3])where
T: Zero,
fn rotate_by_vector(&mut self, e: [T; 3])where T: Zero,
Rotate the object using the given Euler vector (or rotation vector)
e
. The direction of
e
specifies the axis of rotation and its magnitude is the angle in radians.source§impl<S, T> Rotated<T> for Swhere
T: RealField,
S: Rotate<T>,
impl<S, T> Rotated<T> for Swhere T: RealField, S: Rotate<T>,
source§fn rotated(self, u: [T; 3], theta: T) -> S
fn rotated(self, u: [T; 3], theta: T) -> S
Return a version of
self
rotated about the unit vector u
by the given angle theta
(in
radians). Read moresource§fn rotated_by_matrix(self, mtx: [[T; 3]; 3]) -> S
fn rotated_by_matrix(self, mtx: [[T; 3]; 3]) -> S
Return a version of
self
rotated using the given column-major rotation matrixsource§fn rotated_by_vector(self, e: [T; 3]) -> S
fn rotated_by_vector(self, e: [T; 3]) -> S
Return a version of
self
rotated about the Euler vector e
.source§impl<T, M> Scale<T> for Mwhere
T: RealField,
M: VertexPositions<Element = [T; 3]>,
impl<T, M> Scale<T> for Mwhere T: RealField, M: VertexPositions<Element = [T; 3]>,
§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 more§fn 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).§fn to_subset_unchecked(&self) -> SS
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.source§impl<T, M> Translate<T> for Mwhere
T: RealField,
M: VertexPositions<Element = [T; 3]>,
impl<T, M> Translate<T> for Mwhere T: RealField, M: VertexPositions<Element = [T; 3]>,
source§impl<S, T> Translated<T> for Swhere
S: Translate<T>,
impl<S, T> Translated<T> for Swhere S: Translate<T>,
source§fn translated(self, t: [T; 3]) -> S
fn translated(self, t: [T; 3]) -> S
Return a version of
self
translated by the given translation vector t
.