The get(double, double, double) method rotates the
coordinates of the input value around the origin before returning the output
value from the source module. To set the rotation angles,
call the setAngles(double, double, double) method. To set the
rotation angle around the individual x, y, or z axes,
call the setXAngle(double), setYAngle(double),
or setZAngle(double) methods, respectively.
The coordinate system of the input value is assumed to be "left-handed"
(x increases to the right, y increases upwards,
and z increases inward).
- Source Modules
- This module requires one source module.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleDefaultxrotation angle for theRotatePointnoise module.static final doubleDefaultyrotation angle for theRotatePointnoise module.static final doubleDefaultzrotation angle for theRotatePointnoise module.Fields inherited from class org.spongepowered.noise.module.NoiseModule
sourceModule -
Constructor Summary
ConstructorsConstructorDescriptionRotatePoint(NoiseModule source) Create a new RotatePoint 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.voidsetAngles(double x, double y, double z) Sets the rotation angles around all three axes to apply to the input value.voidsetXAngle(double xAngle) Set the rotation angle around thexaxis to apply to the input value.voidsetYAngle(double yAngle) Set the rotation angle around theyaxis to apply to the input value.voidsetZAngle(double zAngle) Set the rotation angle around thezaxis to apply to the input value.doublexAngle()Get the rotation angle around thexaxis to apply to the input value.doubleyAngle()Get the rotation angle around theyaxis to apply to the input value.doublezAngle()Get the rotation angle around thezaxis to apply to the input value.Methods inherited from class org.spongepowered.noise.module.NoiseModule
setSourceModule, sourceModule, sourceModuleCount
-
Field Details
-
DEFAULT_ROTATE_X
public static final double DEFAULT_ROTATE_XDefaultxrotation angle for theRotatePointnoise module.- See Also:
-
DEFAULT_ROTATE_Y
public static final double DEFAULT_ROTATE_YDefaultyrotation angle for theRotatePointnoise module.- See Also:
-
DEFAULT_ROTATE_Z
public static final double DEFAULT_ROTATE_ZDefaultzrotation angle for theRotatePointnoise module.- See Also:
-
-
Constructor Details
-
RotatePoint
public RotatePoint() -
RotatePoint
Create a new RotatePoint module with the source modules pre-configured.- Parameters:
source- the input module
-
-
Method Details
-
setAngles
public void setAngles(double x, double y, double z) Sets the rotation angles around all three axes to apply to the input value.The
get(double, double, double)method rotates the coordinates of the input value around the origin before returning the output value from the source module.- Parameters:
x- the rotation angle around thexaxis, in degreesy- the rotation angle around theyaxis, in degreesz- the rotation angle around thezaxis, in degrees
-
xAngle
public double xAngle()Get the rotation angle around thexaxis to apply to the input value.- Returns:
- the rotation angle around the
xaxis, in degrees. - See Also:
-
setXAngle
public void setXAngle(double xAngle) Set the rotation angle around thexaxis to apply to the input value.The
get(double, double, double)method rotates the coordinates of the input value around the origin before returning the output value from the source module.- Parameters:
xAngle- the rotation angle around thexaxis, in degrees.
-
yAngle
public double yAngle()Get the rotation angle around theyaxis to apply to the input value.- Returns:
- the rotation angle around the
yaxis, in degrees. - See Also:
-
setYAngle
public void setYAngle(double yAngle) Set the rotation angle around theyaxis to apply to the input value.The
get(double, double, double)method rotates the coordinates of the input value around the origin before returning the output value from the source module.- Parameters:
yAngle- the rotation angle around theyaxis, in degrees.
-
zAngle
public double zAngle()Get the rotation angle around thezaxis to apply to the input value.- Returns:
- the rotation angle around the
zaxis, in degrees. - See Also:
-
setZAngle
public void setZAngle(double zAngle) Set the rotation angle around thezaxis to apply to the input value.The
get(double, double, double)method rotates the coordinates of the input value around the origin before returning the output value from the source module.- Parameters:
zAngle- the rotation angle around thezaxis, in degrees.
-
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
-