bvh: don't require T to implement Default
This commit is contained in:
parent
8012a459bf
commit
af1f1aad14
@ -19,11 +19,18 @@ impl<R,T> Default for RecursiveContent<R,T>{
|
|||||||
Self::Branch(Vec::new())
|
Self::Branch(Vec::new())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[derive(Default)]
|
|
||||||
pub struct BvhNode<T>{
|
pub struct BvhNode<T>{
|
||||||
content:RecursiveContent<BvhNode<T>,T>,
|
content:RecursiveContent<BvhNode<T>,T>,
|
||||||
aabb:Aabb,
|
aabb:Aabb,
|
||||||
}
|
}
|
||||||
|
impl<T> Default for BvhNode<T>{
|
||||||
|
fn default()->Self{
|
||||||
|
Self{
|
||||||
|
content:Default::default(),
|
||||||
|
aabb:Aabb::default(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
pub struct BvhWeightNode<W,T>{
|
pub struct BvhWeightNode<W,T>{
|
||||||
content:RecursiveContent<BvhWeightNode<W,T>,T>,
|
content:RecursiveContent<BvhWeightNode<W,T>,T>,
|
||||||
weight:W,
|
weight:W,
|
||||||
|
Loading…
Reference in New Issue
Block a user