quaver-rs 0.1.0

A Rust library for parsing and analyzing Quaver rhythm game maps
Documentation
use crate::rulesets::structs::{finger_state::FingerState, ln_layer_type::LnLayerType};
use crate::hit_object_info::HitObjectInfo;

/// An expanded version of hit object that is used for QSS implementations in API/editor/calculation
#[derive(Debug, Clone)]
pub struct StrainSolverHitObject {
    /// The HitObject this class is referencing
    pub hit_object: HitObjectInfo,
    
    /// Current Finger State of the hit object
    pub finger_state: FingerState,
    
    /// Current type of layering relating to LN
    pub ln_layer_type: LnLayerType,
    
    /// Strain Multiplier calculated by LN difficulty
    pub ln_strain_multiplier: f32,
    
    /// Current Strain Value for this hit object.
    pub strain_value: f32,
}

impl StrainSolverHitObject {
    /// Constructor
    pub fn new(hit_object: HitObjectInfo) -> Self {
        Self {
            hit_object,
            finger_state: FingerState::NONE,
            ln_layer_type: LnLayerType::None,
            ln_strain_multiplier: 1.0,
            strain_value: 0.0,
        }
    }
}