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 double
Default scaling factor applied to thex
coordinate for theScalePoint
noise module.static final double
Default scaling factor applied to they
coordinate for theScalePoint
noise module.static final double
Default scaling factor applied to thez
coordinate for theScalePoint
noise 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 TypeMethodDescriptiondouble
get
(double x, double y, double z) Generates an output value given the coordinates of the specified input value.void
setScale
(double scale) Set the scaling factor to apply to the input value.void
setXScale
(double xScale) Set the scaling factor to apply to thex
coordinate of the input value.void
setYScale
(double yScale) Set the scaling factor to apply to they
coordinate of the input value.void
setZScale
(double zScale) Set the scaling factor to apply to thez
coordinate of the input value.double
xScale()
Get the scaling factor applied to thex
coordinate of the input value.double
yScale()
Get the scaling factor applied to they
coordinate of the input value.double
zScale()
Get the scaling factor applied to thez
coordinate 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 thex
coordinate for theScalePoint
noise module.- See Also:
-
DEFAULT_SCALE_POINT_Y
public static final double DEFAULT_SCALE_POINT_YDefault scaling factor applied to they
coordinate for theScalePoint
noise module.- See Also:
-
DEFAULT_SCALE_POINT_Z
public static final double DEFAULT_SCALE_POINT_ZDefault scaling factor applied to thez
coordinate for theScalePoint
noise 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 thex
coordinate of the input value.- Returns:
- the scaling factor applied to the
x
coordinate - See Also:
-
setXScale
public void setXScale(double xScale) Set the scaling factor to apply to thex
coordinate 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 thex
coordinate
-
yScale
public double yScale()Get the scaling factor applied to they
coordinate of the input value.- Returns:
- the scaling factor applied to the
y
coordinate - See Also:
-
setYScale
public void setYScale(double yScale) Set the scaling factor to apply to they
coordinate 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 they
coordinate
-
zScale
public double zScale()Get the scaling factor applied to thez
coordinate of the input value.- Returns:
- the scaling factor applied to the
z
coordinate - See Also:
-
setZScale
public void setZScale(double zScale) Set the scaling factor to apply to thez
coordinate 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 thez
coordinate
-
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:NoiseModule
Generates 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:
get
in classNoiseModule
- Parameters:
x
- thex
coordinate of the input valuey
- they
coordinate of the input valuez
- thez
coordinate of the input value- Returns:
- the output value
-