From 2a1a2e21de33d90631b05ece023f569b39d76565 Mon Sep 17 00:00:00 2001 From: Hugo Ledoux Date: Tue, 5 Mar 2024 17:47:35 +0100 Subject: [PATCH] Harmonise the functions related to attributeS --- src/lib.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 8701e12..8e8ca11 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -634,7 +634,7 @@ impl Triangulation { self.stars[vi].pt[2] = newz; match a { Some(x) => { - let _ = self.set_attribute(vi, x); + let _ = self.set_vertex_attributes(vi, x); } None => (), } @@ -644,7 +644,7 @@ impl Triangulation { self.stars[vi].pt[2] = newz; match a { Some(x) => { - let _ = self.set_attribute(vi, x); + let _ = self.set_vertex_attributes(vi, x); } None => (), } @@ -655,7 +655,7 @@ impl Triangulation { self.stars[vi].pt[2] = newz; match a { Some(x) => { - let _ = self.set_attribute(vi, x); + let _ = self.set_vertex_attributes(vi, x); } None => (), } @@ -778,7 +778,7 @@ impl Triangulation { self.stars[vi].pt[2] = f64::NAN; self.removed_indices.push(vi); if self.attributes.is_some() { - let _ = self.set_attribute(vi, Value::Null); + let _ = self.set_vertex_attributes(vi, Value::Null); } if ns[0] != 0 { self.cur = ns[0]; @@ -802,7 +802,7 @@ impl Triangulation { } } - pub fn get_attribute(&self, vi: usize) -> Result { + pub fn get_vertex_attributes(&self, vi: usize) -> Result { match self.is_vertex_removed(vi) { Err(why) => Err(why), Ok(b) => match b { @@ -815,7 +815,7 @@ impl Triangulation { } } - pub fn set_attribute(&mut self, vi: usize, a: Value) -> Result { + pub fn set_vertex_attributes(&mut self, vi: usize, a: Value) -> Result { match self.is_vertex_removed(vi) { Err(why) => Err(why), @@ -1466,7 +1466,7 @@ impl Triangulation { self.stars[vi].pt[2] = f64::NAN; self.removed_indices.push(vi); if self.attributes.is_some() { - let _ = self.set_attribute(vi, Value::Null); + let _ = self.set_vertex_attributes(vi, Value::Null); } } match self.is_vertex_removed(vi) {