[][src]Struct libosu::HitObject

pub struct HitObject {
    pub pos: Point<i32>,
    pub start_time: TimeLocation,
    pub kind: HitObjectKind,
    pub new_combo: bool,
    pub timing_point: Option<TimingPoint>,
    pub skip_color: i32,
    pub additions: Additions,
    pub sample_info: SampleInfo,
}

Represents a single hit object.

Fields

pos: Point<i32>

The position on the map at which this hit object is located (head for sliders).

start_time: TimeLocation

When this hit object occurs during the map.

kind: HitObjectKind

The kind of HitObject this represents (circle, slider, spinner).

new_combo: bool

Whether or not this object begins a new combo.

timing_point: Option<TimingPoint>

Reference to the timing point under which this HitObject belongs.

skip_color: i32

The number of combo colors to skip

additions: Additions

The hitsound additions attached to this hit object.

sample_info: SampleInfo

The sample used to play the hitsound assigned to this hit object.

Implementations

impl HitObject[src]

pub fn end_pos(&self) -> Option<Point<f64>>[src]

Computes the point at which the hitobject ends

impl HitObject[src]

pub fn from_osz(input: &str) -> Result<HitObject, Error>[src]

Creates a HitObject from the *.osz format

pub fn as_osz(&self) -> Result<String, Error>[src]

Serializes this HitObject into the *.osz format.

Trait Implementations

impl Clone for HitObject[src]

impl Debug for HitObject[src]

impl Eq for HitObject[src]

impl Ord for HitObject[src]

impl PartialEq<HitObject> for HitObject[src]

impl PartialOrd<HitObject> for HitObject[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.