openconfiguration 1.5.0

OpenConfiguration (OC) is a modular, efficient and flexible approach for the uni-directional exchange of visual e-commerce configurations.
Documentation
use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[cfg_attr(feature = "schema", schemars(deny_unknown_fields))]
#[serde(rename_all = "camelCase")]

/// A Transformation of the UV Set of a Geometry  
/// Ordering S///T///R///V
/// This order minimizes shearing and improves
/// the posibility to fix tiling.
///
/// Combination with a MaterialMapping looks like this:
/// GS///GT///GR///MR///MS///MT///V
///
/// GS .. Matrix of GeometryMapping.Scale///
/// GT .. Matrix of GeometryMapping.Translation///
/// GR .. Matrix of GeometryMapping.Rotation
///
/// MR .. Matrix of TextureMapping.Rotation
/// MS .. Matrix of TextureMapping.Scale///
/// MT .. Matrix of TextureMapping.Translation///
///
/// V .. (UV)-Vector to be transformed
///
/// Rotation is clockwise in degrees
pub struct GeometryMapping {
    pub translation_s: f64,

    pub translation_t: f64,

    pub rotation: f64,

    #[serde(default = "default_scale")]
    ///////
    /// default value = 1
    ////
    pub scale_s: f64,

    #[serde(default = "default_scale")]
    ///////
    /// default value = 1
    ////
    pub scale_t: f64,
}

fn default_scale() -> f64 {
    1.0
}