1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use crate::Point64;

#[derive(Clone, Debug)]
pub struct Path64(pub(crate) Vec<Point64>);

impl Path64 {
    pub fn new(points: &Vec<Point64>) -> Self {
        Self(points.clone())
    }

    pub fn is_empty(&self) -> bool {
        self.0.is_empty()
    }

    pub fn len(&self) -> usize {
        self.0.len()
    }

    pub fn get_point(&self, index: usize) -> Point64 {
        self.0[index]
    }

    pub fn add_point(&mut self, point: Point64) {
        self.0.push(point)
    }
}