mirror of
https://github.com/Xevion/procedural-placement.git
synced 2025-12-08 04:08:06 -06:00
improved bridson's algorithm attempt
This commit is contained in:
@@ -7,7 +7,8 @@ using UnityEngine.Serialization;
|
||||
|
||||
public enum SamplingTypes {
|
||||
Random,
|
||||
Poisson
|
||||
Poisson,
|
||||
Improved_Poisson
|
||||
};
|
||||
|
||||
public class PointRendering : MonoBehaviour {
|
||||
@@ -53,6 +54,10 @@ public class PointRendering : MonoBehaviour {
|
||||
_points = PointGeneration.poisson_sampling(numPoints, regionSize, radius, retryAttempts);
|
||||
numPoints = _points.Count;
|
||||
break;
|
||||
case SamplingTypes.Improved_Poisson:
|
||||
_points = PointGeneration.improved_poisson_sampling(numPoints, regionSize, radius, retryAttempts);
|
||||
numPoints = _points.Count;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user