Contents
Enum Class DistanceCalculationMode
java.lang.Object
java.lang.Enum<DistanceCalculationMode>
com.hypixel.hytale.procedurallib.logic.cell.DistanceCalculationMode
- All Implemented Interfaces:
Serializable, Comparable<DistanceCalculationMode>, Constable
- Since:
- 29.06.2017
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEuclidean distance produces single straight edges per side of the cell and perfect circles around the points.Manhattan distance only produces diagonal, horizontal and vertical edges.Addition of max metric space.Natural noise produces a little bit randomized edges which work perfectly for natural borders. -
Method Summary
Modifier and TypeMethodDescriptionstatic DistanceCalculationModefrom(PointDistanceFunction function) static DistanceCalculationModeReturns the enum constant of this class with the specified name.static DistanceCalculationMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
EUCLIDEAN
Euclidean distance produces single straight edges per side of the cell and perfect circles around the points.distance = dx * dx + dy * dy + dz * dz -
MANHATTAN
Manhattan distance only produces diagonal, horizontal and vertical edges. For distance noise it produces diamond shaped gradients.distance = |dx| + |dy| + |dz| -
NATURAL
Natural noise produces a little bit randomized edges which work perfectly for natural borders.distance = |dx| + |dy| + |dz| + dx * dx + dy * dy + dz * dz -
MAX
Addition of max metric space. This results in many jagged edges.distance = max(|dx|, |dy|, |dz|)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getFunction
-
from
-