[][src]Struct carambolage::game::car::Car

pub(crate) struct Car {
    pub(crate) position: Vector3<f32>,
    pub(crate) rotation: Vector3<f32>,
    _velocity: Vector3<f32>,
    _force: Vector3<f32>,
    _mass: f32,
    boost: f32,
    pub(crate) model: Model,
    pub(crate) cuboid: Cuboid<f32>,
}

A GameObject controlled by a player.

Fields

Methods

impl Car
[src]

Create a new Car.

For model and color_palette see model_from_id() and color_from_id(). mass is the mass of the car in [kg]

Update the car position and velocity based on the internal car state for a given time step.

Draw the car to the currently bound framebuffer.

Return a Car file name from an id.

1:kart 2:parsche 3:farara 4:lamba 5:gtc1 6:gtc2 7:formula

Return a Car color palette file name from an id.

1:blue 2:green 3:lime 4:orange 5:purple 6:red 7:yellow

Auto Trait Implementations

impl Send for Car

impl Sync for Car

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

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

Performs the conversion.

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

Mutably borrows from an owned value. Read more

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

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

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<T> SetParameter for T

Sets value as a parameter of self.

impl<T> Same for T

Should always be Self

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.