From af1f1aad14f9ef69e32eaa83ed7da652f2f67273 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 9 Aug 2024 13:48:20 -0700 Subject: [PATCH] bvh: don't require T to implement Default --- src/bvh.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/bvh.rs b/src/bvh.rs index ab73f65..ee73355 100644 --- a/src/bvh.rs +++ b/src/bvh.rs @@ -19,11 +19,18 @@ impl Default for RecursiveContent{ Self::Branch(Vec::new()) } } -#[derive(Default)] pub struct BvhNode{ content:RecursiveContent,T>, aabb:Aabb, } +impl Default for BvhNode{ + fn default()->Self{ + Self{ + content:Default::default(), + aabb:Aabb::default(), + } + } +} pub struct BvhWeightNode{ content:RecursiveContent,T>, weight:W,