Struct rosu_pp::parse::Beatmap [−][src]
pub struct Beatmap {Show 15 fields
pub mode: GameMode,
pub version: u8,
pub n_circles: u32,
pub n_sliders: u32,
pub n_spinners: u32,
pub ar: f32,
pub od: f32,
pub cs: f32,
pub hp: f32,
pub slider_mult: f64,
pub tick_rate: f64,
pub hit_objects: Vec<HitObject>,
pub timing_points: Vec<TimingPoint>,
pub difficulty_points: Vec<DifficultyPoint>,
pub stack_leniency: f32,
}
Expand description
The main beatmap struct containing all data relevant for difficulty and pp calculation
Fields
mode: GameMode
The game mode.
version: u8
The version of the .osu file.
n_circles: u32
The amount of circles.
n_sliders: u32
The amount of sliders.
n_spinners: u32
The amount of spinners.
ar: f32
The approach rate.
od: f32
The overall difficulty.
cs: f32
The circle size.
hp: f32
The health drain rate.
slider_mult: f64
Base slider velocity in pixels per beat
tick_rate: f64
Amount of slider ticks per beat.
hit_objects: Vec<HitObject>
All hitobjects of the beatmap.
timing_points: Vec<TimingPoint>
Timing points that indicate a new timing section.
difficulty_points: Vec<DifficultyPoint>
Timing point for the current timing section.
stack_leniency: f32
The stack leniency that is used to calculate the stack offset for stacked positions.
Implementations
Extract a beatmap’s attributes into their own type.
Parse a beatmap from a .osu
file.
As argument you can give anything that implements std::io::Read
.
You’ll likely want to pass (a reference of) a File
or the file’s content as a slice of bytes (&[u8]
).
Trait Implementations
Calculate the stars and other attributes of a beatmap which are required for pp calculation.
Calculate the max pp of a beatmap. Read more
Calculate the strains of a map.
This essentially performs the same calculation as a stars
function but
instead of evaluating the final strains, they are just returned as is. Read more
fn gradual_difficulty(&self, mods: impl Mods) -> GradualDifficultyAttributes<'_>ⓘNotable traits for GradualDifficultyAttributes<'_>impl Iterator for GradualDifficultyAttributes<'_> type Item = DifficultyAttributes;
fn gradual_difficulty(&self, mods: impl Mods) -> GradualDifficultyAttributes<'_>ⓘNotable traits for GradualDifficultyAttributes<'_>impl Iterator for GradualDifficultyAttributes<'_> type Item = DifficultyAttributes;
impl Iterator for GradualDifficultyAttributes<'_> type Item = DifficultyAttributes;
Return an iterator that gives you the DifficultyAttributes
after each hit object. Read more
Return a struct that gives you the PerformanceAttributes
after every (few) hit object(s). Read more
Auto Trait Implementations
impl RefUnwindSafe for Beatmap
impl UnwindSafe for Beatmap
Blanket Implementations
Mutably borrows from an owned value. Read more