pub struct MeshCollection {
pub meshes: Vec<TriangleMesh>,
}Expand description
Represents a collection of TriangleMesh objects.
Fields§
§meshes: Vec<TriangleMesh>Implementations§
Source§impl MeshCollection
impl MeshCollection
Sourcepub fn new(meshes: Vec<TriangleMesh>) -> Self
pub fn new(meshes: Vec<TriangleMesh>) -> Self
Creates a new MeshCollection from a vector of TriangleMeshes
Sourcepub fn num_meshes(&self) -> usize
pub fn num_meshes(&self) -> usize
Returns the number of meshes in the collection.
Sourcepub fn num_triangles(&self) -> usize
pub fn num_triangles(&self) -> usize
Returns the number of triangles in the collection.
Sourcepub fn num_vertices(&self) -> usize
pub fn num_vertices(&self) -> usize
Returns the number of vertices in the collection.
Sourcepub fn num_normals(&self) -> usize
pub fn num_normals(&self) -> usize
Returns the number of normal vectors in the collection.
Sourcepub fn triangles(&self) -> impl Iterator<Item = Triangle> + '_
pub fn triangles(&self) -> impl Iterator<Item = Triangle> + '_
Returns an iterator over all the Triangles in the collection.
Sourcepub fn vertices(&self) -> impl Iterator<Item = Vertex> + '_
pub fn vertices(&self) -> impl Iterator<Item = Vertex> + '_
Returns an iterator over all the Vertex objects in the collection.
Sourcepub fn normals(&self) -> impl Iterator<Item = Normal> + '_
pub fn normals(&self) -> impl Iterator<Item = Normal> + '_
Returns an iterator over all the Normals in the collection.
Sourcepub fn index_of_first_vertex(&self, mesh_index: usize) -> usize
pub fn index_of_first_vertex(&self, mesh_index: usize) -> usize
Returns the index of the first Vertex of a given TriangleMesh in the collection.
Trait Implementations§
Source§impl Debug for MeshCollection
impl Debug for MeshCollection
Source§impl<'de> Deserialize<'de> for MeshCollection
impl<'de> Deserialize<'de> for MeshCollection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<I> From<I> for MeshCollectionwhere
I: IntoIterator<Item = TriangleMesh>,
impl<I> From<I> for MeshCollectionwhere
I: IntoIterator<Item = TriangleMesh>,
Source§impl From<MeshCollection> for TriangleMesh
impl From<MeshCollection> for TriangleMesh
Source§fn from(mesh_collection: MeshCollection) -> Self
fn from(mesh_collection: MeshCollection) -> Self
Converts to this type from the input type.
Source§impl From<TriangleMesh> for MeshCollection
impl From<TriangleMesh> for MeshCollection
Source§fn from(triangle_mesh: TriangleMesh) -> Self
fn from(triangle_mesh: TriangleMesh) -> Self
Converts to this type from the input type.
Source§impl PartialEq for MeshCollection
impl PartialEq for MeshCollection
Source§impl Serialize for MeshCollection
impl Serialize for MeshCollection
impl StructuralPartialEq for MeshCollection
Auto Trait Implementations§
impl Freeze for MeshCollection
impl RefUnwindSafe for MeshCollection
impl Send for MeshCollection
impl Sync for MeshCollection
impl Unpin for MeshCollection
impl UnwindSafe for MeshCollection
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<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 more