Recursively finds points that are inside the specified radius around a given
position.

@private
@param {Vector3} point - A position.
@param {Number} radius - A radius.
@param {Boolean} skipSelf - Whether a point that is exactly at the given position should be skipped.
@param {Octant} octant - The current octant.
@param {Array<Object>} result - An array to be filled with objects.
@property {Vector3} point - A point.
@property {Object} data - The data that belongs to the point.
function findPoints(point, radius, skipSelf, octant, result) {

	const children = octant.children;

	let i, l;

	if(children !== null) {

		let child;

		for(i = 0, l = children.length; i < l; ++i) {

			child = children[i];

			if(child.contains(point, radius)) {

				findPoints(point, radius, skipSelf, child, result);

			}

		}

	} else if(octant.points !== null) {

		const points = octant.points;
		const rSq = radius * radius;

		let p;

		for(i = 0, l = points.length; i < l; ++i) {

			p = points[i];

			if(p.equals(point)) {

				if(!skipSelf) {

					result.push({
						point: p.clone(),
						data: octant.data[i]
					});

				}

			} else if(p.distanceToSquared(point) <= rSq) {

				result.push({
					point: p.clone(),
					data: octant.data[i]
				});

			}

		}

	}

}