use super::*;
#[derive(Clone, Copy, Data, Debug, Default, New, PartialEq)]
pub struct GerstnerWaveComponent {
#[get(type(copy))]
pub(crate) direction: Vec2,
#[get(type(copy))]
pub(crate) wavelength_m: f32,
#[get(type(copy))]
pub(crate) amplitude_m: f32,
#[get(type(copy))]
pub(crate) steepness: f32,
#[get(type(copy))]
pub(crate) phase_offset: f32,
#[get(type(copy))]
pub(crate) speed_multiplier: f32,
#[get(type(copy))]
pub(crate) cascade_index: u8,
}
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct OceanOpticalConfig {
#[get(type(copy))]
pub(crate) absorption_coeff: Vec3,
#[get(type(copy))]
pub(crate) deep_scatter_color: Vec3,
#[get(type(copy))]
pub(crate) shallow_tint_color: Vec3,
#[get(type(copy))]
pub(crate) sss_color: Vec3,
#[get(type(copy))]
pub(crate) foam_color: Vec3,
#[get(type(copy))]
pub(crate) fresnel_f0: f32,
#[get(type(copy))]
pub(crate) sss_strength: f32,
#[get(type(copy))]
pub(crate) caustics_strength: f32,
#[get(type(copy))]
pub(crate) foam_jacobian_threshold: f32,
}
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct OceanConfig {
#[get(type(copy))]
pub(crate) preset: OceanPreset,
#[get(type(copy))]
pub(crate) wind_speed_mps: f32,
#[get(type(copy))]
pub(crate) wind_direction: Vec2,
#[get(type(copy))]
pub(crate) fetch_km: f32,
#[get(type(copy))]
pub(crate) choppiness: f32,
#[get(type(copy))]
pub(crate) mean_water_level_y: f32,
#[get(type(copy))]
pub(crate) gravity_mps2: f32,
#[get(type(copy))]
pub(crate) cascade_count: u8,
#[get(type(copy))]
pub(crate) seed: u64,
#[get(type(copy))]
pub(crate) optics: OceanOpticalConfig,
}
#[derive(Clone, Copy, Data, Debug, Default, New, PartialEq)]
pub struct OceanSurfaceSample {
#[get(type(copy))]
pub(crate) displaced_position: Vec3,
#[get(type(copy))]
pub(crate) displacement: Vec3,
#[get(type(copy))]
pub(crate) normal: Vec3,
#[get(type(copy))]
pub(crate) tangent_x: Vec3,
#[get(type(copy))]
pub(crate) tangent_z: Vec3,
#[get(type(copy))]
pub(crate) jacobian: f32,
#[get(type(copy))]
pub(crate) foam_mask: f32,
}
#[derive(Clone, Copy, Data, Debug, Default, New, PartialEq)]
pub struct OceanOpticalSample {
#[get(type(copy))]
pub(crate) transmittance: Vec3,
#[get(type(copy))]
pub(crate) fresnel: f32,
#[get(type(copy))]
pub(crate) subsurface_scatter: Vec3,
#[get(type(copy))]
pub(crate) caustics_intensity: f32,
#[get(type(copy))]
pub(crate) water_color: Vec3,
}
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct OceanPatchDesc {
#[get(type(copy))]
pub(crate) center_xz: Vec2,
#[get(type(copy))]
pub(crate) extent_x: f32,
#[get(type(copy))]
pub(crate) extent_z: f32,
#[get(type(copy))]
pub(crate) subdivisions_x: usize,
#[get(type(copy))]
pub(crate) subdivisions_z: usize,
#[get(type(copy))]
pub(crate) lod_radial_falloff: f32,
#[get(type(copy))]
pub(crate) seabed_y: f32,
}
#[derive(Clone, Data, Debug, PartialEq)]
pub struct OceanSurface3D {
#[get(type(copy))]
pub(crate) config: OceanConfig,
pub(crate) waves: Vec<GerstnerWaveComponent>,
#[get(type(copy))]
pub(crate) sim_time_secs: f32,
}
#[derive(Clone, Copy, Data, Debug, Default, New, PartialEq)]
pub struct PontoonSamplePoint {
#[get(type(copy))]
pub(crate) local_offset: Vec3,
#[get(type(copy))]
pub(crate) submerged_volume_m3: f32,
#[get(type(copy))]
pub(crate) sample_radius_m: f32,
}
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct BuoyantHullConfig {
#[get(type(copy))]
pub(crate) mass_kg: f32,
#[get(type(copy))]
pub(crate) inertia_diag: Vec3,
#[get(type(copy))]
pub(crate) fluid_density_kgm3: f32,
#[get(type(copy))]
pub(crate) gravity_mps2: f32,
#[get(type(copy))]
pub(crate) linear_drag: f32,
#[get(type(copy))]
pub(crate) quadratic_drag: f32,
#[get(type(copy))]
pub(crate) angular_drag: f32,
#[get(type(copy))]
pub(crate) slope_alignment_torque: f32,
#[get(type(copy))]
pub(crate) max_linear_speed: f32,
#[get(type(copy))]
pub(crate) max_angular_speed: f32,
}
#[derive(Clone, Data, Debug, PartialEq)]
pub struct BuoyantHull3D {
#[get(type(copy))]
pub(crate) config: BuoyantHullConfig,
#[get(type(copy))]
pub(crate) position: Vec3,
#[get(type(copy))]
pub(crate) velocity: Vec3,
#[get(type(copy))]
pub(crate) orientation: Quat,
#[get(type(copy))]
pub(crate) angular_velocity: Vec3,
pub(crate) pontoons: Vec<PontoonSamplePoint>,
#[get(type(copy))]
pub(crate) submerged_fraction: f32,
#[get(type(copy))]
pub(crate) buoyancy_force: Vec3,
}