From 6d2009d33495a01ae3b59a4be6004c1a5e7007ad Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 13 Feb 2023 07:01:54 +0100 Subject: 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 --- .../classes/com/jogamp/opengl/math/geom/AABBox.java | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src/jogl/classes/com/jogamp/opengl/math') 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 + *

+ * high and low is recomputed by scaling its distance to fixed center. + *

* @param size a constant float value * @param tmpV3 caller provided temporary 3-component vector * @return this AABBox for chaining @@ -604,6 +607,22 @@ public class AABBox { return this; } + /** + * Scale this AABBox by a constant, recomputing center + *

+ * high and low is scaled and center recomputed. + *

+ * @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 -- cgit v1.2.3