nalgebra::geometry

Type Alias Point4

Source
pub type Point4<T> = Point<T, 4>;
Expand description

A statically sized 4-dimensional column point.

Because this is an alias, not all its methods are listed here. See the Point type too.

Aliased Type§

struct Point4<T> {
    pub coords: Matrix<T, Const<4>, Const<1>, <DefaultAllocator as Allocator<Const<4>>>::Buffer<T>>,
}

Fields§

§coords: Matrix<T, Const<4>, Const<1>, <DefaultAllocator as Allocator<Const<4>>>::Buffer<T>>

The coordinates of this point, i.e., the shift from the origin.

Implementations§

Source§

impl<T: Scalar> Point4<T>

Source

pub const fn new(x: T, y: T, z: T, w: T) -> Self

Initializes this point from its components.

§Example
let p = Point4::new(1.0, 2.0, 3.0, 4.0);
assert!(p.x == 1.0 && p.y == 2.0 && p.z == 3.0 && p.w == 4.0);

Trait Implementations§

Source§

impl From<BVec4> for Point4<bool>

Source§

fn from(e: BVec4) -> Point4<bool>

Converts to this type from the input type.
Source§

impl From<DVec4> for Point4<f64>

Source§

fn from(e: DVec4) -> Point4<f64>

Converts to this type from the input type.
Source§

impl From<IVec4> for Point4<i32>

Source§

fn from(e: IVec4) -> Point4<i32>

Converts to this type from the input type.
Source§

impl From<UVec4> for Point4<u32>

Source§

fn from(e: UVec4) -> Point4<u32>

Converts to this type from the input type.
Source§

impl From<Vec4> for Point4<f32>

Source§

fn from(e: Vec4) -> Point4<f32>

Converts to this type from the input type.