common: integer: Planar64Affine3::from_translation
This commit is contained in:
parent
10ca30db2e
commit
ddedb56a3b
@ -660,6 +660,13 @@ impl Planar64Affine3{
|
|||||||
Self{matrix3,translation}
|
Self{matrix3,translation}
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
|
pub const fn from_translation(translation:Planar64Vec3)->Self{
|
||||||
|
Self{
|
||||||
|
matrix3:mat3::identity(),
|
||||||
|
translation,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
pub fn transform_point3(&self,point:Planar64Vec3)->vec3::Vector3<Fixed<2,64>>{
|
pub fn transform_point3(&self,point:Planar64Vec3)->vec3::Vector3<Fixed<2,64>>{
|
||||||
self.translation.fix_2()+self.matrix3*point
|
self.translation.fix_2()+self.matrix3*point
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user