Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ impl MeshBool {
Self::get_mesh_gl_impl(&self.meshbool_impl, normal_idx)
}

pub fn from_meshgl(mesh_gl: MeshGL) -> Self {
pub fn from_meshgl(mesh_gl: &MeshGL) -> Self {
Self::from(MeshBoolImpl::from_meshgl(mesh_gl))
}

Expand Down
6 changes: 3 additions & 3 deletions src/meshboolimpl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ impl<'a, const USE_PROP: bool, F: FnMut(i32, i32, i32)> PrepHalfedges<'a, USE_PR
}

impl MeshBoolImpl {
pub fn from_meshgl(mesh_gl: MeshGL) -> Self {
pub fn from_meshgl(mesh_gl: &MeshGL) -> Self {
let num_vert = mesh_gl.num_vert();
let num_tri = mesh_gl.num_tri();

Expand Down Expand Up @@ -287,7 +287,7 @@ impl MeshBoolImpl {

let mut tri_ref: Vec<TriRef> = unsafe { vec_uninit(mesh_gl.num_tri()) };

let mut run_index = mesh_gl.run_index;
let mut run_index = mesh_gl.run_index.clone();
let run_end = mesh_gl.tri_verts.len();
if run_index.is_empty() {
run_index = vec![0, run_end as u32];
Expand All @@ -298,7 +298,7 @@ impl MeshBoolImpl {
}

let start_id = MeshBoolImpl::reserve_ids(1.max(mesh_gl.run_original_id.len()));
let mut run_original_id = mesh_gl.run_original_id;
let mut run_original_id = mesh_gl.run_original_id.clone();
if run_original_id.is_empty() {
run_original_id.push(start_id as u32);
}
Expand Down