[][src]Struct rustbatch::math::base::Base

pub struct Base {
    pub a: Vect,
    pub b: Vect,
    // some fields omitted
}

Base is useful for for simulating car movement though method is so precise that you can chain lot of bases and make totally smooth moving centipede

Fields

a: Vectb: Vect

Implementations

impl Base[src]

pub const ZERO: Self[src]

pub fn new(a: Vect, b: Vect) -> Self[src]

pub fn rotation(&self) -> f32[src]

returns base rotation

pub fn center(&self) -> Vect[src]

returns base center

pub fn rotate_around(&mut self, delta: f32, point: Vect)[src]

rotates base around pivot point

pub fn rotate(&mut self, delta: f32)[src]

rotates base around its center

pub fn dir(&self) -> Vect[src]

returns direction base is heading

pub fn set_pos(&mut self, pos: Vect)[src]

sets the base position

pub fn set_rot(&mut self, rot: f32)[src]

sets the base rotation

pub fn pull(&mut self, force: Vect) -> Vect[src]

tha main feature if base. Pulling base creates smooth movement where beck point is dragged by front point. It returns the movement if back point witch you can use to move another base "connected" to this one

Trait Implementations

impl Clone for Base[src]

impl Copy for Base[src]

impl Debug for Base[src]

Auto Trait Implementations

impl RefUnwindSafe for Base

impl Send for Base

impl Sync for Base

impl Unpin for Base

impl UnwindSafe for Base

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,