コード例 #1
0
 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);
     }
 }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
 private void Start()
 {
     localSps = UniformCircle.calculatePoint(radius, sampleSize, doOffset, isUniform);
 }