public void Query(AABB aabb, List <Body> bodies) { if (!this.aabb.Contains(aabb)) { return; } if (this.bodies.Count > 0) { bodies.AddRange(this.bodies); } left?.Query(aabb, bodies); right?.Query(aabb, bodies); }
public void Query(AABB aabb, List <Body> bodies) { if (!this.aabb.Contains(aabb)) { return; } //<if the aabb is not contained in the bvh node aabb> if (this.bodies.Count > 0) { bodies.AddRange(this.bodies); } //< check if the left / right node below is not null, use ? operator> left?.Query(aabb, bodies); //< query the left node passing in aabb and bodies > right?.Query(aabb, bodies); //< query the right node passing in aabb and bodies > }
public void Query(AABB aabb, List <Body> bodies) { if (!this.aabb.Contains(aabb)) { return; } if (this.bodies.Count > 0) { bodies.AddRange(this.bodies); } left?.Query(aabb, bodies); right?.Query(aabb, bodies); /*< check if the left / right node below is not null, use ? operator> * * < query the left node passing in aabb and bodies > * < query the right node passing in aabb and bodies >*/ }
public override void Query(AABB aabb, List <Body> bodies) { rootNode.Query(aabb, bodies); // update the number of potential collisions potentialCollisionCount = potentialCollisionCount + bodies.Count; }
public override void Query(AABB aabb, List <Body> bodies) { rootNode.Query(aabb, bodies); potentialColCount += bodies.Count; }
public override void Query(AABB aabb, List <Body> bodies) { rootNode.Query(aabb, bodies); potientialCollisionCount = potientialCollisionCount + bodies.Count; }