org.novyon.noise
Class ShaderUtils
java.lang.Object
org.novyon.noise.ShaderUtils
public class ShaderUtils
- extends Object
Helper class containing useful functions explained in the book:
Texturing & Modeling - A Procedural Approach
- Author:
- Anthyon
Method Summary |
static float |
abs(float x)
|
static float |
bias(float b,
float x)
|
static float |
boxstep(float a,
float b,
float x)
|
static int |
c2i(float[] color)
|
static float[][] |
calcRotationMatrix(float ax,
float ay,
float az)
|
static float |
ceil(float x)
|
static float |
clamp(float x,
float a,
float b)
|
static int |
floor(float x)
|
static float[] |
floor(float[] fs)
|
static float |
frac(float f)
|
static float |
gain(float g,
float x)
|
static float |
gammaCorrection(float gamma,
float x)
|
static ByteBuffer |
getImageDataFromImage(BufferedImage bufferedImage)
|
static float[] |
i2c(int color)
|
static float |
length(float[] v)
|
static float |
length(float x,
float y,
float z)
|
static float |
max(float a,
float b)
|
static float |
min(float a,
float b)
|
static Color |
mix(Color a,
Color b,
float f)
|
static float[] |
mix(float[] c1,
float[] c2,
float f)
|
static float |
mix(float a,
float b,
float f)
|
static int |
mix(int a,
int b,
float f)
|
static float |
mod(float a,
float b)
|
static float[] |
normalize(float[] v)
|
static float |
pulse(float a,
float b,
float x)
|
static float[] |
rotate(float[] v,
float[][] m)
|
static float |
sinValue(float s,
float minFreq,
float maxFreq,
float swidth)
|
static float |
smoothstep(float a,
float b,
float x)
|
static float |
spline(float x,
float[] knot)
|
static float[] |
spline(float x,
float[][] knots)
|
static float |
step(float a,
float x)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShaderUtils
public ShaderUtils()
i2c
public static final float[] i2c(int color)
c2i
public static final int c2i(float[] color)
mix
public static final float mix(float a,
float b,
float f)
mix
public static final Color mix(Color a,
Color b,
float f)
mix
public static final int mix(int a,
int b,
float f)
mix
public static final float[] mix(float[] c1,
float[] c2,
float f)
step
public static final float step(float a,
float x)
boxstep
public static final float boxstep(float a,
float b,
float x)
pulse
public static final float pulse(float a,
float b,
float x)
clamp
public static final float clamp(float x,
float a,
float b)
min
public static final float min(float a,
float b)
max
public static final float max(float a,
float b)
abs
public static final float abs(float x)
smoothstep
public static final float smoothstep(float a,
float b,
float x)
mod
public static final float mod(float a,
float b)
floor
public static final int floor(float x)
ceil
public static final float ceil(float x)
spline
public static final float spline(float x,
float[] knot)
spline
public static final float[] spline(float x,
float[][] knots)
gammaCorrection
public static final float gammaCorrection(float gamma,
float x)
bias
public static final float bias(float b,
float x)
gain
public static final float gain(float g,
float x)
sinValue
public static final float sinValue(float s,
float minFreq,
float maxFreq,
float swidth)
length
public static final float length(float x,
float y,
float z)
rotate
public static final float[] rotate(float[] v,
float[][] m)
calcRotationMatrix
public static final float[][] calcRotationMatrix(float ax,
float ay,
float az)
normalize
public static final float[] normalize(float[] v)
length
public static final float length(float[] v)
getImageDataFromImage
public static final ByteBuffer getImageDataFromImage(BufferedImage bufferedImage)
frac
public static float frac(float f)
floor
public static float[] floor(float[] fs)
Copyright © 2011. All Rights Reserved.