aboutsummaryrefslogtreecommitdiffstats
path: root/src/graphui/classes/com
Commit message (Collapse)AuthorAgeFilesLines
...
* GraphUI Container: Add getShapeCount() and add API doc ..Sven Gothel2023-09-203-6/+15
|
* Bug 1452 - Decouple math functionality to 'com.jogamp.math' to be toolkit ↵Sven Gothel2023-09-2015-343/+344
| | | | | | | | | | | | | | | | | | | | agnostic (PMVMatrix, Matrix4f, Vec4f, ..) Math functionality (PMVMatrix, Matrix4f, Vec4f, ..) - shall be used toolkit agnostic, e.g. independent from OpenGL - shall be reused within our upcoming Vulkan implementation - may also move outside of JOGL, i.e. GlueGen or within its own package to be reused for other purposed. The 'com.jogamp.opengl.util.PMVMatrix' currently also used to feed in GLUniformData via the toolkit agnostic SyncAction and SyncBuffer shall also be split to a toolkit agnostic variant. An OpenGL PMVMatrix specialization implementing GLMatrixFunc can still exist, being derived from the toolkit agnostic base implementation. +++ Initial commit .. compile clean, passing most unit tests.
* GraphUI Layout (Box/Grid): Adjust bottom-left offset according to center-axisSven Gothel2023-09-192-6/+44
| | | | | - Remove the negative or positive delta on centered axis. - Only remove negative offset of non-centered axis (i.e. underline)
* GraphUI GridLayout: Disable TRACE_LAYOUTSven Gothel2023-09-191-1/+1
|
* GraphUI GridLayout: Fix scaled non-center: Only add center offset if ↵Sven Gothel2023-09-192-26/+23
| | | | requested and avoid double-add.
* GraphUI Label: Add convenient methods getUnscaledGlyphBounds(..)Sven Gothel2023-09-171-0/+12
|
* GraphUI Layout: Remove unused leftover var and complete GridLayout ctorSven Gothel2023-09-172-3/+12
|
* GraphUI GlyphShape: Add copy-ctor variantSven Gothel2023-09-161-0/+17
|
* GraphUI BoxLayout: Margin is only ignored for center Alignment w/o Fill ↵Sven Gothel2023-09-165-100/+104
| | | | | | | | | | | | | | | | | | | | | scale. {Box,Grid}Layout: Always remove Bottom-Left delta and refine API doc of incl scale behavior GraphUI BoxLayout: Margin is only ignored for center Alignment w/o Fill scale. Margin outside of a shape is not scaled and hence must be considered when using Fill scale. {Box,Grid}Layout: Always remove Bottom-Left delta Previously we were only dropping the negative extend. However, since our scale and center algo uses the AABBox width and height, which excludes the bottom-left delta, we have to drop such offset. TODO: Otherwise, we would need adjust for the bottom-left extend when NOT centering for each direction! This might be a useful enhancement in case one likes to drop shapes as-is w/o centering. {Box,Grid}Layout: Refine API doc of incl scale behavior
* GraphUI Group.validateImpl(): Pick RenderMode for border from 1st Shape if ↵Sven Gothel2023-09-161-1/+12
| | | | | | required (hasBorder() and null border yet) This avoid changing the RenderMode and hence actual shader rendering the item.
* GraphUI Group: Override isShapeDirty(), performing a deep dirty state update ↵Sven Gothel2023-09-162-1/+14
| | | | on all group member to allow validate to function
* GraphUI Layout: Fix BoxLayout scale, margin and padding; Add same padding ↵Sven Gothel2023-09-054-186/+310
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | behavior to BoxLayout and GridLayout. For all: - Padding is applied to each {@Shape} via {@link Shape#setPaddding(Padding)} if passed in constructor BoxLayout: - Optionally centered {@link Alignment.Bit#CenterHoriz horizontally}, {@link Alignment.Bit#CenterVert vertically} or {@link Alignment#Center both}. - Optionally scaled to cell-size if given and {@link Alignment#Fill} - Margin is ignored on dimension with center {@link Alignment} - Not implemented {@link Alignment}: Top, Right, Bottom, Left GridLayout: - Optionally centered {@link Alignment.Bit#CenterHoriz horizontally}, {@link Alignment.Bit#CenterVert vertically} or {@link Alignment#Center both}. - Optionally scaled to cell-size if given and {@link Alignment#Fill} - Without cell-size behaves like a grid bag using individual shape sizes including padding - Can be filled in {@link Order#COLUMN} or {@link Order#ROW} major-order. - Not implemented {@link Alignment}: Top, Right, Bottom, Left Changes to Group.Layout interface: - Added preValidate(Shape) allowing to prepare the shape before validation, used to inject Padding Changes to Margin: - Removed the complex CENTER property and using Alignment in BoxLayout as well Changes to BoxLayout: - Using Alignment +++ Tested via UILayoutBox01 and UILayoutGrid01, try the tooltip by clicking on the group's description label.
* GraphUI Layout: Html'ify API header of Gap and PaddingSven Gothel2023-09-052-2/+4
|
* GraphUI Layout Alignment: Separate center alignment to horizontal and verticalSven Gothel2023-09-051-8/+11
|
* GraphUI Shape: Add setScale(..) and scale(..) with Vec3f for convenience; ↵Sven Gothel2023-09-051-2/+20
| | | | Add border-color in toString() if hasBorder()
* GraphUI Scene: Add invoke(boolean wait, GLRunnable) for convenience using ↵Sven Gothel2023-09-051-0/+21
| | | | GLAutoDrawable.invoke(..)
* GraphUI Scene: Only set dbgBorderThickness on shape if not zero and shape ↵Sven Gothel2023-09-051-1/+3
| | | | has no border yet, i.e. don't override
* GraphUI: Use z-top of bounding box for border rectangle, not z-centerSven Gothel2023-09-051-6/+6
|
* GraphUI Margin, Alignment: Reuse ctor for default-ctorSven Gothel2023-09-042-2/+2
|
* GraphUI: Button/Label: Complete String -> CharSequence type change for text, ↵Sven Gothel2023-09-042-5/+5
| | | | rename Button set{Label->Text}(..), adjust demo/text code
* GraphUI GraphShape: Split renderModes -> final renderModesReq + mutable ↵Sven Gothel2023-09-041-2/+26
| | | | renderModes, allowing the latter to be adjusted e.g. in case a color-channel is required
* GraphUI Enhance: API doc; Scene/Button Z-offset and -epsilon; Push temp ↵Sven Gothel2023-09-047-50/+234
| | | | AffineTransform to local method; Simplify BaseButton setCorner(0) -> setPerp(); Protected abstract ctor ..
* GraphUI Button: Add label bounds to own shape (adds used z-range)Sven Gothel2023-09-031-0/+2
|
* GraphUI Scene: Expose Z-Epsilon API for default and current PMVMatrixSetup ↵Sven Gothel2023-09-032-6/+53
| | | | values; Button add Z-Epsilon API for ctor and setLabelZOffset(..)
* GraphUI Shape.ZAscendingComparator: Use (faster) FloatUtil.isEqual2(a,b) and ↵Sven Gothel2023-09-031-3/+10
| | | | consider Z-scaling
* GraphUI Shape: Enhance API doc for colorsSven Gothel2023-09-031-6/+35
|
* GraphUI Scene: Generalize its interface PMVMatrixSetup and usage of its ↵Sven Gothel2023-09-031-39/+112
| | | | DefaultPMVMatrixSetup w/o orthogonal alike scale-back but fully parametric
* GraphUI Scene: Pass sampleCount in ctor variant and refine API doc, clip to ↵Sven Gothel2023-09-031-8/+37
| | | | [1..8]; Add clarity in Region; Demos CommandlineOptions adds actual graphAASamples set and utilized
* PMVMatrix.gluPerspective(): Redfine angle in radians instead of degrees ** ↵Sven Gothel2023-09-021-2/+2
| | | | | | | | API Change ** Since this is an extra implementation of PMVMatrix and not of GLMatrixFunc, we shall use the default ISO dimension avoiding conversion. This alsi redefined Graph's RegionRenderer.reshapePerspective() angle definition from degrees to radians
* GraphUI Shape: Show dirty-state in getSubString()Sven Gothel2023-08-281-1/+13
|
* Graph Font + Glyph: More robust detetection and API definition of ↵Sven Gothel2023-08-283-8/+7
| | | | | | non-contour/whitespace Glyphs (detect and allow to skip 'em) We also drop shapes for both, but for id 0 (unknown).
* GraphUI: Button: Reduce default DEFAULT_LABEL_ZOFFSET from 0.005f -> ↵Sven Gothel2023-08-271-1/+1
| | | | | | | | | 0.0001f, have to check if working on all platforms (TODO) Otherwise, we have to resolve the 'one Region' for the Button (backgroung shape + text on top) implementation with two OutlineShapes. As of now, we use the z-offset of the text above background to avoid z-fighting. This is like a manual application of glPolygonOffset(..) directly on the produced vertices.
* GraphUI: Extract generalized AnimGroup functionality from UISceneDemo03*, ↵Sven Gothel2023-08-271-0/+812
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | providing sets of animated Shapes (GlyphShape or any other) Hardcoding the whole animation process into user code is not feasible to allow a quick add-on. GraphUI's new AnimGroup is a Group and allows to add multiple AnimGroup.Set of AnimGroup.ShapeData. +++ AnimGroup.ShapeData holds the actual Shape and its start- and target position as well as its active animation state and an optional user object attachment. AnimGroup.Set holds a list of AnimGroup.ShapeData as well as the animation properties and states like acceleration and velocity for translation and angular operations. It also contains the AnimGroup.LerpFunc for linear interpolation of the next position as called via AnimGroup.tick() over all sets. AnimGroup.LerpFunc is intended to perform the linear interpolation for the next position, either user provided or one of the provided may be used, i.e. TargetLerp, ScrollLerp and SineLerp. To setup the start- and target position for each AnimGroup.ShapeData, a AnimGroup.ShapeSetup is used - user implementated or one of the build-in of AnimGroup.addGlyphSetHorizScroll01(..), AnimGroup.assGlyphSetRandom01(..). +++ UISceneDemo03 consolidated UISceneDemo03 + UISceneDemo03b (deleted) and shows the following AnimGroup capabilities: - Two repetitive scrolling text lines. One text shorter than the line-width and one longer. - One line of animated rectangles, rotating around their z-axis - A text animation assembling one line of text, each glyph coming from from a random 3D point moving to its destination all at once including rotation. - One line of text with sine wave animation
* GraphUI: Use thread-save and lock-free CopyOnWriteArrayList for List<Shape>, ↵Sven Gothel2023-08-272-4/+4
| | | | allowing off-thread mutation
* GraphUI: Shape: Add runSynced(Runnable); Add setPMVMatrix(..) to setup ↵Sven Gothel2023-08-251-39/+100
| | | | complete PMVMatrix, use it in getSurfaceSize(..), shapeToWinCoord(..) and winToShapeCoord(..)
* GraphUI: Group API doc + remove GlyphShape's redundant many getOrigPos() ↵Sven Gothel2023-08-252-40/+7
| | | | variants
* Texture ctor w/ external textureID: Pass `ownsTextureID` where true hands ↵Sven Gothel2023-08-131-6/+10
| | | | | | | | | over ownership and allows destroy() to delete it, otherwise not. Fixes GraphUI's GLButton. GraphUI's GLButton uses the offscreen's FBO texture and hence can't pass over ownership of the texture. Hence the Texture instance is created w/o handing over ownership! GLMediaPlayerImpl does hand over ownership of the generated and passed texture to the Texture ctor.
* Graph: Simplify RegionRenderer API by exposing common RenderState methods ↵Sven Gothel2023-08-022-6/+3
| | | | (and fwd 'em to RenderState aggregate)
* Graph Add {GLRegion, GraphShape}.setTextureUnit(int): Allowing to set ↵Sven Gothel2023-08-011-2/+12
| | | | texture unit after ctor
* GraphUI: Add Shape.getSurfacePort(..): Similar to getSurfaceSize(..) but ↵Sven Gothel2023-08-011-0/+31
| | | | returns the whole Recti viewport of the shape
* GraphUI Shape: Add one-shot init callback, will be called after each ↵Sven Gothel2023-05-231-0/+22
| | | | draw(..) until it returns true.
* GraphUI Scene: Drop redundant and wrong setupMatrix(pmv) for forOne(..) and ↵Sven Gothel2023-05-231-4/+2
| | | | forAll(..), should be setup before call by user
* GraphUI MediaButton: Expose AudioSinkSven Gothel2023-05-231-0/+3
|
* GLMediaPlayer: Replace GLMediaEventListener.EVENT_CHANGE_* 'int event_mask' ↵Sven Gothel2023-05-091-6/+6
| | | | with EventMask.Bit/EventMask
* GraphUI GridLayout: Handle 'diffBL' in 2nd path, no need to store as we ↵Sven Gothel2023-04-291-10/+10
| | | | don't use PMVMatrix for computation
* GraphUI GridLayout: Remove old unused layout0(..) methodSven Gothel2023-04-291-134/+0
|
* GraphUI Working GridLayout w/ and w/o cell-size and alignment; Added BoxLayout.Sven Gothel2023-04-293-56/+369
|
* GraphUI Shape: Use null rotPivot indicating unset (isZero not sufficient); ↵Sven Gothel2023-04-281-13/+17
| | | | toString() just drop no-border and no-padding.
* GraphUI Shape: Fix hasPadding() and add padding + border details to toString()Sven Gothel2023-04-281-2/+4
|
* GraphUI Add Alignment and Gap for layoutSven Gothel2023-04-282-0/+199
|