Skip to main content

ScalarType

Trait ScalarType 

Source
pub trait ScalarType:
    SimdRealField<Element = f32>
    + Copy
    + CrossProduct<Self::Vector, Result = Self::Vector>
    + DotProduct<Self, Result = Self> {
    type Pose: Copy + PoseOps<Self> + Mul<Self::Vector, Output = Self::Vector>;
    type Vector: Copy + Debug + Default + Neg<Output = Self::Vector> + Add<Self::Vector, Output = Self::Vector> + Sub<Self::Vector, Output = Self::Vector> + AddAssign<Self::Vector> + SubAssign<Self::Vector> + MulAssign<Self> + DivAssign<Self> + Mul<Self, Output = Self::Vector> + Index<usize, Output = Self> + DotProduct<Self::Vector, Result = Self> + OrthonormalBasis<Basis = [Self::Vector; 1]> + CrossProduct<Self::Vector, Result = Self> + CrossProductMatrix<CrossMat = Self::Vector, CrossMatTr = Self::Vector> + ComponentMul;
    type AngVector: Copy + Debug + Default + Add<Self::AngVector, Output = Self::AngVector> + Sub<Self::AngVector, Output = Self::AngVector> + AddAssign<Self::AngVector> + SubAssign<Self::AngVector> + MulAssign<Self> + DivAssign<Self> + Mul<Self, Output = Self::AngVector> + DotProduct<Self::AngVector, Result = Self> + One + From<Self>;
    type Matrix: Copy + Debug + MatrixColumn<Column = Self::Vector> + MulAssign<Self> + Mul<Self::Matrix, Output = Self::Matrix>;
    type AngInertia: AngularInertiaOps<Self, AngVector = Self::AngVector>;
    type Rotation: RotationOps<Self>;
}
Expand description

Trait for types that can be used as scalars in the generic code supporting both the scalar and AoSoA SIMD pattern.

This trait is mostly for internal use only. No other implementations of this trait is expected.

Required Associated Types§

Source

type Pose: Copy + PoseOps<Self> + Mul<Self::Vector, Output = Self::Vector>

The pose type (position + rotation) for this scalar.

Source

type Vector: Copy + Debug + Default + Neg<Output = Self::Vector> + Add<Self::Vector, Output = Self::Vector> + Sub<Self::Vector, Output = Self::Vector> + AddAssign<Self::Vector> + SubAssign<Self::Vector> + MulAssign<Self> + DivAssign<Self> + Mul<Self, Output = Self::Vector> + Index<usize, Output = Self> + DotProduct<Self::Vector, Result = Self> + OrthonormalBasis<Basis = [Self::Vector; 1]> + CrossProduct<Self::Vector, Result = Self> + CrossProductMatrix<CrossMat = Self::Vector, CrossMatTr = Self::Vector> + ComponentMul

The vector type for this scalar (2D).

Source

type AngVector: Copy + Debug + Default + Add<Self::AngVector, Output = Self::AngVector> + Sub<Self::AngVector, Output = Self::AngVector> + AddAssign<Self::AngVector> + SubAssign<Self::AngVector> + MulAssign<Self> + DivAssign<Self> + Mul<Self, Output = Self::AngVector> + DotProduct<Self::AngVector, Result = Self> + One + From<Self>

The angular vector type for this scalar (2D: scalar, 3D: vector).

Source

type Matrix: Copy + Debug + MatrixColumn<Column = Self::Vector> + MulAssign<Self> + Mul<Self::Matrix, Output = Self::Matrix>

The matrix type for this scalar.

Source

type AngInertia: AngularInertiaOps<Self, AngVector = Self::AngVector>

The angular inertia type for this scalar.

Source

type Rotation: RotationOps<Self>

The rotation type for this scalar.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ScalarType for f32

Implementors§