public void Test_BarnesHutTree_Insert() { var bht = new BarnesHutTree(new ArborPoint(-1, -1), new ArborPoint(+1, +1), 0.5f); var node = new ArborNode("x"); node.Pt = new ArborPoint(0.5f, 0.5f); bht.Insert(node); }
private void ApplyBarnesHutRepulsion() { fBHTree.Reset(); int nodesCount = fNodes.Count; for (int i = 0; i < nodesCount; i++) { ArborNode node = fNodes[i]; fBHTree.Insert(node); } for (int i = 0; i < nodesCount; i++) { ArborNode node = fNodes[i]; fBHTree.ApplyForces(node, fRepulsion); } }