22 lines
647 B
Kotlin
22 lines
647 B
Kotlin
package ru.dbotthepony.kstarbound.util.random
|
|
|
|
import ru.dbotthepony.kstarbound.defs.PerlinNoiseParameters
|
|
|
|
class EmptyNoise(parameters: PerlinNoiseParameters) : AbstractPerlinNoise(parameters) {
|
|
init {
|
|
require(parameters.type == PerlinNoiseParameters.Type.UNITIALIZED)
|
|
}
|
|
|
|
override fun get(x: Double): Double {
|
|
throw IllegalStateException("Tried to sample uninitialized noise")
|
|
}
|
|
|
|
override fun get(x: Double, y: Double): Double {
|
|
throw IllegalStateException("Tried to sample uninitialized noise")
|
|
}
|
|
|
|
override fun get(x: Double, y: Double, z: Double): Double {
|
|
throw IllegalStateException("Tried to sample uninitialized noise")
|
|
}
|
|
}
|