aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-02-13 07:01:54 +0100
committerSven Gothel <[email protected]>2023-02-13 07:01:54 +0100
commit6d2009d33495a01ae3b59a4be6004c1a5e7007ad (patch)
tree1294462baa6b0ef3a2389e7fe6f4d878a0e8d4c1 /src/jogl/classes/com/jogamp/opengl
parent93c51380f34c3eb203f46df52fed49a8a967510e (diff)
Graph Type Rendering: Drop pixelSize and use font em-size [0..1] throughout system.
- All pixelSize metrics methods are dropped in Font* - TypecastGlyph.Advance dropped, i.e. dropping prescales glyph advance based on pixelSize - TextRegionUtil produces OutlineShape in font em-size [0..1] added to GLRegion - Adjusted demos
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java21
1 files changed, 20 insertions, 1 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 d54142e38..234b2121b 100644
--- a/src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java
+++ b/src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java
@@ -582,7 +582,10 @@ public class AABBox {
}
/**
- * Scale this AABBox by a constant
+ * Scale this AABBox by a constant around fixed center
+ * <p>
+ * high and low is recomputed by scaling its distance to fixed center.
+ * </p>
* @param size a constant float value
* @param tmpV3 caller provided temporary 3-component vector
* @return this AABBox for chaining
@@ -605,6 +608,22 @@ public class AABBox {
}
/**
+ * Scale this AABBox by a constant, recomputing center
+ * <p>
+ * high and low is scaled and center recomputed.
+ * </p>
+ * @param size a constant float value
+ * @param tmpV3 caller provided temporary 3-component vector
+ * @return this AABBox for chaining
+ */
+ public final AABBox scale2(final float size, final float[] tmpV3) {
+ VectorUtil.scaleVec3(high, high, size); // in-place scale
+ VectorUtil.scaleVec3(low, low, size); // in-place scale
+ computeCenter();
+ return this;
+ }
+
+ /**
* Translate this AABBox by a float[3] vector
* @param t the float[3] translation vector
* @return this AABBox for chaining