use num::{Zero, One}; use alga::general::Field; use core::{Scalar, OwnedSquareMatrix}; use core::dimension::{DimNameAdd, DimNameSum, U1}; use core::storage::OwnedStorage; use core::allocator::OwnedAllocator; use geometry::{TransformBase, TCategory}; impl TransformBase where N: Scalar + Zero + One, D: DimNameAdd, S: OwnedStorage, DimNameSum>, S::Alloc: OwnedAllocator, DimNameSum, S> { /// Creates a new identity transform. #[inline] pub fn identity() -> Self { Self::from_matrix_unchecked(OwnedSquareMatrix::::identity()) } } impl One for TransformBase where N: Scalar + Field, D: DimNameAdd, S: OwnedStorage, DimNameSum>, S::Alloc: OwnedAllocator, DimNameSum, S> { /// Creates a new identity transform. #[inline] fn one() -> Self { Self::identity() } }