pub trait IndexType: std::fmt::Debug + std::fmt::Display + Copy + TryInto<u32> {}
impl IndexType for usize {}
impl IndexType for u64 {}
impl IndexType for u32 {}
impl IndexType for u16 {}
impl IndexType for i32 {}
pub trait ScalarType: vector_traits::prelude::GenericScalar
where
Self::Vec3: vector_traits::prelude::SimdUpgradable<Simd = Self::Vec3Simd>,
{
const EPSILON_SQ: Self;
type Vec3: vector_traits::prelude::SimdUpgradable<Scalar = Self> + Default;
type Vec3Simd: vector_traits::prelude::GenericVector3<Scalar = Self> + Default;
}
impl ScalarType for f32 {
const EPSILON_SQ: Self = f32::EPSILON * f32::EPSILON;
type Vec3 = vector_traits::glam::Vec3;
type Vec3Simd = vector_traits::glam::Vec3A;
}
impl ScalarType for f64 {
const EPSILON_SQ: Self = f64::EPSILON * f64::EPSILON;
type Vec3 = vector_traits::glam::DVec3;
type Vec3Simd = vector_traits::glam::DVec3;
}