implement Planar64Vec3*i64 + Planar64Affine3::new

This commit is contained in:
Quaternions 2023-10-13 14:31:18 -07:00
parent bcd421c4dd
commit 9cb42009cb

View File

@ -627,6 +627,17 @@ impl std::ops::Mul<Planar64> for Planar64Vec3{
)) ))
} }
} }
impl std::ops::Mul<i64> for Planar64Vec3{
type Output=Planar64Vec3;
#[inline]
fn mul(self,rhs:i64)->Self::Output {
Planar64Vec3(glam::i64vec3(
self.0.x*rhs,
self.0.y*rhs,
self.0.z*rhs
))
}
}
impl std::ops::Mul<Time> for Planar64Vec3{ impl std::ops::Mul<Time> for Planar64Vec3{
type Output=Planar64Vec3; type Output=Planar64Vec3;
#[inline] #[inline]
@ -708,6 +719,9 @@ pub struct Planar64Affine3{
} }
impl Planar64Affine3{ impl Planar64Affine3{
pub fn new(matrix3:Planar64Mat3,transform:Planar64Vec3)->Self{
Self{matrix3,transform}
}
#[inline] #[inline]
pub fn transform_point3(&self,point:Planar64Vec3) -> Planar64Vec3{ pub fn transform_point3(&self,point:Planar64Vec3) -> Planar64Vec3{
Planar64Vec3( Planar64Vec3(