Skip to content

Commit

Permalink
[orx-hash-grid] Replace Box3D with Box from org.openrndr.shape
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinRNDR committed Jan 24, 2025
1 parent 969d342 commit 3442c95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
11 changes: 0 additions & 11 deletions orx-hash-grid/src/commonMain/kotlin/Box.kt

This file was deleted.

11 changes: 6 additions & 5 deletions orx-hash-grid/src/commonMain/kotlin/HashGrid3D.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.openrndr.extra.hashgrid
import org.openrndr.math.Vector3
import org.openrndr.shape.Box
import kotlin.jvm.JvmRecord
import kotlin.math.abs
import kotlin.math.max
Expand Down Expand Up @@ -30,17 +31,17 @@ class Cell3D(val x: Int, val y: Int, val z: Int, val cellSize: Double) {
var zMax: Double = Double.NEGATIVE_INFINITY
private set

val bounds: Box3D
val bounds: Box
get() {
return Box3D(Vector3(x * cellSize, y * cellSize, z * cellSize), cellSize, cellSize, cellSize)
return Box(Vector3(x * cellSize, y * cellSize, z * cellSize), cellSize, cellSize, cellSize)
}

val contentBounds: Box3D
val contentBounds: Box
get() {
return if (points.isEmpty()) {
Box3D.EMPTY
Box.EMPTY
} else {
Box3D(Vector3(xMin, yMin, zMin), xMax - xMin, yMax - yMin, zMax - zMin)
Box(Vector3(xMin, yMin, zMin), xMax - xMin, yMax - yMin, zMax - zMin)
}
}

Expand Down

0 comments on commit 3442c95

Please sign in to comment.