[][src]Struct geomath::point::Point

pub struct Point<T> {
    pub position: T,
    pub speed: T,
    pub trajectory: Trajectory<T>,
}

Generic structure and documentation for points

Fields

position: Tspeed: Ttrajectory: Trajectory<T>

Methods

impl<T> Point<T> where
    T: Copy + Clone + AddAssign<T> + SubAssign<T>, 
[src]

pub fn new(position: T, speed: T) -> Point<T>[src]

Construct a point with given position and speed vectors

pub fn update_trajectory(&mut self) -> &mut Self[src]

Updates trajectory

The value of position is pushed into the trajectory.

pub fn reset_origin(&mut self, origin: &Self, old_origin: &Self) -> &mut Self[src]

Change the origin

This method also changes the origin of the trajectory.

Trait Implementations

impl<T> Add<Point<T>> for Point<T> where
    T: AddAssign<T> + Copy + Clone + SubAssign<T>, 
[src]

type Output = Point<T>

The resulting type after applying the + operator.

impl<T> Add<T> for Point<T> where
    T: AddAssign<T> + Copy + Clone + SubAssign<T>, 
[src]

type Output = Point<T>

The resulting type after applying the + operator.

impl<T> AddAssign<Point<T>> for Point<T> where
    T: AddAssign<T> + Copy + Clone + SubAssign<T>, 
[src]

impl<T> AddAssign<T> for Point<T> where
    T: AddAssign<T> + Copy + Clone + SubAssign<T>, 
[src]

impl<T: Clone> Clone for Point<T>[src]

impl<T: Copy> Copy for Point<T>[src]

impl<T> Debug for Point<T> where
    T: Debug + Copy + Clone + AddAssign<T> + SubAssign<T>, 
[src]

impl<T> Div<f64> for Point<T> where
    T: DivAssign<f64> + Copy + Clone + AddAssign<T> + SubAssign<T>, 
[src]

type Output = Point<T>

The resulting type after applying the / operator.

impl<T> DivAssign<f64> for Point<T> where
    T: DivAssign<f64> + Copy + Clone + AddAssign<T> + SubAssign<T>, 
[src]

impl From<Point<Vector2>> for Vector4[src]

impl<T> Initializer for Point<T> where
    T: Initializer + Copy + Clone + AddAssign<T> + SubAssign<T>, 
[src]

impl<T> Metric for Point<T> where
    T: Metric + Copy + Clone + AddAssign<T> + SubAssign<T>, 
[src]

impl<T> Mul<f64> for Point<T> where
    T: MulAssign<f64> + Copy + Clone + AddAssign<T> + SubAssign<T>, 
[src]

type Output = Point<T>

The resulting type after applying the * operator.

impl<T> MulAssign<f64> for Point<T> where
    T: MulAssign<f64> + Copy + Clone + AddAssign<T> + SubAssign<T>, 
[src]

impl<T> PartialEq<Point<T>> for Point<T> where
    T: PartialEq<T> + Copy + Clone + AddAssign<T> + SubAssign<T>, 
[src]

impl<T> Reset<Point<T>> for Point<T> where
    T: Reset<T> + Copy + Clone + AddAssign<T> + SubAssign<T>, 
[src]

impl<T> Sub<Point<T>> for Point<T> where
    T: SubAssign<T> + Copy + Clone + AddAssign<T>, 
[src]

type Output = Point<T>

The resulting type after applying the - operator.

impl<T> Sub<T> for Point<T> where
    T: SubAssign<T> + Copy + Clone + AddAssign<T>, 
[src]

type Output = Point<T>

The resulting type after applying the - operator.

impl<T> SubAssign<Point<T>> for Point<T> where
    T: SubAssign<T> + Copy + Clone + AddAssign<T>, 
[src]

impl<T> SubAssign<T> for Point<T> where
    T: SubAssign<T> + Copy + Clone + AddAssign<T>, 
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Point<T> where
    T: RefUnwindSafe

impl<T> Send for Point<T> where
    T: Send

impl<T> Sync for Point<T> where
    T: Sync

impl<T> Unpin for Point<T> where
    T: Unpin

impl<T> UnwindSafe for Point<T> where
    T: UnwindSafe

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.