Trait nalgebra::PointAsVector [] [src]

pub trait PointAsVector {
    type Vector;
    fn to_vector(self) -> Self::Vector;
    fn as_vector<'a>(&'a self) -> &'a Self::Vector;
    fn set_coords(&mut self, coords: Self::Vector);
}

Trait that relates a point of an affine space to a vector of the associated vector space.

Associated Types

type Vector

The vector type of the vector space associated to this point's affine space.

Required Methods

fn to_vector(self) -> Self::Vector

Converts this point to its associated vector.

fn as_vector<'a>(&'a self) -> &'a Self::Vector

Converts a reference to this point to a reference to its associated vector.

fn set_coords(&mut self, coords: Self::Vector)

Sets the coordinates of this point to match those of a given vector.

Implementors