aboutsummaryrefslogtreecommitdiff
path: root/src/scene/shapes/sphere.rs
blob: 95984223f69406876751dfc3b97b55ddc58ef768 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::Float;
use crate::core::{Ray, Vector3f};

pub struct Sphere {
    radius: Float,
    center: Vector3f,
}

impl Sphere {
    pub fn new(radius: Float, center: Vector3f) -> Sphere {
        Sphere {
            radius,
            center,
        }
    }
}