ioss 0.0.3

Io celestial simulation crate for the MilkyWay SolarSystem workspace
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct SphericalPatch {
    pub resolution: usize,
}

impl SphericalPatch {
    pub fn new(resolution: usize) -> Self {
        Self { resolution }
    }
    pub fn vertex_count(&self) -> usize {
        (self.resolution + 1) * (self.resolution + 1)
    }
    pub fn triangle_count(&self) -> usize {
        self.resolution * self.resolution * 2
    }
}