euv-core 0.56.0

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
use super::*;

/// Stateless modular architectural asset generator producing multi-part `Mesh3D` structures.
#[derive(Clone, Copy, Debug, Default)]
pub struct ArchKit;

/// Stateless modular vehicle generator producing multi-part `Mesh3D` vehicles.
#[derive(Clone, Copy, Debug, Default)]
pub struct VehicleKit;

/// Parametric configuration for `ArchKit::skyscraper`.
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct SkyscraperConfig {
    /// Footprint width along X.
    #[get(type(copy))]
    pub(crate) width: f32,
    /// Footprint depth along Z.
    #[get(type(copy))]
    pub(crate) depth: f32,
    /// Number of occupied tower floors (`3..=80`).
    #[get(type(copy))]
    pub(crate) floors: u32,
    /// Vertical height per floor.
    #[get(type(copy))]
    pub(crate) floor_height: f32,
    /// Whether to add a stepped upper crown and rooftop spire.
    #[get(type(copy))]
    pub(crate) has_spire: bool,
    /// Primary structural stone/metal frame material.
    #[get(type(copy))]
    pub(crate) frame_material: PbrMaterial,
    /// Curtain-wall glazing material.
    #[get(type(copy))]
    pub(crate) glass_material: PbrMaterial,
}

/// Parametric configuration for `ArchKit::courtyard`.
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct CourtyardConfig {
    /// Outer courtyard width along X.
    #[get(type(copy))]
    pub(crate) width: f32,
    /// Outer courtyard depth along Z.
    #[get(type(copy))]
    pub(crate) depth: f32,
    /// Perimeter colonnade wall height.
    #[get(type(copy))]
    pub(crate) wall_height: f32,
    /// Number of columns per perimeter side (`2..=12`).
    #[get(type(copy))]
    pub(crate) columns_per_side: u32,
    /// Structural masonry material.
    #[get(type(copy))]
    pub(crate) stone_material: PbrMaterial,
    /// Central plaza paving material.
    #[get(type(copy))]
    pub(crate) floor_material: PbrMaterial,
}

/// Parametric configuration for `ArchKit::bridge`.
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct BridgeConfig {
    /// Total bridge span along Z.
    #[get(type(copy))]
    pub(crate) span: f32,
    /// Deck width along X.
    #[get(type(copy))]
    pub(crate) width: f32,
    /// Deck elevation above base pier level `y = 0`.
    #[get(type(copy))]
    pub(crate) deck_height: f32,
    /// Arch crown rise above the deck.
    #[get(type(copy))]
    pub(crate) arch_rise: f32,
    /// Number of vertical suspender hangers per arch rib (`3..=24`).
    #[get(type(copy))]
    pub(crate) hanger_count: u32,
    /// Structural steel/stone arch and pier material.
    #[get(type(copy))]
    pub(crate) structure_material: PbrMaterial,
    /// Roadway deck surface material.
    #[get(type(copy))]
    pub(crate) deck_material: PbrMaterial,
}

/// Parametric configuration for `ArchKit::archway`.
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct ArchwayConfig {
    /// Clear opening span between inner piers.
    #[get(type(copy))]
    pub(crate) opening_width: f32,
    /// Pier height up to the arch spring line.
    #[get(type(copy))]
    pub(crate) spring_height: f32,
    /// Archway wall thickness along Z.
    #[get(type(copy))]
    pub(crate) thickness: f32,
    /// Width of each masonry pier and voussoir ring.
    #[get(type(copy))]
    pub(crate) pier_width: f32,
    /// Architectural arch profile style.
    #[get(type(copy))]
    pub(crate) style: ArchStyle,
    /// Stone masonry material.
    #[get(type(copy))]
    pub(crate) material: PbrMaterial,
}

/// Parametric configuration for `ArchKit::staircase`.
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct StaircaseConfig {
    /// Number of steps (`3..=64`).
    #[get(type(copy))]
    pub(crate) steps: u32,
    /// Step tread width.
    #[get(type(copy))]
    pub(crate) width: f32,
    /// Vertical rise per step.
    #[get(type(copy))]
    pub(crate) step_rise: f32,
    /// Horizontal tread depth per step (used for straight flights).
    #[get(type(copy))]
    pub(crate) step_run: f32,
    /// Generates a spiral staircase around a central pole when `true`.
    #[get(type(copy))]
    pub(crate) is_spiral: bool,
    /// Total sweep angle in radians for spiral staircases.
    #[get(type(copy))]
    pub(crate) spiral_turns_rad: f32,
    /// Structural material for treads and stringers.
    #[get(type(copy))]
    pub(crate) step_material: PbrMaterial,
    /// Metallic material for handrails and balusters.
    #[get(type(copy))]
    pub(crate) rail_material: PbrMaterial,
}

/// Parametric configuration for `ArchKit::column`.
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct ColumnConfig {
    /// Base shaft radius.
    #[get(type(copy))]
    pub(crate) radius: f32,
    /// Total column height from plinth bottom to abacus top.
    #[get(type(copy))]
    pub(crate) height: f32,
    /// Radial lathe segments (`8..=48`).
    #[get(type(copy))]
    pub(crate) segments: u32,
    /// Classical stone/marble material.
    #[get(type(copy))]
    pub(crate) material: PbrMaterial,
}

/// Parametric configuration for `ArchKit::balcony`.
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct BalconyConfig {
    /// Balcony width along X.
    #[get(type(copy))]
    pub(crate) width: f32,
    /// Cantilevered projection depth along Z.
    #[get(type(copy))]
    pub(crate) depth: f32,
    /// Railing height above the slab surface.
    #[get(type(copy))]
    pub(crate) rail_height: f32,
    /// Number of vertical balusters along the front rail (`2..=24`).
    #[get(type(copy))]
    pub(crate) baluster_count: u32,
    /// Slab and corbel masonry material.
    #[get(type(copy))]
    pub(crate) slab_material: PbrMaterial,
    /// Baluster and handrail material.
    #[get(type(copy))]
    pub(crate) rail_material: PbrMaterial,
}

/// Parametric configuration for `VehicleKit::build`.
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct VehicleConfig {
    /// Vehicle silhouette class (`SportsCar`, `Sedan`, `Suv`, `Truck`).
    #[get(type(copy))]
    pub(crate) style: VehicleBodyStyle,
    /// Overall bumper-to-bumper vehicle length along Z.
    #[get(type(copy))]
    pub(crate) length: f32,
    /// Overall body width along X.
    #[get(type(copy))]
    pub(crate) width: f32,
    /// Overall roof height above `y = 0`.
    #[get(type(copy))]
    pub(crate) height: f32,
    /// Outer tire radius.
    #[get(type(copy))]
    pub(crate) wheel_radius: f32,
    /// Tire tread width.
    #[get(type(copy))]
    pub(crate) wheel_width: f32,
    /// Metallic car paint material.
    #[get(type(copy))]
    pub(crate) paint: PbrMaterial,
    /// Whether to attach a rear aerodynamic wing spoiler.
    #[get(type(copy))]
    pub(crate) has_spoiler: bool,
}