aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-05-11 09:26:49 +0200
committerGitHub <noreply@github.com>2024-05-11 09:26:49 +0200
commit974cc48b355ff020cbb17dc036730616b159b855 (patch)
treea02e270a44c3089724a2a9b8680cb596f3e43814 /src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
parente24f16df0e8f856d6ec6f81d7707841d27cd9ee8 (diff)
downloadskyhanni-974cc48b355ff020cbb17dc036730616b159b855.tar.gz
skyhanni-974cc48b355ff020cbb17dc036730616b159b855.tar.bz2
skyhanni-974cc48b355ff020cbb17dc036730616b159b855.zip
Backend: code duplication in AxisAlignedBB.getCorners (#1756)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
index fb97a8357..7d37953b1 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
@@ -18,6 +18,7 @@ import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.CollectionUtils.zipWithNext3
import at.hannibal2.skyhanni.utils.ColorUtils.getFirstColorCode
import at.hannibal2.skyhanni.utils.LorenzColor.Companion.toLorenzColor
+import at.hannibal2.skyhanni.utils.LorenzUtils.getCorners
import at.hannibal2.skyhanni.utils.renderables.Renderable
import at.hannibal2.skyhanni.utils.renderables.RenderableUtils.renderXAligned
import at.hannibal2.skyhanni.utils.shader.ShaderManager
@@ -1508,10 +1509,7 @@ object RenderUtils {
colour: Color,
depth: Boolean,
) {
- val cornerOne = LorenzVec(boundingBox.minX, boundingBox.maxY, boundingBox.minZ)
- val cornerTwo = LorenzVec(boundingBox.minX, boundingBox.maxY, boundingBox.maxZ)
- val cornerThree = LorenzVec(boundingBox.maxX, boundingBox.maxY, boundingBox.maxZ)
- val cornerFour = LorenzVec(boundingBox.maxX, boundingBox.maxY, boundingBox.minZ)
+ val (cornerOne, cornerTwo, cornerThree, cornerFour, ) = boundingBox.getCorners(boundingBox.maxY)
this.draw3DLine(cornerOne, cornerTwo, colour, lineWidth, depth)
this.draw3DLine(cornerTwo, cornerThree, colour, lineWidth, depth)
this.draw3DLine(cornerThree, cornerFour, colour, lineWidth, depth)