Made docs comment more clear

This commit is contained in:
Pnoenix 2025-03-26 19:33:49 +01:00 committed by Pnoenix
parent 13a7a850f8
commit 6c3bc5e5fd

View File

@ -826,10 +826,13 @@ impl Mesh {
/// ///
/// # Errors /// # Errors
/// ///
/// Returns [`Err(MeshMergeError)`](MeshMergeError) if any of the following conditions are met: /// If any of the following conditions are not met, this function errors:
/// * the vertex attribute values of `other` are incompatible with `self`. /// * All of the vertex attributes that have the same attribute id, must also
/// For example, [`VertexAttributeValues::Float32`] is incompatible with [`VertexAttributeValues::Float32x3`]. /// have the same attribute type.
/// * the primitive topology of `other` doesn't match the primitive topology of `self` /// For example two attributes with the same id, but where on is a
/// [`VertexAttributeValues::Float32`] and the other is a
/// [`VertexAttributeValues::Float32x3`], would be invalid.
/// * Both meshes must have the same primitive topology.
pub fn merge(&mut self, other: &Mesh) -> Result<(), MeshMergeError> { pub fn merge(&mut self, other: &Mesh) -> Result<(), MeshMergeError> {
use VertexAttributeValues::*; use VertexAttributeValues::*;