library: shape: sphere: optional deserialization

This commit is contained in:
Bruno BELANYI 2020-03-19 13:08:36 +01:00
parent 9857879a75
commit c4a40fab25

View file

@ -8,6 +8,7 @@ use serde::Deserialize;
#[derive(Clone, Debug, PartialEq, Deserialize)] #[derive(Clone, Debug, PartialEq, Deserialize)]
pub struct Sphere { pub struct Sphere {
/// The sphere is inverted if it is expected to be seen from the inside. /// The sphere is inverted if it is expected to be seen from the inside.
#[serde(default)]
inverted: bool, inverted: bool,
/// The center of the sphere in space. /// The center of the sphere in space.
center: Point, center: Point,