Class ScaleTransformer
java.lang.Object
de.articdive.jnoise.transformers.scale.ScaleTransformer
- All Implemented Interfaces:
SimpleTransformer
Simplistic Scale transformer (Frequency transformer) that multiplies each coordinate part by the specified scale value.
-
Constructor Summary
ConstructorDescriptionScaleTransformer
(double scale) ScaleTransformer
(double scaleX, double scaleY, double scaleZ, double scaleW) -
Method Summary
Modifier and TypeMethodDescriptiondouble
transformW
(double w) Transforms a w coordinate before noise evaluation.double
transformX
(double x) Transforms an x coordinate before noise evaluation.double
transformY
(double y) Transforms a y coordinate before noise evaluation.double
transformZ
(double z) Transforms a z coordinate before noise evaluation.
-
Constructor Details
-
ScaleTransformer
public ScaleTransformer(double scale) - Parameters:
scale
- scale value for all dimensions.
-
ScaleTransformer
public ScaleTransformer(double scaleX, double scaleY, double scaleZ, double scaleW) - Parameters:
scaleX
- scale value for the X-dimension.scaleY
- scale value for the Y-dimension.scaleZ
- scale value for the Z-dimension.scaleW
- scale value for the W-dimension.
-
-
Method Details
-
transformX
public double transformX(double x) Description copied from interface:SimpleTransformer
Transforms an x coordinate before noise evaluation.- Specified by:
transformX
in interfaceSimpleTransformer
- Parameters:
x
- coordinate to transform.- Returns:
- transformed x coordinate.
-
transformY
public double transformY(double y) Description copied from interface:SimpleTransformer
Transforms a y coordinate before noise evaluation.- Specified by:
transformY
in interfaceSimpleTransformer
- Parameters:
y
- coordinate to transform.- Returns:
- transformed y coordinate.
-
transformZ
public double transformZ(double z) Description copied from interface:SimpleTransformer
Transforms a z coordinate before noise evaluation.- Specified by:
transformZ
in interfaceSimpleTransformer
- Parameters:
z
- coordinate to transform.- Returns:
- transformed z coordinate.
-
transformW
public double transformW(double w) Description copied from interface:SimpleTransformer
Transforms a w coordinate before noise evaluation.- Specified by:
transformW
in interfaceSimpleTransformer
- Parameters:
w
- coordinate to transform.- Returns:
- transformed w coordinate.
-