Struct libosu::TimingPoint [−][src]
pub struct TimingPoint { pub time: TimeLocation, pub kiai: bool, pub sample_set: SampleSet, pub sample_index: u32, pub volume: u16, pub mpb: f64, pub kind: TimingPointKind, }
A timing point, which represents configuration settings for a timing section.
This is a generic timing point struct representing both inherited and uninherited timing
points, distinguished by the kind
field.
Fields
time: TimeLocation
The timestamp of this timing point, represented as a TimeLocation
.
kiai: bool
Whether or not Kiai time should be on for this timing point.
sample_set: SampleSet
The sample set associated with this timing section.
sample_index: u32
Index (if using a custom sample)
volume: u16
Volume of this timing section.
mpb: f64
Milliseconds per beat
kind: TimingPointKind
The type of this timing point. See TimingPointKind
.
Methods
impl TimingPoint
[src]
impl TimingPoint
pub fn from_osz(
input: impl AsRef<str>,
parent: &Option<TimingPoint>
) -> Result<TimingPoint, Error>
[src]
pub fn from_osz(
input: impl AsRef<str>,
parent: &Option<TimingPoint>
) -> Result<TimingPoint, Error>
Creates a TimingPoint from the *.osz format
pub fn as_osz(&self) -> Result<String, Error>
[src]
pub fn as_osz(&self) -> Result<String, Error>
Serializes this TimingPoint into the *.osz format.
impl TimingPoint
[src]
impl TimingPoint
pub fn set_parent(&mut self, tp: &TimingPoint)
[src]
pub fn set_parent(&mut self, tp: &TimingPoint)
Sets the parent of this TimingPoint to the given TimingPoint.
pub fn get_uninherited_ancestor(&self) -> &TimingPoint
[src]
pub fn get_uninherited_ancestor(&self) -> &TimingPoint
Gets the closest parent that is an uninherited timing point.
pub fn get_bpm(&self) -> f64
[src]
pub fn get_bpm(&self) -> f64
Gets the BPM of this timing section by climbing the timing section tree.
pub fn get_meter(&self) -> u32
[src]
pub fn get_meter(&self) -> u32
Gets the meter of this timing section by climbing the timing section tree.
pub fn get_beat_duration(&self) -> f64
[src]
pub fn get_beat_duration(&self) -> f64
Returns the number of milliseconds in a beat for this timing section.
Trait Implementations
impl Clone for TimingPoint
[src]
impl Clone for TimingPoint
fn clone(&self) -> TimingPoint
[src]
fn clone(&self) -> TimingPoint
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for TimingPoint
[src]
impl Debug for TimingPoint
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for TimingPoint
[src]
impl Eq for TimingPoint
impl PartialEq for TimingPoint
[src]
impl PartialEq for TimingPoint
fn eq(&self, other: &TimingPoint) -> bool
[src]
fn eq(&self, other: &TimingPoint) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Ord for TimingPoint
[src]
impl Ord for TimingPoint
fn cmp(&self, other: &TimingPoint) -> Ordering
[src]
fn cmp(&self, other: &TimingPoint) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl PartialOrd for TimingPoint
[src]
impl PartialOrd for TimingPoint
fn partial_cmp(&self, other: &TimingPoint) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &TimingPoint) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Serialize for TimingPoint
[src]
impl Serialize for TimingPoint
Auto Trait Implementations
impl Send for TimingPoint
impl Send for TimingPoint
impl Sync for TimingPoint
impl Sync for TimingPoint