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.

The beats per minute of the map.

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]).

Pass the path to a .osu file.

Useful when you don’t want to create the File manually. If you have the file lying around already though (and plan on re-using it), passing &file to parse should be preferred.

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

Returns a builder for performance calculation. 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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.