The get(double, double, double)
method moves the
(x, y, z)
coordinates of the input value by a translation amount
before returning the output value from the source module. To set the
translation amount, call the setTranslations(double, double, double)
method. To set the translation amount to apply to the individual x
,
y
, or z
coordinates, call the
setXTranslation(double)
, setYTranslation(double)
,
or setZTranslation(double)
methods, respectively.
- Source Modules
- This module requires one source module.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final double
Default translation factor applied to thex
coordinate for theTranslatePoint
noise module.static final double
Default translation factor applied to they
coordinate for theTranslatePoint
noise module.static final double
Default translation factor applied to thez
coordinate for theTranslatePoint
noise module.Fields inherited from class org.spongepowered.noise.module.NoiseModule
sourceModule
-
Constructor Summary
ConstructorsConstructorDescriptionTranslatePoint
(NoiseModule source) Create a new TranslatePoint 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
setTranslations
(double x, double y, double z) Set the translation amount to apply to the(x, y, z)
coordinates of the input value.void
setXTranslation
(double xTranslation) Set the translation amount to apply to thex
coordinate of the input value.void
setYTranslation
(double yTranslation) Set the translation amount to apply to they
coordinate of the input value.void
setZTranslation
(double zTranslation) Set the translation amount to apply to thez
coordinate of the input value.double
Get the translation amount to apply to thex
coordinate of the input value.double
Get the translation amount to apply to they
coordinate of the input value.double
Get the translation amount to apply to thez
coordinate of the input value.Methods inherited from class org.spongepowered.noise.module.NoiseModule
setSourceModule, sourceModule, sourceModuleCount
-
Field Details
-
DEFAULT_TRANSLATE_POINT_X
public static final double DEFAULT_TRANSLATE_POINT_XDefault translation factor applied to thex
coordinate for theTranslatePoint
noise module.- See Also:
-
DEFAULT_TRANSLATE_POINT_Y
public static final double DEFAULT_TRANSLATE_POINT_YDefault translation factor applied to they
coordinate for theTranslatePoint
noise module.- See Also:
-
DEFAULT_TRANSLATE_POINT_Z
public static final double DEFAULT_TRANSLATE_POINT_ZDefault translation factor applied to thez
coordinate for theTranslatePoint
noise module.- See Also:
-
-
Constructor Details
-
TranslatePoint
public TranslatePoint() -
TranslatePoint
Create a new TranslatePoint module with the source modules pre-configured.- Parameters:
source
- the input module
-
-
Method Details
-
xTranslation
public double xTranslation()Get the translation amount to apply to thex
coordinate of the input value.- Returns:
- the translation amount to apply to the
x
coordinate - See Also:
-
setXTranslation
public void setXTranslation(double xTranslation) Set the translation amount to apply to thex
coordinate of the input value.The
get(double, double, double)
method moves the(x, y, z)
coordinates of the input value by a translation amount before returning the output value from the source module.- Parameters:
xTranslation
- the translation amount to apply to thex
coordinate
-
yTranslation
public double yTranslation()Get the translation amount to apply to they
coordinate of the input value.- Returns:
- the translation amount to apply to the
y
coordinate - See Also:
-
setYTranslation
public void setYTranslation(double yTranslation) Set the translation amount to apply to they
coordinate of the input value.The
get(double, double, double)
method moves the(x, y, z)
coordinates of the input value by a translation amount before returning the output value from the source module.- Parameters:
yTranslation
- the translation amount to apply to they
coordinate
-
zTranslation
public double zTranslation()Get the translation amount to apply to thez
coordinate of the input value.- Returns:
- the translation amount to apply to the
z
coordinate - See Also:
-
setZTranslation
public void setZTranslation(double zTranslation) Set the translation amount to apply to thez
coordinate of the input value.The
get(double, double, double)
method moves the(x, y, z)
coordinates of the input value by a translation amount before returning the output value from the source module.- Parameters:
zTranslation
- the translation amount to apply to thez
coordinate
-
setTranslations
public void setTranslations(double x, double y, double z) Set the translation amount to apply to the(x, y, z)
coordinates of the input value.The
get(double, double, double)
method moves the(x, y, z)
coordinates of the input value by a translation amount before returning the output value from the source module.- Parameters:
x
- the translation amount to apply to thex
coordinatey
- the translation amount to apply to they
coordinatez
- the translation amount to apply to thez
coordinate
-
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
-