summaryrefslogtreecommitdiffstats
path: root/src/graphui
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* GraphUI Shape: [add|remove]MouseListener(): Return shape for chainingSven Gothel2023-04-281-4/+6
|
* GraphUI Colors: Use pure white modulation w/ color-channel on no-action for ↵Sven Gothel2023-04-285-23/+57
| | | | original color, adjust defaults accordingly
* GraphUI Revise Padding and Border: Padding + Border belong to Shape's ↵Sven Gothel2023-04-287-42/+159
| | | | bounds. Account for both (seperately) and add border rendering to Group as well.
* GraphUI GraphShape: Apply {update->reset}GLRegion()Sven Gothel2023-04-284-4/+4
| | | | See commit 386f9652e0169b0aa7f6ead1bf230d5d67d00a38
* GraphUI GraphShape: Refine API docSven Gothel2023-04-281-1/+23
|
* GraphUI GraphShape: {update->reset}GLRegion() and reserve vertices+indices ↵Sven Gothel2023-04-284-16/+20
| | | | if (rect) border is present
* GraphUI GraphShape: createGLRegion() -> updateGLRegion(), called by ↵Sven Gothel2023-04-2012-88/+157
| | | | | | | | | | | | | | | | | | | | | | addShapeToRegion() impl to utilize OutlineShape -> GLRegion ctor w/ proper buffer-size This way we avoid unnecessary buffer growth and allow creation of 'always' fitting buffer sizes. +++ Update or freshly create the GLRegion, while allocating its buffers with given initial `vertexCount` and `indexCount`. Method shall be invoked by the addShapeToRegion(GLProfile, GL2ES2) implementation before actually adding the OutlineShape to the GLRegion. addShapeToRegion(GLProfile, GL2ES2) is capable to determine initial `vertexCount` and `indexCount` buffer sizes, as it composes the OutlineShapes to be added. updateGLRegion(GLProfile, GL2ES2, TextureSequence, OutlineShape) maybe used for convenience. In case GLRegion is `null`, a new instance is being created. In case the GLRegion already exists, it will be either cleared if the GL2ES2 `gl` instance is not `null` or earmarked for deletion at a later time and a new instance is being created.
* GraphUI Button.createGLRegion(): Pre-calc Region buffer size for BaseButton ↵Sven Gothel2023-04-201-1/+14
| | | | (16) + Label-Text to avoid buffer grow
* GraphUI {Round->Base}Button, denoting perpendicular or round corners (aka ↵Sven Gothel2023-04-193-42/+66
| | | | | | | | rectangle or oval shape) - Button + BaseButton setter also pass this for chaining - Button {twoPassLabel->label}ZOffset, investigate whether z-offset still required (not if blending is enabled!) -
* GraphUI: Add BoxLayout and Margin, todo: Have GridLayout properly use Gap w/ ↵Sven Gothel2023-04-182-0/+319
| | | | Padding and alignment (Margin?) (CSS alike)
* GraphUI Padding: Use CSS alike ctor semantics, hence swizzle ctor argumentsSven Gothel2023-04-181-8/+65
|
* Graph + GraphUI: Consolidate Vertex: Drop SVertex and factory, use Vec[234]f ↵Sven Gothel2023-04-189-94/+64
| | | | | | | | | | | instead of float[] and remove unused VectorUtil methods After Matrix4f consolidation and proving same or better performance on non array types, this enhances code readability, simplifies API, reduces bugs and may improve performance. GraphUI: - Have RoundButton as a functional class to make a round or rectangular backdrop, i.e. impl. addShapeToRegion() via reused addRoundShapeToRegion()
* GraphUI Group.drawImpl0(): Copy List<Shape> to array and sort using ↵Sven Gothel2023-04-141-2/+7
| | | | | | | Shape.ZAscendingComparator - fixes z-order issue, as we shall do same approach as in Scene.display() - fixes mutated container issue if a Shape gets removed or added to original List
* GraphUI Container.removeShape(..): Return removed Shape, add ↵Sven Gothel2023-04-143-8/+33
| | | | removeShape(index) variant; Group.(add|remove)Shape(..) markShapeDirty() to recompute bbox and layout.
* GraphUI Shape.validate(*): Return this for chainingSven Gothel2023-04-141-2/+4
|
* GraphUI Scene: Use getRenderModeString(..) w/ sample-counts where ↵Sven Gothel2023-04-141-43/+55
| | | | applicable, restructure screenshot(..) by using nextScreenshotFile(..) - all using default tech representation
* GraphUI Scene.screenshot(): Add convenient variant to be executed on-display ↵Sven Gothel2023-04-131-0/+28
| | | | call. FontView stays open and issues a screenshot.
* GraphUI GridLayout: Also adjust potential bottom-left delta when centering ↵Sven Gothel2023-04-131-2/+3
| | | | shape to cell (like GlyphShape w/ underline)
* GraphUI Shape: Add onClicked(..)Sven Gothel2023-04-131-0/+5
|
* GraphUI Group: Avoid additional shapes-loop w/o layouterSven Gothel2023-04-131-10/+15
|
* GraphUI Rectangle: Construct shape w/ 0/0 bottom-left origin as recommended ↵Sven Gothel2023-04-131-31/+26
| | | | by Shape spec
* GraphUI GridLayout: Functional Grid Layout w/ Padding, demo'ed in ↵Sven Gothel2023-04-123-42/+198
| | | | | | | | | | UISceneDemo20 with button Groups All layout magic is simply performed in Group.Layout.layout(..) @ validate, incl. updating the bounding box to have the padding included. This demonstrates GraphUI's capability to be used with correct layout, i.e. its pure matrix based position, scale and rotation.
* GraphUI TreeTool: Iterate from start to end (not vice versa), eliminating ↵Sven Gothel2023-04-121-4/+4
| | | | potential side-effects - fixing forSortedAll(..)
* Graph/Math: Cleanup toString(), spacing and use System.lineSeparator()Sven Gothel2023-04-121-2/+2
|
* GraphUI: Return this on setter/modifier methods for chainingSven Gothel2023-04-124-28/+67
|
* GraphUI TreeTool: For all forAll*(): Allow acting upon Container Shape, i.e. ↵Sven Gothel2023-04-101-22/+14
| | | | | | 1st visit Shape, only therafter (if false) traverse into Container This is required to allow actions on a Container itself.
* GraphUI Scene.pickShape(): Consider isInteractive() most early in visitor() ↵Sven Gothel2023-04-101-4/+2
| | | | before gluUnProjectRay(..)
* GraphUI Shape: Refined toString(), add onToggle(Listener), at toggle() only ↵Sven Gothel2023-04-101-4/+9
| | | | markStateDirty() if toggleable
* GraphUI: Group is non-interactive per default -> setInteractive(..)Sven Gothel2023-04-101-1/+8
|
* GraphUI: Container (Group, Scene): Add removeAllShapes() and expose ↵Sven Gothel2023-04-103-3/+43
| | | | frustum-culling get/set
* Matrix4f.mapWin*(): Drop unused temp matrices, map*() returns false on ↵Sven Gothel2023-04-092-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | invPMv null; PMVMatrix: Make Mvi, Mvit optional at ctor, add user PMv and PMvi - used at gluUnProject() .. Matrix4f.mapWin*() variants w/ invPMv don't need temp matrices, they also shall handle null invPMv -> return false to streamline usage w/ PMVMatrix if inversion failed. PMVMatrix adds user space common premultiplies Pmv and Pmvi on demand like Frustum. These are commonly required for e.g. gluUnProject(..)/mapWinToObj(..) and might benefit from caching if stack is maintained and no modification occured. PMVMatrix now has the shader related Mvi and Mvit optional at construction(!), so its backing buffers. This reduces footprint for other use cases. The 2nd temp matrix is also on-demand, to reduce footprint for certain use cases. Removed public access to temporary storage. +++ While these additional matrices are on demand and/or at request @ ctor, general memory footprint is reduced per default and hence deemed acceptable while still having PMVMatrix acting as a core flexible matrix provider.
* PMVMatrix: Expose temporary storage (w/o side-effects) for efficiency; ↵Sven Gothel2023-04-081-4/+12
| | | | | | | GraphUI.Shape: Efficiently reuse matPMv and temporary PMVMatrix storage Reuse PMv in Shape.getSurfaceSize() and Shape.winToShapeCoord(), for the latter we invert the reused PMv for mapWinToObj (i.e. UnProject).
* GraphUI: Adjust for rotation: Drag-resize and -move (flip x- and/or y-axix), ↵Sven Gothel2023-04-081-11/+22
| | | | | | as well as getSurfaceSize(..) (use absolute size) Tested w/ UISceneDemo01b and UISceneDemo03, where you now can pick any moving glyph at any rotation and drag it.
* PMVMatrix rewrite using Matrix4f, providing SyncMatrix4f* for GLUniformData; ↵Sven Gothel2023-04-073-145/+117
| | | | | | | | | | | | | | | | | Utilize Vec3f, Recti, .. throughout API (Matrix4f, AABBox, .. Graph*) Big Easter Cleanup - Net -214 lines of code, despite new classes. - GLUniformData buffer can be synced w/ underlying data via SyncAction/SyncBuffer, e.g. SyncMatrix4f + SyncMatrices4f - PMVMatrix rewrite using Matrix4f and providing SyncMatrix4f/Matrices4f to sync w/ GLUniformData - Additional SyncMatrix4f16 + SyncMatrices4f16 covering Matrix4f sync w/ GLUniformData w/o PMVMatrix - Utilize Vec3f, Recti, .. throughout API (Matrix4f, AABBox, .. Graph*) - Moved FloatUtil -> Matrix4f, kept a few basic matrix ops for ProjectFloat - Most, if not all, float[] and int[] should have been moved to proper classes - int[] -> Recti for viewport rectangle - Matrix4f and PMVMatrix is covered by math unit tests (as was FloatUtil before) -> save Passed all unit tests on AMD64 GNU/Linux
* GraphUI: Adopting Vec*f API; Adding Group; Scene + Group are Container, ↵Sven Gothel2023-04-0510-214/+913
| | | | | | | | | | | | | | | | traversing the PMVMatrix throughout childs (-> see TreeTool). Utilizing the Vec*f (and Matrix4f) API w/ AABBox et al renders our code more clean & safe, see commit 15e60161787224e85172685f74dc0ac195969b51. A Group allows to contain multiple Shapes, hence the PMVMatrix must be traversed accordingly using TreeTool for all operations (draw, picking, win->obj coordinates, ..). Hence Scene + Group are now implementing Container and reuse code via TreeTool and a Shape.Visitor*. This will allow further simplification of user code.
* GraphUI: Use Shape.ZAscendingComparator in Scene, to be reused across typsSven Gothel2023-03-312-29/+33
|
* GraphUI: Relocate com.jogamp.graph.ui.gl.* -> com.jogamp.graph.ui.*, resolve ↵Sven Gothel2023-03-3113-32/+31
| | | | | | GL/VK abstraction at a later time differently Actual GPU rendering toolkit dependency can be abstracted differently, i.e. GPU <- { GL, VK } etc.
* GraphUI Shape: DragZoom: Allow resize_sxy_min down to 1/2%, need to find a ↵Sven Gothel2023-03-301-1/+1
| | | | | | | | | | good way to auto-deteminate this one (dpi, ..) Type animation UISceneDemo03 requires this to resize a single glyph, i.e. 0.03f was too big. 1% might be OK, but then .. maybe not. In general, a dpi autodetermination of a minimal scale/size might be OK, assuming user sits in front of a screen and not having a multi-screen circus arena setup ;-)
* GraphUI: Fix debug-box and allow API access in Shape (off, thickness ↵Sven Gothel2023-03-305-34/+77
| | | | fractional to box size) and Scene for all Shapes.
* GraphUI Scene: Add screenshot(..) method for convenienceSven Gothel2023-03-301-4/+37
|
* GraphUI: Add GlyphShape representing a single Font.Glyph as a GraphShape; ↵Sven Gothel2023-03-302-3/+219
| | | | | | | | | | | | | | | | | | Use w/ UISceneDemo03 Type Animation... A list of GlyphShape can be created via GlyphShape.processString(..), which preserves all details incl. intended original unscaled position and its kerning. Whitespace or contourless Glyphs are dropped. A GlyphShape is represented in font em-size [0..1] unscaled. +++ UISceneDemo03 Type Animation - Using GlyphShape and apply scaling via its Shape.setScale() - Recalc fontScale per used text - Refined 'arrival' criteria and smoothing out near target w/ speed-up rotation - Using GraphUIDemoArgs to parse common commandline demo options
* GraphUI Shape.setTransform(..): Scale before rotate to preserve target-size ↵Sven Gothel2023-03-301-14/+14
| | | | in rotation
* GraphUI Shape: Refine API docSven Gothel2023-03-301-8/+8
|
* Graph*: API doc refinementSven Gothel2023-03-301-0/+7
|