aboutsummaryrefslogtreecommitdiffstats
path: root/src/graphui/classes
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* 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
|