aboutsummaryrefslogtreecommitdiffstats
path: root/src/graphui/classes
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* GraphUI Shape: Rename rotOrigin -> rotPivotSven Gothel2023-03-281-18/+18
|
* GraphUI Shape.setTransform(): Fix !sameScaleRotatePivot && hasRotate && ↵Sven Gothel2023-03-281-2/+2
| | | | | | !hasRotPivot: Don't scale pivot back from center-pivot, same as w/ hasRotPivot A copy & paste bug ..
* GraphUI Scene: Added API doc argsSven Gothel2023-03-281-6/+6
|
* GraphUI: Decouple GraphShape from Shape, i.e. allow future Shape w/o ↵Sven Gothel2023-03-2812-212/+366
| | | | Graph/GLRegion
* GraphUI Button: Simplify addShapeToRegion()Sven Gothel2023-03-282-15/+15
|
* GraphUI Label: Add getScaledLineHeight() and refine setFontScale(), i.e. ↵Sven Gothel2023-03-281-3/+21
| | | | only act and markDirty() on change
* GraphUI Label: Remove glyphVisitor's debug code (exception handling)Sven Gothel2023-03-281-10/+2
|
* GraphUI: Label: Enforce bottom-left origin @ 0/0 for good drag-zoom ↵Sven Gothel2023-03-281-3/+4
| | | | experience (working sticky edge)
* GraphUI: Shape: Fix setTransform(): Scale around center and rotate around ↵Sven Gothel2023-03-281-26/+40
| | | | pivot-point or center; Assume Shape origin to be bottom-left for drag-zoom. Removes questionable scale-hack.
* GraphUI: Shape.dispatchMouseEvent(): Rename dsx/dsxy -> sx/sy as they ↵Sven Gothel2023-03-281-7/+7
| | | | denominate whole scale-factor, not their delta
* Graph Font.GlyphVisitor*: Pass 'char symbol' to visitor, passing full ↵Sven Gothel2023-03-281-1/+1
| | | | text-processing information
* Graph Font Processing: Use Font.GlyphVisitor instead of ↵Sven Gothel2023-03-221-3/+8
| | | | OutlineShape.Visitor, allowing to use the Glyph (information).
* GraphUI Shape: Make access private where possible & reasonable, synchronize ↵Sven Gothel2023-03-226-42/+55
| | | | dirty and in draw(..) the whole dirty-validate() region.draw()
* GraphUI Scene: getStatusText(..) drop unset values, be more semantic ↵Sven Gothel2023-03-221-5/+19
| | | | sensitive (msaa -> smsaa)
* GraphUI Scene: Add removeShape*(GL2ES2..) variant w/ their destruction for ↵Sven Gothel2023-03-221-4/+18
| | | | convenience
* GraphUI Scene: Add optional frustum culling (default: disabled)Sven Gothel2023-03-221-13/+23
|
* GraphUI Shape.setTransform(): Remove 'wiggling' w/ origin, text issue came ↵Sven Gothel2023-03-211-12/+4
| | | | | | from Scene.PMVMatrixSetup bug, all shapes resize fine now. Scene.PMVMatrixSetup bug missed modelview initialition before gluUnProject(), fixed in commit 74e11bd9a49f61e49d3c73c4f9b87b4fb7fbaaf3.
* GraphUI: Fix Scene.PMVMatrixSetup impl: Setup modelview before using ↵Sven Gothel2023-03-211-2/+4
| | | | setPlanBox(..)'s gluUnProject(..)
* GraphUI Scene: Move reshape() below init from in-between display() implsSven Gothel2023-03-211-19/+19
|
* Graph: Cleanup Vertex.Factory referencing: Only bind to OutlineShape and use ↵Sven Gothel2023-03-2111-66/+36
| | | | | | | its default. GraphUI: Always use default. Graph RegionRenderer, its RenderState as well as GraphUI's Scene don't need to have knowledge of Vertex.Factory, which is only used within OutlineShape and its 'inner geom workings'.
* GraphUI Shape/Label: Allow validate(..) w/o current GL context, used by e.g. ↵Sven Gothel2023-03-202-13/+76
| | | | | | Label.setText(..) and getBounds(), preparations for more animation. Hence Shape.validate(..) is now synchronized, avoiding parallel resource modding from render- and other animating thread.
* GraphUI Shape: Provide empty default implementation for clearImpl() and ↵Sven Gothel2023-03-205-34/+4
| | | | destroyImpl()
* GraphUI Scene: Add getDefaultVertexFactory(), fix getRenderState() API doc ↵Sven Gothel2023-03-201-2/+6
| | | | (can't be null)
* GraphUI Label: Fix naming semantics: 'pixelScale' -> 'fontScale', i.e. ↵Sven Gothel2023-03-201-13/+33
| | | | font-scale factor, by which the em-sized type glyphs shall be scaled
* GraphUI Scene: Add [add|remove]Shapes(Collection) .. for convenienceSven Gothel2023-03-201-0/+7
|
* GraphUI Shape.setTransform(): Fix center semantics (half size) and consider ↵Sven Gothel2023-03-201-3/+18
| | | | origin (resolves multi-line text resize issues)
* GraphUI Scene: Move GLEventListener implementations reshape() and dispose() ↵Sven Gothel2023-03-201-48/+48
| | | | to the others, init(), display(). Ease review.
* GraphUI MediaButton: Only mark region dirty if already existsSven Gothel2023-03-201-1/+3
|
* GraphUI Default Scene.PMVMatrixSetup: Scale (back) projection to have ↵Sven Gothel2023-03-201-12/+38
| | | | normalized plane dimensions, 1 for the greater of width and height
* GraphUI Scene: Be quietSven Gothel2023-03-201-2/+0
|
* GraphUI GLButton: Add missing destroyImpl(..) to destroy the ImageSequence ↵Sven Gothel2023-03-201-0/+6
| | | | and FBO-GLAD
* GraphUI: Add UISceneDemo00 for linear animation in one main function; ↵Sven Gothel2023-03-191-0/+67
| | | | UISceneDemo01 simply provides shape drag-move and -resize
* GraphUI Shape win<->obj/shape mapping: Return actual int[] or float[] result ↵Sven Gothel2023-03-194-45/+105
| | | | or null on error instead of boolean to easy API usage
* Graph UI Shape: Remove debug println @ mouse drag releaseSven Gothel2023-03-191-1/+0
|
* Graph UI: Apply API changes to demos *WIP* (not all working yet, but compile ↵Sven Gothel2023-03-191-1/+1
| | | | clean)
* Graph UI: Adopt Shape implementations to Shape API changes (simplification)Sven Gothel2023-03-199-34/+28
|
* Graph UI Shape: Fix move and resize via 1-pointer mouse drag: Need to apply ↵Sven Gothel2023-03-191-32/+33
| | | | | | scale on drag-delta, operating on scaled-model-viewpoint Further, on resize, we have different sticky edges for either bottom-right or bottom-left drag resize.