diff options
author | Sven Gothel <[email protected]> | 2023-04-28 11:18:01 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-04-28 11:18:01 +0200 |
commit | b7ef5e6fac72e0ed1c19eae27801c14772c2ba46 (patch) | |
tree | 570e8a69f15b19fa3503a75b8e792fcb06ab4cc0 /src/jogl/classes/com/jogamp | |
parent | 02fd04ed37e710f639b9e76f6a93137c7b2b61c2 (diff) |
AABBox: Add 'translate' w/ dedicated components
Diffstat (limited to 'src/jogl/classes/com/jogamp')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java b/src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java index f76ae8059..531ea99ec 100644 --- a/src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java +++ b/src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java @@ -645,6 +645,21 @@ public class AABBox { /** * Translate this AABBox by a float[3] vector + * @param dx the translation x-component + * @param dy the translation y-component + * @param dz the translation z-component + * @param t the float[3] translation vector + * @return this AABBox for chaining + */ + public final AABBox translate(final float dx, final float dy, final float dz) { + low.add(dx, dy, dz); + high.add(dx, dy, dz); + computeCenter(); + return this; + } + + /** + * Translate this AABBox by a float[3] vector * @param t the float[3] translation vector * @return this AABBox for chaining */ |