Files
voxelotl-engine/Sources/Voxelotl/Noise/CoherentNoise.swift

24 lines
578 B
Swift
Raw Normal View History

2024-09-04 01:38:27 +10:00
public protocol CoherentNoise {
2024-08-29 03:56:54 +10:00
associatedtype Scalar: FloatingPoint & SIMDScalar
}
2024-09-04 01:38:27 +10:00
public protocol CoherentNoiseRandomInit: CoherentNoise {
init<Random: RandomProvider>(random: inout Random)
}
2024-08-29 03:56:54 +10:00
public protocol CoherentNoiseTableInit: CoherentNoise {
2024-09-09 04:11:26 +10:00
init(permutation: [UInt8])
}
2024-09-04 01:38:27 +10:00
public protocol CoherentNoise2D: CoherentNoise {
func get(_ point: SIMD2<Scalar>) -> Scalar
2024-08-29 03:56:54 +10:00
}
2024-09-04 01:38:27 +10:00
public protocol CoherentNoise3D: CoherentNoise {
func get(_ point: SIMD3<Scalar>) -> Scalar
}
2024-08-29 03:56:54 +10:00
2024-09-04 01:38:27 +10:00
public protocol CoherentNoise4D: CoherentNoise {
2024-08-29 03:56:54 +10:00
func get(_ point: SIMD4<Scalar>) -> Scalar
}