All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.ru.casperix.opengl.renderer.impl.GeometryKey.kt Maven / Gradle / Ivy

There is a newer version: 1.2.1
Show newest version
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