commonMain.ru.casperix.opengl.renderer.impl.GeometryKey.kt Maven / Gradle / Ivy
package ru.casperix.opengl.renderer.impl
import ru.casperix.renderer.vector.Geometry
data class GeometryKey(val geometry: Geometry) {
private val hashCodeCache = lazy { geometry.hashCode() }
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as GeometryKey
return geometry === other.geometry
}
override fun hashCode(): Int {
return hashCodeCache.value
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy