density-mesh-core 1.5.0

Core module for density mesh generator
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use serde::{Deserialize, Serialize};

/// Triangle.
#[derive(Debug, Default, Copy, Clone, PartialEq, Serialize, Deserialize)]
pub struct Triangle {
    /// First point.
    pub a: usize,
    /// Second point.
    pub b: usize,
    /// Third point.
    pub c: usize,
}

impl From<[usize; 3]> for Triangle {
    fn from([a, b, c]: [usize; 3]) -> Self {
        Self { a, b, c }
    }
}