public void Test_BarnesHutTree_ApplyForces() { 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.ApplyForces(node, 10000.0f); }
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); } }