Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to support GenTileable2DRepeat #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CSharp/FastNoise2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,17 @@ public OutputMinMax GenTileable2D(float[] noiseOut,
fnGenTileable2D(mNodeHandle, noiseOut, xSize, ySize, frequency, seed, minMax);
return new OutputMinMax(minMax);
}

public OutputMinMax GenTileable2DRepeat(float[] noiseOut,
int xStart, int yStart,
int xSize, int ySize,
float xRepeat, float yRepeat,
float frequency, int seed)
{
float[] minMax = new float[2];
fnGenTileable2DRepeat(mNodeHandle, noiseOut, xStart, yStart, xSize, ySize, xRepeat, yRepeat, frequency, seed, minMax);
return new OutputMinMax(minMax);
}

public OutputMinMax GenPositionArray2D(float[] noiseOut,
float[] xPosArray, float[] yPosArray,
Expand Down Expand Up @@ -418,6 +429,13 @@ private static extern uint fnGenUniformGrid4D(IntPtr nodeHandle, float[] noiseOu
private static extern void fnGenTileable2D(IntPtr node, float[] noiseOut,
int xSize, int ySize,
float frequency, int seed, float[] outputMinMax);

[DllImport(NATIVE_LIB)]
private static extern void fnGenTileable2D(IntPtr node, float[] noiseOut,
int xStart, int yStart,
int xSize, int ySize,
float xRepeat, float yRepeat,
float frequency, int seed, float[] outputMinMax);

[DllImport(NATIVE_LIB)]
private static extern void fnGenPositionArray2D(IntPtr node, float[] noiseOut, int count,
Expand Down