Struct collider::HbVel [] [src]

pub struct HbVel {
    pub value: Vec2,
    pub resize: Vec2,
    pub end_time: f64,
}

Velocity information describing how a hitbox shape is changing over time.

Fields

The movement velocity of the hitbox.

A velocity describing how the hitbox dims are changing over time.

Since the width and height of the shape is greater than padding at all times, if a resize velocity is set that decreases the dimensions of the shape over time, then the user is responsible for ensuring that the shape will not decrease below this threshold. Collider may panic if this is violated.

An upper-bound on the time at which the hitbox will be updated by the user.

This is an advanced feature for efficiency and does not impact the results. Infinity is used as the default, but using a lower value may improve performance

Collider will panic if the end time is exceeded without update, at least in unoptimized builds. It is ultimately the user's responsibility to ensure that end times are not exceeded.

Methods

impl HbVel
[src]

[src]

Creates an HbVel with the given value.

[src]

Creates an HbVel with the given value and end_time.

[src]

Creates a stationary HbVel.

[src]

Creates a stationary HbVel with the given end_time.

Trait Implementations

impl PartialEq for HbVel
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Clone for HbVel
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for HbVel
[src]

[src]

Formats the value using the given formatter. Read more

impl From<Vec2> for HbVel
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl Send for HbVel

impl Sync for HbVel