pub fn points(&mut self, plot: &mut Plot, mesh: &Mesh) {
        if mesh.ndim == 2 {
            self.canvas_points.points_begin();
            mesh.points.iter().for_each(|point| {
                self.canvas_points.points_add(point.coords[0], point.coords[1]);
            });
            self.canvas_points.points_end();
        } else {
            self.canvas_points.points_3d_begin();
            mesh.points.iter().for_each(|point| {
                self.canvas_points
                    .points_3d_add(point.coords[0], point.coords[1], point.coords[2]);
            });
            self.canvas_points.points_3d_end();
        }
        plot.add(&self.canvas_points);
    }
/// Draws all points (markers)
///
/// # Input
///
/// * `plot` -- the plot instance (to be updated)
/// * `mesh` -- the mesh
Draws all points (markers)
Draws all points ( markers )
pub fn points(&mut self, plot: &mut Plot, mesh: &Mesh) {
        if mesh.ndim == 2 {
            self.canvas_points.points_begin();
            mesh.points.iter().for_each(|point| {
                self.canvas_points.points_add(point.coords[0], point.coords[1]);
            });
            self.canvas_points.points_end();
        } else {
            self.canvas_points.points_3d_begin();
            mesh.points.iter().for_each(|point| {
                self.canvas_points
                    .points_3d_add(point.coords[0], point.coords[1], point.coords[2]);
            });
            self.canvas_points.points_3d_end();
        }
        plot.add(&self.canvas_points);
    }
pub fn points ( & mut self , plot : & mut Plot , mesh : & Mesh ) { if mesh . ndim == 2 { self . canvas_points . points_begin ( ) ; mesh . points . iter ( ) . for_each ( | point | { self . canvas_points . points_add ( point . coords [ 0 ] , point . coords [ 1 ] ) ; } ) ; self . canvas_points . points_end ( ) ; } else { self . canvas_points . points_3d_begin ( ) ; mesh . points . iter ( ) . for_each ( | point | { self . canvas_points . points_3d_add ( point . coords [ 0 ] , point . coords [ 1 ] , point . coords [ 2 ] ) ; } ) ; self . canvas_points . points_3d_end ( ) ; } plot . add ( & self . canvas_points ) ; }
Draws all points (markers)
Draws all points ( markers )
&mut self
plot
&mut Plot
mesh
&Mesh
&mut self
plot
&mut Plot
mesh
&Mesh
input
`plot` -- the plot instance (to be updated)
`mesh` -- the mesh
` plot ` -- the plot instance ( to be updated ) ` mesh ` -- the mesh