The get(double, double, double) method multiplies the
(x, y, z) coordinates of the input value with a scaling factor before
returning the output value from the source module.
To set the scaling factor, call the setScale(double) method. To
set the scaling factor to apply to the individual x, y,
or z coordinates, call the setXScale(double),
setYScale(double), or setZScale(double) methods,
respectively.
- Source Modules
- This module requires one source module.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleDefault scaling factor applied to thexcoordinate for theScalePointnoise module.static final doubleDefault scaling factor applied to theycoordinate for theScalePointnoise module.static final doubleDefault scaling factor applied to thezcoordinate for theScalePointnoise module.Fields inherited from class org.spongepowered.noise.module.NoiseModule
sourceModule -
Constructor Summary
ConstructorsConstructorDescriptionScalePoint(NoiseModule source) Create a new ScalePoint module with the source modules pre-configured. -
Method Summary
Modifier and TypeMethodDescriptiondoubleget(double x, double y, double z) Generates an output value given the coordinates of the specified input value.voidsetScale(double scale) Set the scaling factor to apply to the input value.voidsetXScale(double xScale) Set the scaling factor to apply to thexcoordinate of the input value.voidsetYScale(double yScale) Set the scaling factor to apply to theycoordinate of the input value.voidsetZScale(double zScale) Set the scaling factor to apply to thezcoordinate of the input value.doublexScale()Get the scaling factor applied to thexcoordinate of the input value.doubleyScale()Get the scaling factor applied to theycoordinate of the input value.doublezScale()Get the scaling factor applied to thezcoordinate of the input value.Methods inherited from class org.spongepowered.noise.module.NoiseModule
setSourceModule, sourceModule, sourceModuleCount
-
Field Details
-
DEFAULT_SCALE_POINT_X
public static final double DEFAULT_SCALE_POINT_XDefault scaling factor applied to thexcoordinate for theScalePointnoise module.- See Also:
-
DEFAULT_SCALE_POINT_Y
public static final double DEFAULT_SCALE_POINT_YDefault scaling factor applied to theycoordinate for theScalePointnoise module.- See Also:
-
DEFAULT_SCALE_POINT_Z
public static final double DEFAULT_SCALE_POINT_ZDefault scaling factor applied to thezcoordinate for theScalePointnoise module.- See Also:
-
-
Constructor Details
-
ScalePoint
public ScalePoint() -
ScalePoint
Create a new ScalePoint module with the source modules pre-configured.- Parameters:
source- the input module
-
-
Method Details
-
xScale
public double xScale()Get the scaling factor applied to thexcoordinate of the input value.- Returns:
- the scaling factor applied to the
xcoordinate - See Also:
-
setXScale
public void setXScale(double xScale) Set the scaling factor to apply to thexcoordinate of the input value.The
get(double, double, double)method multiplies the(x, y, z)coordinates of the input value with a scaling factor before returning the output value from the source module.- Parameters:
xScale- the scaling factor to apply to thexcoordinate
-
yScale
public double yScale()Get the scaling factor applied to theycoordinate of the input value.- Returns:
- the scaling factor applied to the
ycoordinate - See Also:
-
setYScale
public void setYScale(double yScale) Set the scaling factor to apply to theycoordinate of the input value.The
get(double, double, double)method multiplies the(x, y, z)coordinates of the input value with a scaling factor before returning the output value from the source module.- Parameters:
yScale- the scaling factor to apply to theycoordinate
-
zScale
public double zScale()Get the scaling factor applied to thezcoordinate of the input value.- Returns:
- the scaling factor applied to the
zcoordinate - See Also:
-
setZScale
public void setZScale(double zScale) Set the scaling factor to apply to thezcoordinate of the input value.The
get(double, double, double)method multiplies the(x, y, z)coordinates of the input value with a scaling factor before returning the output value from the source module.- Parameters:
zScale- the scaling factor to apply to thezcoordinate
-
setScale
public void setScale(double scale) Set the scaling factor to apply to the input value.The
get(double, double, double)method multiplies the(x, y, z)coordinates of the input value with a scaling factor before returning the output value from the source module.- Parameters:
scale- the scaling factor to apply
-
get
public double get(double x, double y, double z) Description copied from class:NoiseModuleGenerates an output value given the coordinates of the specified input value.All source modules required by this module must have been connected with the
NoiseModule.setSourceModule(int, NoiseModule)method. If these source modules are not connected, this method will throw aNoModuleException.To determine the number of source modules required by this noise module, call the
NoiseModule.sourceModuleCount()method.- Specified by:
getin classNoiseModule- Parameters:
x- thexcoordinate of the input valuey- theycoordinate of the input valuez- thezcoordinate of the input value- Returns:
- the output value
-