Skip to main content

LineVector

Trait LineVector 

Source
pub trait LineVector: CurveVector {
    const TYPE_NAME: &'static str;

    // Required methods
    fn lerp_line(v1: &Self, v2: &Self, t: f64) -> Self;
    fn direction(v1: &Self, v2: &Self) -> Self;
}
Expand description

The arithmetic LineCurve.getPoint / getTangent need beyond CurveVector; implemented for Vector2 and Vector3.

Required Associated Constants§

Source

const TYPE_NAME: &'static str

'LineCurve' or 'LineCurve3'.

Required Methods§

Source

fn lerp_line(v1: &Self, v2: &Self, t: f64) -> Self

point.copy( v2 ).sub( v1 ); point.multiplyScalar( t ).add( v1 ).

Source

fn direction(v1: &Self, v2: &Self) -> Self

optionalTarget.subVectors( v2, v1 ).normalize().

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl LineVector for Vector2

Source§

const TYPE_NAME: &'static str = "LineCurve"

Source§

impl LineVector for Vector3

Source§

const TYPE_NAME: &'static str = "LineCurve3"