fn estimate_heap_size(&self, mesh: &Mesh) -> usize {
        const DEFAULT_ATTRIBUTES: [&str; 7] = [
            Mesh::ATTRIBUTE_COLOR,
            Mesh::ATTRIBUTE_NORMAL,
            Mesh::ATTRIBUTE_TANGENT,
            Mesh::ATTRIBUTE_POSITION,
            Mesh::ATTRIBUTE_UV_0,
            Mesh::ATTRIBUTE_JOINT_WEIGHT,
            Mesh::ATTRIBUTE_JOINT_INDEX,
        ];

        let attributes: HashSet<&str> = DEFAULT_ATTRIBUTES
            .into_iter()
            .chain(self.additional_vertex_attributes.iter().copied())
            .collect();

        let total_size_of_attributes: usize = attributes
            .into_iter()
            .filter_map(|attribute_name| mesh.attribute(attribute_name))
            .map(|attributes| {
                MemoryStats::total_size_of_with_estimator(
                    attributes,
                    &VertexAttributeSizeEstimator::default(),
                )
            })
            .sum();

        total_size_of_attributes
    }
/// Sums up the sizes of the mesh's vertex attribute lists.
Sums up the sizes of the mesh's vertex attribute lists.
Sums up the sizes of the mesh ' s vertex attribute lists .
fn estimate_heap_size(&self, mesh: &Mesh) -> usize {
        const DEFAULT_ATTRIBUTES: [&str; 7] = [
            Mesh::ATTRIBUTE_COLOR,
            Mesh::ATTRIBUTE_NORMAL,
            Mesh::ATTRIBUTE_TANGENT,
            Mesh::ATTRIBUTE_POSITION,
            Mesh::ATTRIBUTE_UV_0,
            Mesh::ATTRIBUTE_JOINT_WEIGHT,
            Mesh::ATTRIBUTE_JOINT_INDEX,
        ];
        let attributes: HashSet<&str> = DEFAULT_ATTRIBUTES
            .into_iter()
            .chain(self.additional_vertex_attributes.iter().copied())
            .collect();
        let total_size_of_attributes: usize = attributes
            .into_iter()
            .filter_map(|attribute_name| mesh.attribute(attribute_name))
            .map(|attributes| {
                MemoryStats::total_size_of_with_estimator(
                    attributes,
                    &VertexAttributeSizeEstimator::default(),
                )
            })
            .sum();
        total_size_of_attributes
    }
fn estimate_heap_size ( & self , mesh : & Mesh ) -> usize { const DEFAULT_ATTRIBUTES : [ & str ; 7 ] = [ Mesh :: ATTRIBUTE_COLOR , Mesh :: ATTRIBUTE_NORMAL , Mesh :: ATTRIBUTE_TANGENT , Mesh :: ATTRIBUTE_POSITION , Mesh :: ATTRIBUTE_UV_0 , Mesh :: ATTRIBUTE_JOINT_WEIGHT , Mesh :: ATTRIBUTE_JOINT_INDEX , ] ; let attributes : HashSet < & str > = DEFAULT_ATTRIBUTES . into_iter ( ) . chain ( self . additional_vertex_attributes . iter ( ) . copied ( ) ) . collect ( ) ; let total_size_of_attributes : usize = attributes . into_iter ( ) . filter_map ( | attribute_name | mesh . attribute ( attribute_name ) ) . map ( | attributes | { MemoryStats :: total_size_of_with_estimator ( attributes , & VertexAttributeSizeEstimator :: default ( ) , ) } ) . sum ( ) ; total_size_of_attributes }
Sums up the sizes of the mesh's vertex attribute lists.
Sums up the sizes of the mesh ' s vertex attribute lists .
&self
mesh
&Mesh