예제 #1
0
파일: Body.cs 프로젝트: lewurm/benchmarker
		/**
	 * Evaluate gravitational field on the body.
	 * The original olden version calls a routine named "walkscan",
	 * but we use the same name that is in the Barnes code.
	 */
		public void hackGravity (double rsize, Node root)
		{
			MathVector pos0 = pos.cloneMathVector ();

			HG hg = HG.makeHG (this, pos);
			hg = root.walkSubTree (rsize * rsize, hg);
			phi = hg.phi0;
			newAcc = hg.acc0;
		}