array-backed rewrite

This commit is contained in:
Quaternions 2024-09-06 13:25:59 -07:00
parent dc79b4011d
commit ab6c5d583d
2 changed files with 6 additions and 6 deletions

View File

@ -126,9 +126,9 @@ fn generate_bvh_node<T>(boxen:Vec<(T,Aabb)>,force:bool)->BvhNode<T>{
let mut sort_z=Vec::with_capacity(n);
for (i,(_,aabb)) in boxen.iter().enumerate(){
let center=aabb.center();
sort_x.push((i,center.x()));
sort_y.push((i,center.y()));
sort_z.push((i,center.z()));
sort_x.push((i,center.x));
sort_y.push((i,center.y));
sort_z.push((i,center.z));
}
sort_x.sort_by(|tup0,tup1|tup0.1.cmp(&tup1.1));
sort_y.sort_by(|tup0,tup1|tup0.1.cmp(&tup1.1));

View File

@ -428,9 +428,9 @@ impl TryFrom<[f32;3]> for Unit32Vec3{
*/
pub type Planar64=fixed_wide::types::I32F32;
pub type Planar64Vec3=fixed_wide_vectors::Vector3<Planar64>;
pub type Planar64Mat3=fixed_wide_vectors::Matrix3<Planar64Vec3>;
pub type Planar64Affine3=fixed_wide_vectors::Matrix4<Planar64Vec3>;
pub type Planar64Vec3=fixed_wide_vectors::types::Vector3<Planar64>;
pub type Planar64Mat3=fixed_wide_vectors::types::Matrix3<Planar64>;
pub type Planar64Affine3=fixed_wide_vectors::types::Matrix4x3<Planar64>;
#[test]
fn test_sqrt(){