aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Göthel <[email protected]>2024-04-25 03:29:23 +0200
committerSven Göthel <[email protected]>2024-04-25 03:29:23 +0200
commit33b1da5886a58feb9ee770f640f7bd07553c1bca (patch)
tree4239868d6fef362998078dbeb32c7b650a5075c1
parentdd67c91abd2e5f549fe35f590f37c5d6c732a100 (diff)
Math: AABBox: Fix getRayIntersection(), i.e. setting the correct resulting component.
-rw-r--r--src/jogl/classes/com/jogamp/math/geom/AABBox.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/jogl/classes/com/jogamp/math/geom/AABBox.java b/src/jogl/classes/com/jogamp/math/geom/AABBox.java
index 2456d6f4b..94a499f15 100644
--- a/src/jogl/classes/com/jogamp/math/geom/AABBox.java
+++ b/src/jogl/classes/com/jogamp/math/geom/AABBox.java
@@ -611,7 +611,7 @@ public class AABBox {
}
{
if(origin.y() < lo.y()) {
- result.setX(lo.y());
+ result.setY(lo.y());
inside = false;
// Calculate T distances to candidate planes
@@ -619,7 +619,7 @@ public class AABBox {
maxT[1] = (lo.y() - origin.y()) / dir.y();
}
} else if(origin.y() > hi.y()) {
- result.setX(hi.y());
+ result.setY(hi.y());
inside = false;
// Calculate T distances to candidate planes
@@ -630,7 +630,7 @@ public class AABBox {
}
{
if(origin.z() < lo.z()) {
- result.setX(lo.z());
+ result.setZ(lo.z());
inside = false;
// Calculate T distances to candidate planes
@@ -638,7 +638,7 @@ public class AABBox {
maxT[2] = (lo.z() - origin.z()) / dir.z();
}
} else if(origin.z() > hi.z()) {
- result.setX(hi.z());
+ result.setZ(hi.z());
inside = false;
// Calculate T distances to candidate planes