private void OnDrawGizmos() { if (vpls == null) { if (sampleMode == SampleMode.UniformCircle) { vpls = UniformCircle.calculatePoint(radius, samples, true, true); } else if (sampleMode == SampleMode.UniformCircleWithoutOffset) { vpls = UniformCircle.calculatePoint(radius, samples, false, true); } else if (sampleMode == SampleMode.Halton) { vpls = UniformCircle.HaltonGenerator(radius, samples, true); } else if (sampleMode == SampleMode.HaltonWithoutOffset) { vpls = UniformCircle.HaltonGenerator(radius, samples, false); } } foreach (Vector2 p in vpls) { Gizmos.DrawSphere(p, gizmosRadius); } }
private void OnValidate() { if (sampleMode == SampleMode.UniformCircle) { vpls = UniformCircle.calculatePoint(radius, samples, true, true); } else if (sampleMode == SampleMode.UniformCircleWithoutOffset) { vpls = UniformCircle.calculatePoint(radius, samples, false, true); } else if (sampleMode == SampleMode.Halton) { vpls = UniformCircle.HaltonGenerator(radius, samples, true); } else if (sampleMode == SampleMode.HaltonWithoutOffset) { vpls = UniformCircle.HaltonGenerator(radius, samples, false); } }
private void Start() { localSps = UniformCircle.calculatePoint(radius, sampleSize, doOffset, isUniform); }