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 doubleDefault translation factor applied to thexcoordinate for theTranslatePointnoise module.static final doubleDefault translation factor applied to theycoordinate for theTranslatePointnoise module.static final doubleDefault translation factor applied to thezcoordinate for theTranslatePointnoise 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 TypeMethodDescriptiondoubleget(double x, double y, double z) Generates an output value given the coordinates of the specified input value.voidsetTranslations(double x, double y, double z) Set the translation amount to apply to the(x, y, z)coordinates of the input value.voidsetXTranslation(double xTranslation) Set the translation amount to apply to thexcoordinate of the input value.voidsetYTranslation(double yTranslation) Set the translation amount to apply to theycoordinate of the input value.voidsetZTranslation(double zTranslation) Set the translation amount to apply to thezcoordinate of the input value.doubleGet the translation amount to apply to thexcoordinate of the input value.doubleGet the translation amount to apply to theycoordinate of the input value.doubleGet the translation amount to apply to thezcoordinate 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 thexcoordinate for theTranslatePointnoise module.- See Also:
-
DEFAULT_TRANSLATE_POINT_Y
public static final double DEFAULT_TRANSLATE_POINT_YDefault translation factor applied to theycoordinate for theTranslatePointnoise module.- See Also:
-
DEFAULT_TRANSLATE_POINT_Z
public static final double DEFAULT_TRANSLATE_POINT_ZDefault translation factor applied to thezcoordinate for theTranslatePointnoise 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 thexcoordinate of the input value.- Returns:
- the translation amount to apply to the
xcoordinate - See Also:
-
setXTranslation
public void setXTranslation(double xTranslation) Set the translation amount to apply to thexcoordinate 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 thexcoordinate
-
yTranslation
public double yTranslation()Get the translation amount to apply to theycoordinate of the input value.- Returns:
- the translation amount to apply to the
ycoordinate - See Also:
-
setYTranslation
public void setYTranslation(double yTranslation) Set the translation amount to apply to theycoordinate 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 theycoordinate
-
zTranslation
public double zTranslation()Get the translation amount to apply to thezcoordinate of the input value.- Returns:
- the translation amount to apply to the
zcoordinate - See Also:
-
setZTranslation
public void setZTranslation(double zTranslation) Set the translation amount to apply to thezcoordinate 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 thezcoordinate
-
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 thexcoordinatey- the translation amount to apply to theycoordinatez- the translation amount to apply to thezcoordinate
-
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
-