summaryrefslogtreecommitdiffstats
path: root/src/demos/com
Commit message (Collapse)AuthorAgeFilesLines
* GraphUI Scene.screenshot(): Add convenient variant to be executed on-display ↵Sven Gothel2023-04-134-17/+7
| | | | call. FontView stays open and issues a screenshot.
* GraphUI Demos: Adding prelim FontView01, which may become a 'little ↵Sven Gothel2023-04-134-3/+196
| | | | FontForge' ;-)
* GraphUI Demos: Fix var-name typo, its velocitySven Gothel2023-04-136-16/+16
| | | | .. or how to propagate a typo from an initial test case to all of 'em ;-)
* GraphUI GridLayout: Functional Grid Layout w/ Padding, demo'ed in ↵Sven Gothel2023-04-122-149/+150
| | | | | | | | | | 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 Demos: Use GraphUIDemoArgs for UISceneDemo1[01]Sven Gothel2023-04-122-58/+42
|
* GraphUI UISceneDemo03b: Action with the Glyph Group Container: Rotate auto ↵Sven Gothel2023-04-101-0/+537
| | | | and w/ scroll-wheel (or zoom if alt is pressed)
* GraphUI UISceneDemo03: Use Group as a Container to hold all Glyphs and have ↵Sven Gothel2023-04-101-6/+12
| | | | them no more interacting when arrived. Play: Drag 'em ;-)
* Matrix4f.mapWin*(): Drop unused temp matrices, map*() returns false on ↵Sven Gothel2023-04-092-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* GraphUI Demos: Use GraphUIDemoArgsSven Gothel2023-04-083-30/+27
|
* GraphUI: Adjust for rotation: Drag-resize and -move (flip x- and/or y-axix), ↵Sven Gothel2023-04-082-1/+250
| | | | | | 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-0714-77/+89
| | | | | | | | | | | | | | | | | 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-059-59/+301
| | | | | | | | | | | | | | | | 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.
* Math: Complete Matrix4f w/ Vec[234]f and adopt it throughout Quaternion, ↵Sven Gothel2023-04-055-72/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | Ray, AABBox, Frustum, Stereo*, ... adding hook to PMVMatrix Motivation was to simplify matrix + vector math usage, ease review and avoid usage bugs. Matrix4f implementation uses dedicated float fields instead of an array. Performance didn't increase much, as JVM >= 11(?) has some optimizations to drop the array bounds check. AMD64 + OpenJDK17 - Matrix4f.mul(a, b) got a roughly ~10% enhancement over FloatUtil.multMatrix(a, b, dest) - Matrix4f.mul(b) roughly ~3% slower than FloatUtil.multMatrix(a, b, dest) - FloatUtil.multMatrix(a, a_off, b, b_off, dest) is considerable slower than all - Matrix4f.invert(..) roughly ~3% slower than FloatUtil.invertMatrix(..) RaspberryPi 4b aarch64 + OpenJDK17 - Matrix4f.mul(a, b) got a roughly ~10% enhancement over FloatUtil.multMatrix(a, b, dest) - Matrix4f.mul(b) roughly ~20% slower than FloatUtil.multMatrix(a, b) - FloatUtil.multMatrix(a, a_off, b, b_off, dest) is considerable slower than all - Matrix4f.invert(..) roughly ~4% slower than FloatUtil.invertMatrix(..) Conclusion - Matrix4f.mul(b) needs to be revised (esp for aarch64) - Matrix4f.invert(..) should also not be slower ..
* GraphUI: Relocate com.jogamp.graph.ui.gl.* -> com.jogamp.graph.ui.*, resolve ↵Sven Gothel2023-03-3113-40/+40
| | | | | | GL/VK abstraction at a later time differently Actual GPU rendering toolkit dependency can be abstracted differently, i.e. GPU <- { GL, VK } etc.
* GraphUI: Fix debug-box and allow API access in Shape (off, thickness ↵Sven Gothel2023-03-302-0/+2
| | | | fractional to box size) and Scene for all Shapes.
* GraphUI Demos: Cover more std arguments via GraphUIDemoArgsSven Gothel2023-03-303-104/+53
|
* GraphUI Demo: UISceneDemo20 use Scene.screenshot(..), drop own codeSven Gothel2023-03-301-31/+3
|
* GraphUI Demo UISceneDemo03: Add 1 space padding to demo-text, make ↵Sven Gothel2023-03-301-10/+36
| | | | screenshots, add launch screen (visible @ '-wait')
* GraphUI: Add GlyphShape representing a single Font.Glyph as a GraphShape; ↵Sven Gothel2023-03-302-111/+198
| | | | | | | | | | | | | | | | | | 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 Demo UISceneDemo03: Add kerning and compensate on label 0/0 origin ↵Sven Gothel2023-03-281-8/+22
| | | | using Glyph bounds minY()
* GraphUI Demo UISceneDemo02: Use em-sized label w/ scale.Sven Gothel2023-03-281-8/+8
|
* GraphUI: Decouple GraphShape from Shape, i.e. allow future Shape w/o ↵Sven Gothel2023-03-286-91/+99
| | | | Graph/GLRegion
* GraphUI Demos: Remove unused GPUUISceneTextAnim01Sven Gothel2023-03-281-303/+0
|
* Graph FontScale: Simplify names, fix API doc and add unit testSven Gothel2023-03-284-4/+4
|
* Graph Font: Rename getBBox*() -> getBounds*() to preserve a common semantic nameSven Gothel2023-03-271-1/+1
|
* GraphUI Demos: (Text) Type Animation ...Sven Gothel2023-03-222-0/+697
|
* UISceneDemo0[01]: Useless minor editing (can't move animator lower as sadly ↵Sven Gothel2023-03-222-2/+1
| | | | used in our window dtor event handler)
* Graph Font Processing: Use Font.GlyphVisitor instead of ↵Sven Gothel2023-03-221-4/+4
| | | | OutlineShape.Visitor, allowing to use the Glyph (information).
* GraphUI Demos: Adopt to shapesSharpness -> oshapesSharpness renameSven Gothel2023-03-227-7/+7
|
* GraphUI: Fix Scene.PMVMatrixSetup impl: Setup modelview before using ↵Sven Gothel2023-03-212-4/+8
| | | | setPlanBox(..)'s gluUnProject(..)
* GraphUI UISceneDemo20: Consolidate the actual implementation and main ↵Sven Gothel2023-03-214-229/+197
| | | | launcher to our new UISceneDemo naming series
* GraphUI UISceneDemo*: Stop animation loop if window got destroyedSven Gothel2023-03-212-4/+4
|
* GraphUI UISceneDemo*: Add windowResized() callback to update window title ↵Sven Gothel2023-03-213-5/+12
| | | | showing current surfaceSize
* GraphUI UISceneDemo*: Use lambdas for GLAutoDrawable.invoke(..) to reduce LOCSven Gothel2023-03-212-12/+6
| | | | GLAutoDrawable.invoke(..) API doc: Add semantics about GLRunnable return value.
* Graph: Cleanup Vertex.Factory referencing: Only bind to OutlineShape and use ↵Sven Gothel2023-03-2116-101/+73
| | | | | | | 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: Provide empty default implementation for clearImpl() and ↵Sven Gothel2023-03-205-40/+0
| | | | destroyImpl()
* Rename UISceneDemo{02->10}Sven Gothel2023-03-201-2/+2
|
* GraphUI Demos: Bring back GPUUISceneGLListener0A ..Sven Gothel2023-03-201-71/+104
| | | | | | | | | | | | | | | | | | | | - Contrary to UISceneDemo0[01], here we - Call the Scene GLEventListener methods manually - Issue glClear* ourselves - Using own PMVMatrixSetup - gluPerspective like Scene's default - no normal scale to 1, keep distance to near plane for rotation effects. We scale Shapes - translate origin to bottom-left - Scale Button not by screen-size but Scene.getBounds() dimension, hence issue setupUI() from reshape() and not from init() - GLButton: Using additional view-rotation like UISceneDemo01 - Multi-line text labels resize issues are - Supposed sticky-edge is moving (Sticky-edge are the opposites of the picked drag point)
* GraphUI UISceneDemo01: Stop rotating animation if GLButton animation is ↵Sven Gothel2023-03-201-22/+22
| | | | toggled off
* UISceneDemo02: The 'dirty' variant w/ listener (printf) attachedSven Gothel2023-03-201-250/+85
|
* UISceneDemo01: Use GLButton shape w/ animating and rotating gears and set up ↵Sven Gothel2023-03-201-180/+150
| | | | an own Scene.PMVMatrixSetup with a plane dimension of 100
* GraphUI Default Scene.PMVMatrixSetup: Scale (back) projection to have ↵Sven Gothel2023-03-201-4/+21
| | | | normalized plane dimensions, 1 for the greater of width and height
* Demos GearsES2: Expose view rotation vars and listenerSven Gothel2023-03-201-1/+14
|
* Demo MovieSimple: Default to useOrigScale=false, enable @ main w/ -orig_scaleSven Gothel2023-03-191-4/+4
|
* GraphUI: Add UISceneDemo00 for linear animation in one main function; ↵Sven Gothel2023-03-192-46/+192
| | | | UISceneDemo01 simply provides shape drag-move and -resize
* GraphUI Shape win<->obj/shape mapping: Return actual int[] or float[] result ↵Sven Gothel2023-03-194-75/+47
| | | | or null on error instead of boolean to easy API usage
* GraphUI UISceneDemo01: Fix disposal, use windowDestroyed() WindowListener to ↵Sven Gothel2023-03-191-2/+1
| | | | stop animator
* GraphUI UISceneDemo01: Res independent Shape, in Scene attached to GLWindow ↵Sven Gothel2023-03-191-19/+14
| | | | showing simple linear Shape movement w/ listener attached
* Graph UI: Apply API changes to demos *WIP* (not all working yet, but compile ↵Sven Gothel2023-03-197-265/+675
| | | | clean)
* Graph UI: Adopt Shape implementations to Shape API changes (simplification)Sven Gothel2023-03-195-10/+10
|