public VoroniData Voroni(float px, float py) { var basisFunctions = new float[2]; var ids = new uint[2]; var deltas = new Vector2[2]; Worley(new Vector2(px, py), 2, basisFunctions, deltas, ids); var data = new VoroniData {Blend = basisFunctions[1] - basisFunctions[0], Id = ids[0], Delta = deltas[0]}; return data; }
public VoroniData Voroni(float px, float py, float pz) { var basisFunctions = new float[2]; var ids = new uint[2]; var deltas = new Vector3[2]; Worley(new Vector3(px, py, pz), 2, basisFunctions, deltas, ids); var data = new VoroniData { Blend = basisFunctions[1] - basisFunctions[0], Id = ids[0], Delta = deltas[0] }; return(data); }