[−][src]Struct rustbatch::math::base::Base
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: Vect
b: 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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,