Trait geo_nd::Geometry3D

source ·
pub trait Geometry3D<Scalar: Float> {
    type Vec3: Vector<Scalar, 3>;
    type Vec4: Vector<Scalar, 4>;
    type Mat3: SqMatrix3<Self::Vec3, Scalar>;
    type Mat4: SqMatrix4<Scalar, Self::Vec3, Self::Vec4>;
    type Quat: Quaternion<Scalar, Self::Vec3, Self::Vec4>;
    type Trans: Transform<Scalar, Self::Vec3, Self::Vec4, Self::Mat4, Self::Quat>;
}
Expand description

The Geometry3D trait supplies a framework for implementing 3D vector and matrix operations, and should also include the quaternion type.

An implementation of Geometry3D can be used for OpenGL and Vulkan graphics, for example.

Required Associated Types§

source

type Vec3: Vector<Scalar, 3>

The type of a 3D vector

source

type Vec4: Vector<Scalar, 4>

The type of a 3D vector with an additional ‘1’ expected in its extra element if it is a position

source

type Mat3: SqMatrix3<Self::Vec3, Scalar>

The type of a 3D matrix that can transform Vec3

source

type Mat4: SqMatrix4<Scalar, Self::Vec3, Self::Vec4>

The type of a 3D matrix which allows for translations, that can transform Vec4

source

type Quat: Quaternion<Scalar, Self::Vec3, Self::Vec4>

The quaternion type that provides for rotations in 3D

source

type Trans: Transform<Scalar, Self::Vec3, Self::Vec4, Self::Mat4, Self::Quat>

The transform type

Implementations on Foreign Types§

source§

impl Geometry3D<f32> for f32

§

type Vec3 = FArray<f32, 3>

§

type Vec4 = FArray<f32, 4>

§

type Mat3 = FArray2<f32, 3, 9>

§

type Mat4 = FArray2<f32, 4, 16>

§

type Quat = QArray<f32, FArray<f32, 3>, FArray<f32, 4>>

§

type Trans = FQArrayTrans<f32>

source§

impl Geometry3D<f64> for f64

§

type Vec3 = FArray<f64, 3>

§

type Vec4 = FArray<f64, 4>

§

type Mat3 = FArray2<f64, 3, 9>

§

type Mat4 = FArray2<f64, 4, 16>

§

type Quat = QArray<f64, FArray<f64, 3>, FArray<f64, 4>>

§

type Trans = FQArrayTrans<f64>

Implementors§