/// <summary> /// Calculates the position of the nodes according to parameters. /// </summary> /// <returns></returns> protected Vector3[] GetInterpolatedNodePositions() { int reducedDepthGridShape = Mathf.CeilToInt(Mathf.Sqrt(reducedDepth)); Vector3[] gridPositions = GridShape.ScaledUnitGrid(reducedDepthGridShape, reducedDepthGridShape, new Vector3(0, 0, 0), filterSpread); Vector3[] linePositionsX = LineShape.ScaledUnitLine(reducedDepth, new Vector3(0, 0, 0), new Vector3(1, 0, 0), filterSpread * (reducedDepthGridShape / (float)reducedDepth)); Vector3[] linePositionsZ = LineShape.ScaledUnitLine(reducedDepth, new Vector3(0, 0, 0), new Vector3(0, 0, 1), filterSpread * (reducedDepthGridShape / (float)reducedDepth)); Vector3[] linePositions = Shape.InterpolateShapes(linePositionsX, linePositionsZ, lineXToZ); Vector3[] circlePositions = CircleShape.ScaledUnitCircle(reducedDepth, new Vector3(0, 0, 0), filterSpread); Vector3[] filterPositions = null; if (lineCircleGrid < 1.0f) { filterPositions = Shape.InterpolateShapes(linePositions, circlePositions, lineCircleGrid); } else if (lineCircleGrid <= 2.0f) { filterPositions = Shape.InterpolateShapes(circlePositions, gridPositions, lineCircleGrid - 1.0f); } return(filterPositions); }