forked from StrafesNET/strafe-client
comment on intersection test location
This commit is contained in:
parent
a3340143db
commit
8fc6a7fb8f
@ -29,6 +29,10 @@ impl BvhNode{
|
|||||||
match &self.content{
|
match &self.content{
|
||||||
&BvhNodeContent::Leaf(model)=>f(model),
|
&BvhNodeContent::Leaf(model)=>f(model),
|
||||||
BvhNodeContent::Branch(children)=>for child in children{
|
BvhNodeContent::Branch(children)=>for child in children{
|
||||||
|
//this test could be moved outside the match statement
|
||||||
|
//but that would test the root node aabb
|
||||||
|
//you're probably not going to spend a lot of time outside the map,
|
||||||
|
//so the test is extra work for nothing
|
||||||
if aabb.intersects(&child.aabb){
|
if aabb.intersects(&child.aabb){
|
||||||
child.the_tester(aabb,f);
|
child.the_tester(aabb,f);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user