pub fn scale(&mut self, scale: f64)
    {
        for vertex_id in self.vertex_iter() {
            let p = self.vertex_position(vertex_id);
            self.move_vertex_to(vertex_id, p * scale);
        }
    }
/// Scales the entire mesh by multiplying `scale` to each vertex position.
///
/// # Examples
///
/// ```
/// # use tri_mesh::prelude::*;
/// #
/// # fn main() -> Result<(), Box<tri_mesh::mesh_builder::Error>> {
///     let mut mesh = MeshBuilder::new().cube().build()?;
/// #   let first_face_id = mesh.face_iter().next().unwrap();
/// #   let face_area_before = mesh.face_area(first_face_id);
///     mesh.scale(2.0);
/// #   let face_area_after = mesh.face_area(first_face_id);
/// #   assert_eq!(4.0 * face_area_before, face_area_after);
/// #   mesh.is_valid().unwrap();
/// #   Ok(())
/// # }
/// ```
///
Scales the entire mesh by multiplying `scale` to each vertex position.
Scales the entire mesh by multiplying ` scale ` to each vertex position .
pub fn scale(&mut self, scale: f64)
    {
        for vertex_id in self.vertex_iter() {
            let p = self.vertex_position(vertex_id);
            self.move_vertex_to(vertex_id, p * scale);
        }
    }
pub fn scale ( & mut self , scale : f64 ) { for vertex_id in self . vertex_iter ( ) { let p = self . vertex_position ( vertex_id ) ; self . move_vertex_to ( vertex_id , p * scale ) ; } }
Scales the entire mesh by multiplying `scale` to each vertex position.
Scales the entire mesh by multiplying ` scale ` to each vertex position .
&mut self
scale
f64
&mut self
scale
f64
examples
None
use tri_mesh::prelude::*;
None
fn main() -> result<(), box<tri_mesh::mesh_builder::error>> {
let mut mesh = MeshBuilder::new().cube().build()?.
let mut mesh = MeshBuilder :: new () . cube () . build () ? .
let first_face_id = mesh.face_iter().next().unwrap();
None
let face_area_before = mesh.face_area(first_face_id);
None
let face_area_after = mesh.face_area(first_face_id);
None
assert_eq!(4.0 * face_area_before, face_area_after);
None
mesh.is_valid().unwrap();
None
ok(())
None
}
None