|
JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java (public API).
|
Generic Shape, potentially using a Graph via GraphShape or other means of representing content.
More...
Classes | |
| interface | DrawListener |
Shape draw listener action returning a boolean value More... | |
| class | EventInfo |
Shape event info for propagated NEWTEvents containing reference of the intended shape as well as the rotated relative position to this shape. More... | |
| class | ForwardKeyListener |
Forward KeyListener, to be attached to a key event source forwarded to the receiver set at constructor. More... | |
| class | ForwardMouseListener |
Forward MouseGestureListener, to be attached to a mouse event source forwarded to the receiver set at constructor. More... | |
| interface | Listener |
General Shape listener action. More... | |
| class | MouseGestureAdapter |
Convenient adapter combining dummy implementation for MouseListener and GestureListener. More... | |
| interface | MouseGestureListener |
Combining MouseListener and GestureListener. More... | |
| interface | MoveListener |
Shape move listener More... | |
| interface | PointerListener |
Shape pointer listener, e.g. More... | |
| interface | Visitor1 |
General Shape visitor. More... | |
| interface | Visitor2 |
General Shape visitor. More... | |
Public Member Functions | |
| Group | getParent () |
Returns the last parent container Group this shape has been added to or null. More... | |
| final Shape | setID (final int id) |
| Set a symbolic ID for this shape for identification. More... | |
| final int | getID () |
| Return the optional symbolic ID for this shape. More... | |
| Shape | setName (final String name) |
| Set a symbolic name for this shape for identification. More... | |
| final String | getName () |
Return the optional symbolic name for this shape, defaults to noname. More... | |
| boolean | isGroup () |
Returns true if this shape denotes a Group, otherwise false. More... | |
| final boolean | isVisible () |
Returns true if this shape is set visible by the user, otherwise false. More... | |
| final Shape | setVisible (final boolean v) |
| Enable (default) or disable this shape's visibility. More... | |
| final Shape | setPaddding (final Padding padding) |
Sets the unscaled padding for this shape, which is included in unscaled getBounds() and also includes the border. More... | |
| Padding | getPadding () |
Returns unscaled Padding of this shape, which is included in unscaled getBounds() and also includes the border. More... | |
| boolean | hasPadding () |
Returns true if setPaddding(Padding) added a non Padding#zeroSize() spacing to this shape. More... | |
| final Shape | setBorder (final float thickness) |
Sets the thickness of the border, which is included in getBounds() and is outside of getPadding(). More... | |
| final boolean | hasBorder () |
Returns true if a border has been enabled via setBorder(float, Padding). More... | |
| final float | getBorderThickness () |
Returns the border thickness, see setBorder(float, Padding). More... | |
| final void | runSynced (final Runnable action) |
Perform given Runnable action synchronized. More... | |
| final void | clear (final GL2ES2 gl, final RegionRenderer renderer) |
| Clears all data and reset all states as if this instance was newly created. More... | |
| final void | destroy (final GL2ES2 gl, final RegionRenderer renderer) |
| Destroys all data. More... | |
| final void | onDraw (final DrawListener l) |
Set a user one-shot initializer callback or custom draw(GL2ES2, RegionRenderer) hook. More... | |
| final void | onHover (final PointerListener l) |
| Set user callback to be notified when a pointer/mouse is moving over this shape. More... | |
| final void | onMove (final MoveListener l) |
Set user callback to be notified when shape is move(Vec3f)'ed. More... | |
| final void | onToggle (final Listener l) |
Set user callback to be notified when shape toggle()'ed. More... | |
| final void | onClicked (final PointerListener l) |
| Set user callback to be notified when shape is clicked. More... | |
| final Shape | addActivationListener (final Listener l) |
| Add user callback to be notified when shape is activated (pointer-over and/or click) or de-activated (pointer left). More... | |
| final Shape | removeActivationListener (final Listener l) |
| final Shape | moveTo (final float tx, final float ty, final float tz) |
| Move to scaled position. More... | |
| final Shape | moveTo (final Vec3f t) |
| Move to scaled position. More... | |
| final Shape | move (final float dtx, final float dty, final float dtz) |
| Move about scaled distance. More... | |
| final Shape | move (final Vec3f dt) |
| Move about scaled distance. More... | |
| final Vec3f | getPosition () |
Returns position Vec3f reference, i.e. More... | |
| final Quaternion | getRotation () |
Returns Quaternion for rotation. More... | |
| final Shape | setRotation (final Quaternion q) |
Sets the rotation Quaternion. More... | |
| final Vec3f | getRotationPivot () |
Return unscaled rotation origin Vec3f reference, aka pivot. More... | |
| final Shape | setRotationPivot (final float px, final float py, final float pz) |
| Set unscaled rotation origin, aka pivot. More... | |
| final Shape | setRotationPivot (final Vec3f pivot) |
| Set unscaled rotation origin, aka pivot. More... | |
| final Shape | setScale (final Vec3f s) |
| Set scale factor to given scale. More... | |
| final Shape | setScale (final float sx, final float sy, final float sz) |
| Set scale factor to given scale. More... | |
| final Shape | scale (final Vec3f s) |
| Multiply current scale factor by given scale. More... | |
| final Shape | scale (final float sx, final float sy, final float sz) |
| Multiply current scale factor by given scale. More... | |
| final Vec3f | getScale () |
Returns scale Vec3f reference. More... | |
| final void | markShapeDirty () |
Marks the shape dirty, causing next draw() to recreate the Graph shape and reset the region. More... | |
| final void | markStateDirty () |
Marks the rendering state dirty, causing next draw() to notify the Graph region to reselect shader and repaint potentially used FBOs. More... | |
| final AABBox | getBounds () |
Returns the unscaled bounding AABBox for this shape, borrowing internal instance. More... | |
| final float | getScaledWidth () |
Returns the scaled width of the bounding AABBox for this shape. More... | |
| final float | getScaledHeight () |
Returns the scaled height of the bounding AABBox for this shape. More... | |
| final float | getScaledDepth () |
| final AABBox | getBounds (final GLProfile glp) |
Returns the unscaled bounding AABBox for this shape. More... | |
| void | drawToSelect (final GL2ES2 gl, final RegionRenderer renderer) |
Experimental selection draw command used by Scene. More... | |
| void | draw (final GL2ES2 gl, final RegionRenderer renderer) |
| Renders the shape. More... | |
| final Shape | validate (final GL2ES2 gl) |
Validates the shape's underlying GLRegion. More... | |
| final Shape | validate (final GLProfile glp) |
Validates the shape's underlying GLRegion w/o a current GL2ES2 object. More... | |
| final Shape | validate (final GL2ES2 gl, final GLProfile glp) |
Validate the shape via validate(GL2ES2) if gl is not null, otherwise uses validate(GLProfile). More... | |
| final void | applyMatToMv (final PMVMatrix4f pmv) |
Applies the internal Matrix4f to the given modelview matrix, i.e. More... | |
| final Matrix4f | getMat () |
Returns the internal Matrix4f reference. More... | |
| final Matrix4f | getMat (final Matrix4f out) |
Returns a copy of the internal Matrix4f to out. More... | |
| final boolean | isMatIdentity () |
Returns true if getMat() has not been mutated, i.e. More... | |
| final void | updateMat () |
Updates the internal Matrix4f with local position, rotation and scale. More... | |
| final PMVMatrix4f | setPMVMatrix (final Scene.PMVMatrixSetup pmvMatrixSetup, final Recti viewport, final PMVMatrix4f pmv) |
Setup the given PMVMatrix4f and apply this shape's transformation. More... | |
| final PMVMatrix4f | setPMVMatrix (final Scene scene, final PMVMatrix4f pmv) |
Setup the given PMVMatrix4f and apply this shape's transformation. More... | |
| final Recti | getSurfacePort (final PMVMatrix4f pmv, final Recti viewport, final Recti surfacePort) |
| Retrieve surface (view) port of this shape, i.e. More... | |
| final int[] | getSurfaceSize (final PMVMatrix4f pmv, final Recti viewport, final int[] surfaceSize) |
| Retrieve surface (view) size in pixels of this shape. More... | |
| final int[] | getSurfaceSize (final Scene.PMVMatrixSetup pmvMatrixSetup, final Recti viewport, final PMVMatrix4f pmv, final int[] surfaceSize) |
| Retrieve surface (view) size in pixels of this shape. More... | |
| final int[] | getSurfaceSize (final Scene scene, final PMVMatrix4f pmv, final int[] surfaceSize) |
| Retrieve surface (view) size in pixels of this shape. More... | |
| final float[] | getPixelPerShapeUnit (final int[] shapeSizePx, final float[] pixPerShape) |
| Retrieve pixel per scaled shape-coordinate unit, i.e. More... | |
| final float[] | getPixelPerShapeUnit (final PMVMatrix4f pmv, final Recti viewport, final float[] pixPerShape) |
| Retrieve pixel per scaled shape-coordinate unit, i.e. More... | |
| final float[] | getPixelPerShapeUnit (final Scene scene, final PMVMatrix4f pmv, final float[] pixPerShape) |
| Retrieve pixel per scaled shape-coordinate unit, i.e. More... | |
| final int[] | shapeToWinCoord (final PMVMatrix4f pmv, final Recti viewport, final Vec3f objPos, final int[] glWinPos) |
| Map given object coordinate relative to this shape to window coordinates. More... | |
| final int[] | shapeToWinCoord (final Scene.PMVMatrixSetup pmvMatrixSetup, final Recti viewport, final Vec3f objPos, final PMVMatrix4f pmv, final int[] glWinPos) |
| Map given object coordinate relative to this shape to window coordinates. More... | |
| final int[] | shapeToWinCoord (final Scene scene, final Vec3f objPos, final PMVMatrix4f pmv, final int[] glWinPos) |
| Map given object coordinate relative to this shape to window coordinates. More... | |
| final Vec3f | winToShapeCoord (final PMVMatrix4f pmv, final Recti viewport, final int glWinX, final int glWinY, final Vec3f objPos) |
| Map given gl-window-coordinates to object coordinates relative to this shape and its z-coordinate. More... | |
| final Vec3f | winToShapeCoord (final Scene.PMVMatrixSetup pmvMatrixSetup, final Recti viewport, final int glWinX, final int glWinY, final PMVMatrix4f pmv, final Vec3f objPos) |
| Map given gl-window-coordinates to object coordinates relative to this shape and its z-coordinate. More... | |
| final Vec3f | winToShapeCoord (final Scene scene, final int glWinX, final int glWinY, final PMVMatrix4f pmv, final Vec3f objPos) |
| Map given gl-window-coordinates to object coordinates relative to this shape and its z-coordinate. More... | |
| final Vec4f | getColor () |
Returns base-color w/o color channel, will be modulated w/ getPressedColorMod(), getToggleOnColorMod(), getToggleOffColorMod() and getActiveColorMod(). More... | |
| final Vec4f | getPressedColorMod () |
Returns modulation color when isPressed(). More... | |
| final Vec4f | getToggleOnColorMod () |
Returns modulation color when isToggleOn(). More... | |
| final Vec4f | getToggleOffColorMod () |
Returns modulation color when not isToggleOn(). More... | |
| final Vec4f | getActiveColorMod () |
Returns modulation color when isActive(). More... | |
| Shape | setColor (final float r, final float g, final float b, final float a) |
| Set base color. More... | |
| Shape | setColor (final Vec4f c) |
| Set base color. More... | |
| Shape | setPressedColorMod (final float r, final float g, final float b, final float a) |
Set pressed color, modulating getColor() if isPressed(). More... | |
| final Shape | setToggleOnColorMod (final float r, final float g, final float b, final float a) |
Set toggle-on color, modulating getColor() if isToggleOn() and setToggleable(boolean). More... | |
| final Shape | setToggleOffColorMod (final float r, final float g, final float b, final float a) |
Set toggle-off color, modulating getColor() if !isToggleOn() and setToggleable(boolean). More... | |
| final Shape | setActiveColorMod (final Vec4f c) |
Enable active color, modulation getColor() if isActive() with passing c != null, disable with passing c == null. More... | |
| final Vec4f | getBorderColor () |
| final Shape | setBorderColor (final float r, final float g, final float b, final float a) |
| Set border color. More... | |
| final Shape | setBorderColor (final Vec4f c) |
| Set border color. More... | |
| final String | toString () |
| String | getSubString () |
| final Shape | setPressed (final boolean b) |
| final boolean | isPressed () |
| final Shape | setToggleable (final boolean toggleable) |
| Set this shape toggleable, default is off. More... | |
| boolean | isToggleable () |
| Returns true if this shape is toggable, i.e. More... | |
| final Shape | setToggle (final boolean v) |
| Set this shape's toggle state, default is off. More... | |
| final Shape | toggle () |
| final boolean | isToggleOn () |
| Returns true this shape's toggle state. More... | |
| final boolean | isActive () |
| Returns true of this shape is active. More... | |
| final float | getAdjustedZ () |
| Tooltip | setToolTip (final Tooltip newTooltip) |
Set's a new Tooltip for this shape. More... | |
| void | removeToolTip () |
| Tooltip | getTooltip () |
| final Shape | setInteractive (final boolean v) |
| Set whether this shape is interactive in general, i.e. More... | |
| final boolean | isInteractive () |
Returns if this shape allows user interaction in general, see setInteractive(boolean). More... | |
| final Shape | setActivable (final boolean v) |
Set whether this shape is allowed to be activated, i.e become isActive(). More... | |
| final boolean | isActivable () |
Returns if this shape is allowed to be activated, i.e become isActive(). More... | |
| final Shape | setDiscarded (final boolean v) |
Set whether this shape is discarded in last draw(GL2ES2, RegionRenderer), i.e. More... | |
| final boolean | isDiscarded () |
Returns whether this shape is discarded in last draw(GL2ES2, RegionRenderer), i.e. More... | |
| final Shape | setDraggable (final boolean draggable) |
| Set whether this shape is draggable, i.e. More... | |
| final boolean | isDraggable () |
| Returns if this shape is draggable, a user interaction. More... | |
| final Shape | setResizable (final boolean resizable) |
| Set whether this shape is resizable, i.e. More... | |
| final boolean | isResizable () |
| Returns if this shape is resizable, a user interaction. More... | |
| final boolean | isFixedARatioResize () |
Returns if aspect-ratio shall be kept at resize, if isResizable(). More... | |
| final Shape | setFixedARatioResize (final boolean v) |
Sets whether aspect-ratio shall be kept at resize, if isResizable(). More... | |
| final Shape | setDragAndResizable (final boolean v) |
| Set whether this shape is draggable and resizable. More... | |
| final Shape | addMouseListener (final MouseGestureListener l) |
| final Shape | removeMouseListener (final MouseGestureListener l) |
| void | receiveMouseEvents (final Shape source) |
Forward MouseGestureListener events to this Shape from source using a ForwardMouseListener. More... | |
| final Shape | addKeyListener (final KeyListener l) |
| final Shape | removeKeyListener (final KeyListener l) |
| void | receiveKeyEvents (final Shape source) |
Forward KeyListener events to this Shape from source using a ForwardKeyListener. More... | |
| abstract boolean | hasColorChannel () |
Returns true if implementation uses an extra color channel or texture which will be modulated with the passed rgba color drawImpl0(GL2ES2, RegionRenderer, float[]). More... | |
Static Public Attributes | |
| static Comparator< Shape > | ZAscendingComparator |
| static Comparator< Shape > | ZDescendingComparator |
Protected Member Functions | |
| Shape () | |
Create a generic UI Shape. More... | |
| void | setParent (final Group c) |
| final void | dispatchActivationEvent (final Shape s) |
| Dispatch activation event event to this shape. More... | |
| boolean | isShapeDirty () |
Returns the shape's dirty state, see markShapeDirty(). More... | |
| final boolean | isStateDirty () |
Returns the rendering dirty state, see markStateDirty(). More... | |
| final String | getDirtyString () |
| void | toggleNotify (final boolean on) |
| final boolean | setActive (final boolean v, final float zOffset) |
| abstract void | validateImpl (final GL2ES2 gl, final GLProfile glp) |
| abstract void | drawImpl0 (final GL2ES2 gl, final RegionRenderer renderer, final Vec4f rgba) |
Actual draw implementation, called by draw(GL2ES2, RegionRenderer). More... | |
| abstract void | drawToSelectImpl0 (final GL2ES2 gl, final RegionRenderer renderer) |
Actual draw implementation, called by drawToSelect(GL2ES2, RegionRenderer). More... | |
| abstract void | clearImpl0 (final GL2ES2 gl, final RegionRenderer renderer) |
Custom clear(GL2ES2, RegionRenderer) task, called 1st. More... | |
| abstract void | destroyImpl0 (final GL2ES2 gl, final RegionRenderer renderer) |
Custom destroy(GL2ES2, RegionRenderer) task, called 1st. More... | |
Protected Attributes | |
| final AABBox | box = new AABBox() |
| final Vec4f | rgbaColor = new Vec4f(0.60f, 0.60f, 0.60f, 1.0f) |
| Default base-color w/o color channel, will be modulated w/ pressed- and toggle color. More... | |
| final Vec4f | pressedRGBAModulate = new Vec4f(0.70f, 0.70f, 0.70f, 0.8f) |
| Default pressed color-factor (darker and slightly transparent), modulates base-color. More... | |
| final Vec4f | toggleOnRGBAModulate = new Vec4f(0.83f, 0.83f, 0.83f, 1.0f) |
| Default toggle color-factor (darker), modulates base-color. More... | |
| final Vec4f | toggleOffRGBAModulate = new Vec4f(1.00f, 1.00f, 1.00f, 1.0f) |
| Default toggle color-factor (original), modulates base-color. More... | |
| final Vec4f | activeRGBAModulate = new Vec4f(0.25f, 0.25f, 0.25f, 1.0f) |
| Default active color-factor (dark), modulates base-color. More... | |
| boolean | activeRGBAModulateOn = false |
Static Protected Attributes | |
| static final boolean | DEBUG_DRAW = false |
Generic Shape, potentially using a Graph via GraphShape or other means of representing content.
A shape includes the following build-in user-interactions
setDraggable(boolean)setResizable(boolean). A shape is expected to have its 0/0 origin in its bottom-left corner, otherwise the drag-zoom sticky-edge will not work as expected.
A shape's getBounds() includes its optional getPadding() and optional getBorderThickness().
GraphUI is GPU based and resolution independent.
GraphUI is intended to become an immediate- and retained-mode API.
Default colors (toggle-off is full color):
Definition at line 87 of file Shape.java.
|
protected |
Create a generic UI Shape.
Definition at line 320 of file Shape.java.
Add user callback to be notified when shape is activated (pointer-over and/or click) or de-activated (pointer left).
Use isActive() to retrieve the state.
Definition at line 511 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.addKeyListener | ( | final KeyListener | l | ) |
| final Shape com.jogamp.graph.ui.Shape.addMouseListener | ( | final MouseGestureListener | l | ) |
| final void com.jogamp.graph.ui.Shape.applyMatToMv | ( | final PMVMatrix4f | pmv | ) |
Applies the internal Matrix4f to the given modelview matrix, i.e.
pmv.mulMv( getMat() ).
Calls updateMat() if dirty.
In case isMatIdentity() is true, implementation is a no-operation.
| pmv | the matrix |
Definition at line 908 of file Shape.java.
| final void com.jogamp.graph.ui.Shape.clear | ( | final GL2ES2 | gl, |
| final RegionRenderer | renderer | ||
| ) |
Clears all data and reset all states as if this instance was newly created.
| gl | current GL2ES2 instance used to release GPU resources |
| renderer | RegionRenderer used to release GPU resources |
Definition at line 425 of file Shape.java.
|
abstractprotected |
Custom clear(GL2ES2, RegionRenderer) task, called 1st.
Reimplemented in com.jogamp.graph.ui.GraphShape, com.jogamp.graph.ui.Group, and com.jogamp.graph.ui.widgets.RangeSlider.
| final void com.jogamp.graph.ui.Shape.destroy | ( | final GL2ES2 | gl, |
| final RegionRenderer | renderer | ||
| ) |
Destroys all data.
| gl | current GL2ES2 instance used to release GPU resources |
| renderer | RegionRenderer used to release GPU resources |
Definition at line 457 of file Shape.java.
|
abstractprotected |
Custom destroy(GL2ES2, RegionRenderer) task, called 1st.
Reimplemented in com.jogamp.graph.ui.GraphShape, com.jogamp.graph.ui.Group, and com.jogamp.graph.ui.widgets.RangeSlider.
|
protected |
Dispatch activation event event to this shape.
Definition at line 535 of file Shape.java.
| void com.jogamp.graph.ui.Shape.draw | ( | final GL2ES2 | gl, |
| final RegionRenderer | renderer | ||
| ) |
Renders the shape.
applyMatToMv(PMVMatrix4f) is expected to be completed beforehand.
| gl | the current GL object |
| renderer | RegionRenderer which might be used for Graph Curve Rendering, also source of RegionRenderer#getMatrix() and RegionRenderer#getViewport(). |
Reimplemented in com.jogamp.graph.ui.AnimGroup, com.jogamp.graph.ui.shapes.Button, com.jogamp.graph.ui.shapes.GLButton, and com.jogamp.graph.ui.shapes.ImageButton.
Definition at line 798 of file Shape.java.
|
abstractprotected |
Actual draw implementation, called by draw(GL2ES2, RegionRenderer).
| gl | |
| renderer | |
| rgba |
Reimplemented in com.jogamp.graph.ui.GraphShape, com.jogamp.graph.ui.Group, com.jogamp.graph.ui.shapes.MediaButton, and com.jogamp.graph.ui.widgets.RangedGroup.
| void com.jogamp.graph.ui.Shape.drawToSelect | ( | final GL2ES2 | gl, |
| final RegionRenderer | renderer | ||
| ) |
Experimental selection draw command used by Scene.
Definition at line 783 of file Shape.java.
|
abstractprotected |
Actual draw implementation, called by drawToSelect(GL2ES2, RegionRenderer).
| gl | |
| renderer |
Reimplemented in com.jogamp.graph.ui.GraphShape, and com.jogamp.graph.ui.Group.
| final Vec4f com.jogamp.graph.ui.Shape.getActiveColorMod | ( | ) |
Returns modulation color when isActive().
Definition at line 1374 of file Shape.java.
| final float com.jogamp.graph.ui.Shape.getAdjustedZ | ( | ) |
Definition at line 1641 of file Shape.java.
| final Vec4f com.jogamp.graph.ui.Shape.getBorderColor | ( | ) |
| final float com.jogamp.graph.ui.Shape.getBorderThickness | ( | ) |
Returns the border thickness, see setBorder(float, Padding).
Definition at line 411 of file Shape.java.
| final AABBox com.jogamp.graph.ui.Shape.getBounds | ( | ) |
Returns the unscaled bounding AABBox for this shape, borrowing internal instance.
The returned AABBox will cover the unscaled shape as well as its optional getPadding() and optional getBorderThickness().
The returned AABBox is only valid after an initial call to draw(..) or validate(GL2ES2).
Definition at line 732 of file Shape.java.
Returns the unscaled bounding AABBox for this shape.
This variant differs from getBounds() as it returns a valid AABBox even before draw(..) and having an OpenGL instance available.
Definition at line 777 of file Shape.java.
| final Vec4f com.jogamp.graph.ui.Shape.getColor | ( | ) |
Returns base-color w/o color channel, will be modulated w/ getPressedColorMod(), getToggleOnColorMod(), getToggleOffColorMod() and getActiveColorMod().
Definition at line 1366 of file Shape.java.
|
protected |
Definition at line 709 of file Shape.java.
| final int com.jogamp.graph.ui.Shape.getID | ( | ) |
Return the optional symbolic ID for this shape.
Definition at line 336 of file Shape.java.
| final Matrix4f com.jogamp.graph.ui.Shape.getMat | ( | ) |
Returns the internal Matrix4f reference.
Calls updateMat() if dirty.
Definition at line 926 of file Shape.java.
Returns a copy of the internal Matrix4f to out.
Calls updateMat() if dirty.
Definition at line 937 of file Shape.java.
| final String com.jogamp.graph.ui.Shape.getName | ( | ) |
Return the optional symbolic name for this shape, defaults to noname.
Definition at line 341 of file Shape.java.
| Padding com.jogamp.graph.ui.Shape.getPadding | ( | ) |
Returns unscaled Padding of this shape, which is included in unscaled getBounds() and also includes the border.
Default is zero.
Definition at line 387 of file Shape.java.
| Group com.jogamp.graph.ui.Shape.getParent | ( | ) |
Returns the last parent container Group this shape has been added to or null.
Since a shape can be added to multiple container (DAG), usability of this information depends on usage.
Definition at line 331 of file Shape.java.
| final float[] com.jogamp.graph.ui.Shape.getPixelPerShapeUnit | ( | final int[] | shapeSizePx, |
| final float[] | pixPerShape | ||
| ) |
Retrieve pixel per scaled shape-coordinate unit, i.e.
[px]/[obj].
| shapeSizePx | int[2] shape size in pixel as retrieved via e.g. getSurfaceSize(com.jogamp.graph.ui.Scene.PMVMatrixSetup, Recti, PMVMatrix4f, int[]) |
| pixPerShape | float[2] pixel scaled per shape-coordinate unit result storage |
pixPerShape Definition at line 1165 of file Shape.java.
| final float[] com.jogamp.graph.ui.Shape.getPixelPerShapeUnit | ( | final PMVMatrix4f | pmv, |
| final Recti | viewport, | ||
| final float[] | pixPerShape | ||
| ) |
Retrieve pixel per scaled shape-coordinate unit, i.e.
[px]/[obj].
The given PMVMatrix4f has to be setup properly for this object, i.e. its GLMatrixFunc#GL_PROJECTION and GLMatrixFunc#GL_MODELVIEW for the surrounding scene including this shape's applyMatToMv(PMVMatrix4f). See setPMVMatrix(Scene, PMVMatrix4f).
| pmv | well formed PMVMatrix4f, e.g. could have been setup via Shape#setPMVMatrix(Scene, PMVMatrix4f). |
| viewport | the int[4] viewport |
| pixPerShape | float[2] pixel per scaled shape-coordinate unit result storage |
pixPerShape for successful gluProject(..) operation, otherwise null Definition at line 1187 of file Shape.java.
| final float[] com.jogamp.graph.ui.Shape.getPixelPerShapeUnit | ( | final Scene | scene, |
| final PMVMatrix4f | pmv, | ||
| final float[] | pixPerShape | ||
| ) |
Retrieve pixel per scaled shape-coordinate unit, i.e.
[px]/[obj].
The given PMVMatrix4f will be setup properly for this shape including this shape's applyMatToMv(PMVMatrix4f).
| scene | Scene to retrieve Scene.PMVMatrixSetup and the viewport. |
| pmv | a new PMVMatrix4f which will be setup, shape-transformed and can be reused by the caller. |
| pixPerShape | float[2] pixel per scaled shape-coordinate unit result storage |
pixPerShape for successful gluProject(..) operation, otherwise null Definition at line 1212 of file Shape.java.
| final Vec3f com.jogamp.graph.ui.Shape.getPosition | ( | ) |
Returns position Vec3f reference, i.e.
scaled translation as set via or #move(float, float, float)}.
Definition at line 587 of file Shape.java.
| final Vec4f com.jogamp.graph.ui.Shape.getPressedColorMod | ( | ) |
Returns modulation color when isPressed().
Definition at line 1368 of file Shape.java.
| final Quaternion com.jogamp.graph.ui.Shape.getRotation | ( | ) |
Returns Quaternion for rotation.
Definition at line 595 of file Shape.java.
| final Vec3f com.jogamp.graph.ui.Shape.getRotationPivot | ( | ) |
Return unscaled rotation origin Vec3f reference, aka pivot.
Null if not set via setRotationPivot(float, float, float).
Definition at line 614 of file Shape.java.
| final Vec3f com.jogamp.graph.ui.Shape.getScale | ( | ) |
Returns scale Vec3f reference.
Definition at line 682 of file Shape.java.
| final float com.jogamp.graph.ui.Shape.getScaledDepth | ( | ) |
| final float com.jogamp.graph.ui.Shape.getScaledHeight | ( | ) |
Returns the scaled height of the bounding AABBox for this shape.
The returned height will cover the scaled shape as well as its optional scaled getPadding() and optional scaled getBorderThickness().
The returned height is only valid after an initial call to draw(..) or validate(GL2ES2).
Definition at line 760 of file Shape.java.
| final float com.jogamp.graph.ui.Shape.getScaledWidth | ( | ) |
Returns the scaled width of the bounding AABBox for this shape.
The returned width will cover the scaled shape as well as its optional scaled getPadding() and optional scaled getBorderThickness().
The returned width is only valid after an initial call to draw(..) or validate(GL2ES2).
Definition at line 745 of file Shape.java.
| String com.jogamp.graph.ui.Shape.getSubString | ( | ) |
Reimplemented in com.jogamp.opengl.demos.graph.ui.testshapes.Glyph01UbuntuLight_o, com.jogamp.opengl.demos.graph.ui.testshapes.Glyph02UbuntuLight_ae, com.jogamp.opengl.demos.graph.ui.testshapes.Glyph03FreeMonoRegular_M, com.jogamp.opengl.demos.graph.ui.testshapes.Glyph04FreeSans_0, com.jogamp.opengl.demos.graph.ui.testshapes.Glyph05FreeSerifBoldItalic_ae, com.jogamp.graph.ui.GraphShape, com.jogamp.graph.ui.Group, com.jogamp.graph.ui.shapes.BaseButton, com.jogamp.graph.ui.shapes.Button, com.jogamp.graph.ui.shapes.CrossHair, com.jogamp.graph.ui.shapes.GlyphShape, com.jogamp.graph.ui.shapes.Label, com.jogamp.graph.ui.shapes.Rectangle, and com.jogamp.graph.ui.widgets.RangeSlider.
Definition at line 1517 of file Shape.java.
| final Recti com.jogamp.graph.ui.Shape.getSurfacePort | ( | final PMVMatrix4f | pmv, |
| final Recti | viewport, | ||
| final Recti | surfacePort | ||
| ) |
Retrieve surface (view) port of this shape, i.e.
lower x/y position and size.
The given PMVMatrix4f has to be setup properly for this object, i.e. its GLMatrixFunc#GL_PROJECTION and GLMatrixFunc#GL_MODELVIEW for the surrounding scene including this shape's applyMatToMv(PMVMatrix4f). See setPMVMatrix(Scene, PMVMatrix4f).
| pmv | well formed PMVMatrix4f, e.g. could have been setup via Shape#setPMVMatrix(Scene, PMVMatrix4f). |
| viewport | the int[4] viewport |
| surfacePort | Recti target surface port |
surfacePort for successful gluProject(..) operation, otherwise null Definition at line 1067 of file Shape.java.
| final int[] com.jogamp.graph.ui.Shape.getSurfaceSize | ( | final PMVMatrix4f | pmv, |
| final Recti | viewport, | ||
| final int[] | surfaceSize | ||
| ) |
Retrieve surface (view) size in pixels of this shape.
The given PMVMatrix4f has to be setup properly for this object, i.e. its GLMatrixFunc#GL_PROJECTION and GLMatrixFunc#GL_MODELVIEW for the surrounding scene including this shape's applyMatToMv(PMVMatrix4f). See setPMVMatrix(Scene, PMVMatrix4f).
| pmv | well formed PMVMatrix4f, e.g. could have been setup via Shape#setPMVMatrix(Scene, PMVMatrix4f). |
| viewport | the int[4] viewport |
| surfaceSize | int[2] target surface size |
surfaceSize in pixels for successful gluProject(..) operation, otherwise null Definition at line 1100 of file Shape.java.
| final int[] com.jogamp.graph.ui.Shape.getSurfaceSize | ( | final Scene | scene, |
| final PMVMatrix4f | pmv, | ||
| final int[] | surfaceSize | ||
| ) |
Retrieve surface (view) size in pixels of this shape.
The given PMVMatrix4f will be setup properly for this shape including this shape's applyMatToMv(PMVMatrix4f).
| scene | Scene to retrieve Scene.PMVMatrixSetup and the viewport. |
| pmv | a new PMVMatrix4f which will be setup, shape-transformed and can be reused by the caller. |
| surfaceSize | int[2] target surface size |
surfaceSize in pixels for successful gluProject(..) operation, otherwise null Definition at line 1151 of file Shape.java.
| final int[] com.jogamp.graph.ui.Shape.getSurfaceSize | ( | final Scene.PMVMatrixSetup | pmvMatrixSetup, |
| final Recti | viewport, | ||
| final PMVMatrix4f | pmv, | ||
| final int[] | surfaceSize | ||
| ) |
Retrieve surface (view) size in pixels of this shape.
The given PMVMatrix4f will be setup properly for this shape including this shape's applyMatToMv(PMVMatrix4f).
| pmvMatrixSetup | Scene.PMVMatrixSetup to setup given PMVMatrix4f pmv. |
| viewport | used viewport for gluProject(..) |
| pmv | a new PMVMatrix4f which will be setup, shape-transformed and can be reused by the caller. |
| surfaceSize | int[2] target surface size |
surfaceSize in pixels for successful gluProject(..) operation, otherwise null Definition at line 1133 of file Shape.java.
| final Vec4f com.jogamp.graph.ui.Shape.getToggleOffColorMod | ( | ) |
Returns modulation color when not isToggleOn().
Definition at line 1372 of file Shape.java.
| final Vec4f com.jogamp.graph.ui.Shape.getToggleOnColorMod | ( | ) |
Returns modulation color when isToggleOn().
Definition at line 1370 of file Shape.java.
| Tooltip com.jogamp.graph.ui.Shape.getTooltip | ( | ) |
Definition at line 1695 of file Shape.java.
| final boolean com.jogamp.graph.ui.Shape.hasBorder | ( | ) |
Returns true if a border has been enabled via setBorder(float, Padding).
Definition at line 408 of file Shape.java.
|
abstract |
Returns true if implementation uses an extra color channel or texture which will be modulated with the passed rgba color drawImpl0(GL2ES2, RegionRenderer, float[]).
Otherwise the base color will be modulated and passed to drawImpl0(GL2ES2, RegionRenderer, float[]).
Reimplemented in com.jogamp.graph.ui.GraphShape, and com.jogamp.graph.ui.Group.
| boolean com.jogamp.graph.ui.Shape.hasPadding | ( | ) |
Returns true if setPaddding(Padding) added a non Padding#zeroSize() spacing to this shape.
Definition at line 390 of file Shape.java.
| final boolean com.jogamp.graph.ui.Shape.isActivable | ( | ) |
Returns if this shape is allowed to be activated, i.e become isActive().
Definition at line 1729 of file Shape.java.
| final boolean com.jogamp.graph.ui.Shape.isActive | ( | ) |
Returns true of this shape is active.
Definition at line 1633 of file Shape.java.
| final boolean com.jogamp.graph.ui.Shape.isDiscarded | ( | ) |
Returns whether this shape is discarded in last draw(GL2ES2, RegionRenderer), i.e.
culled via frustum or occlusion criteria.
Definition at line 1738 of file Shape.java.
| final boolean com.jogamp.graph.ui.Shape.isDraggable | ( | ) |
Returns if this shape is draggable, a user interaction.
Definition at line 1756 of file Shape.java.
| final boolean com.jogamp.graph.ui.Shape.isFixedARatioResize | ( | ) |
Returns if aspect-ratio shall be kept at resize, if isResizable().
Definition at line 1781 of file Shape.java.
| boolean com.jogamp.graph.ui.Shape.isGroup | ( | ) |
Returns true if this shape denotes a Group, otherwise false.
Reimplemented in com.jogamp.graph.ui.Group.
Definition at line 344 of file Shape.java.
| final boolean com.jogamp.graph.ui.Shape.isInteractive | ( | ) |
Returns if this shape allows user interaction in general, see setInteractive(boolean).
Definition at line 1717 of file Shape.java.
| final boolean com.jogamp.graph.ui.Shape.isMatIdentity | ( | ) |
Returns true if getMat() has not been mutated, i.e.
contains identity.
Definition at line 943 of file Shape.java.
| final boolean com.jogamp.graph.ui.Shape.isPressed | ( | ) |
| final boolean com.jogamp.graph.ui.Shape.isResizable | ( | ) |
Returns if this shape is resizable, a user interaction.
Definition at line 1775 of file Shape.java.
|
protected |
Returns the shape's dirty state, see markShapeDirty().
Reimplemented in com.jogamp.graph.ui.Group.
Definition at line 701 of file Shape.java.
|
protected |
Returns the rendering dirty state, see markStateDirty().
Definition at line 705 of file Shape.java.
| boolean com.jogamp.graph.ui.Shape.isToggleable | ( | ) |
Returns true if this shape is toggable, i.e.
rendered w/ setToggleOnColorMod(float, float, float, float) or setToggleOffColorMod(float, float, float, float).
Definition at line 1580 of file Shape.java.
| final boolean com.jogamp.graph.ui.Shape.isToggleOn | ( | ) |
Returns true this shape's toggle state.
Definition at line 1610 of file Shape.java.
| final boolean com.jogamp.graph.ui.Shape.isVisible | ( | ) |
Returns true if this shape is set visible by the user, otherwise false.
Defaults to true.
Note that invisible shapes are not considered for picking/activation.
Definition at line 353 of file Shape.java.
| final void com.jogamp.graph.ui.Shape.markShapeDirty | ( | ) |
Marks the shape dirty, causing next draw() to recreate the Graph shape and reset the region.
Definition at line 688 of file Shape.java.
| final void com.jogamp.graph.ui.Shape.markStateDirty | ( | ) |
Marks the rendering state dirty, causing next draw() to notify the Graph region to reselect shader and repaint potentially used FBOs.
Definition at line 696 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.move | ( | final float | dtx, |
| final float | dty, | ||
| final float | dtz | ||
| ) |
Move about scaled distance.
Position ends up in PMVMatrix4f unmodified. No MoveListener notification will occur.
Definition at line 557 of file Shape.java.
Move about scaled distance.
Position ends up in PMVMatrix4f unmodified. No MoveListener notification will occur.
Definition at line 564 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.moveTo | ( | final float | tx, |
| final float | ty, | ||
| final float | tz | ||
| ) |
Move to scaled position.
Position ends up in PMVMatrix4f unmodified. No MoveListener notification will occur.
Definition at line 543 of file Shape.java.
Move to scaled position.
Position ends up in PMVMatrix4f unmodified. No MoveListener notification will occur.
Definition at line 550 of file Shape.java.
| final void com.jogamp.graph.ui.Shape.onClicked | ( | final PointerListener | l | ) |
Set user callback to be notified when shape is clicked.
Usually shape is toggle()'ed when clicked, see onToggle(Listener). However, in case shape is not isToggleable() this is the last resort.
Definition at line 503 of file Shape.java.
| final void com.jogamp.graph.ui.Shape.onDraw | ( | final DrawListener | l | ) |
Set a user one-shot initializer callback or custom draw(GL2ES2, RegionRenderer) hook.
run(Shape, GL2ES2, RegionRenderer) is called at Shape#draw(GL2ES2, RegionRenderer) and if returning true, the listener will be removed. Otherwise kept calling.
This instrument allows the user either to be signaled when initialization of this Shape is completed, or just too hook-up custom draw(GL2ES2, RegionRenderer) actions.
| l | callback, which shall return true to be removed, i.e. user initialization is done. |
Definition at line 477 of file Shape.java.
| final void com.jogamp.graph.ui.Shape.onHover | ( | final PointerListener | l | ) |
Set user callback to be notified when a pointer/mouse is moving over this shape.
Definition at line 481 of file Shape.java.
| final void com.jogamp.graph.ui.Shape.onMove | ( | final MoveListener | l | ) |
Set user callback to be notified when shape is move(Vec3f)'ed.
Definition at line 485 of file Shape.java.
| final void com.jogamp.graph.ui.Shape.onToggle | ( | final Listener | l | ) |
Set user callback to be notified when shape toggle()'ed.
This is usually the case when clicked, see onClicked(PointerListener).
Use isToggleOn() to retrieve the state.
Definition at line 495 of file Shape.java.
| void com.jogamp.graph.ui.Shape.receiveKeyEvents | ( | final Shape | source | ) |
Forward KeyListener events to this Shape from source using a ForwardKeyListener.
This source Shape must be setInteractive(boolean) to receive and forward the events.
This receiver Shape must be setInteractive(boolean) to have the events forwarded.
Reimplemented in com.jogamp.graph.ui.widgets.RangeSlider.
Definition at line 1871 of file Shape.java.
| void com.jogamp.graph.ui.Shape.receiveMouseEvents | ( | final Shape | source | ) |
Forward MouseGestureListener events to this Shape from source using a ForwardMouseListener.
This source Shape must be setInteractive(boolean) to receive and forward the events.
This receiver Shape must be setInteractive(boolean) to have the events forwarded.
Reimplemented in com.jogamp.graph.ui.widgets.RangeSlider.
Definition at line 1837 of file Shape.java.
Definition at line 521 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.removeKeyListener | ( | final KeyListener | l | ) |
Definition at line 1851 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.removeMouseListener | ( | final MouseGestureListener | l | ) |
Definition at line 1817 of file Shape.java.
| void com.jogamp.graph.ui.Shape.removeToolTip | ( | ) |
Definition at line 1663 of file Shape.java.
| final void com.jogamp.graph.ui.Shape.runSynced | ( | final Runnable | action | ) |
Perform given Runnable action synchronized.
Definition at line 414 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.scale | ( | final float | sx, |
| final float | sy, | ||
| final float | sz | ||
| ) |
Multiply current scale factor by given scale.
Definition at line 671 of file Shape.java.
Multiply current scale factor by given scale.
Definition at line 661 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.setActivable | ( | final boolean | v | ) |
Set whether this shape is allowed to be activated, i.e become isActive().
A non activable shape still allows a shape to be dragged or resized, it just can't gain the main focus.
Definition at line 1726 of file Shape.java.
|
protected |
Definition at line 1612 of file Shape.java.
Enable active color, modulation getColor() if isActive() with passing c != null, disable with passing c == null.
Default active color-factor w/o color channel, modulated base-color. 0.60 * 0.25 ~= 0.15
Default is disabled.
Definition at line 1466 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.setBorder | ( | final float | thickness | ) |
Sets the thickness of the border, which is included in getBounds() and is outside of getPadding().
Default is zero for no border.
Method issues markShapeDirty().
| thickness | border thickness, zero for no border |
Definition at line 402 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.setBorderColor | ( | final float | r, |
| final float | g, | ||
| final float | b, | ||
| final float | a | ||
| ) |
Set border color.
Default RGBA value is 0.00f, 0.00f, 0.00f, 1.0f
Method issues markShapeDirty().
Definition at line 1489 of file Shape.java.
Set border color.
Default RGBA value is 0.00f, 0.00f, 0.00f, 1.0f
Method issues markShapeDirty().
Definition at line 1506 of file Shape.java.
| Shape com.jogamp.graph.ui.Shape.setColor | ( | final float | r, |
| final float | g, | ||
| final float | b, | ||
| final float | a | ||
| ) |
Set base color.
Base color w/o color channel, will be modulated w/ pressed- and toggle color
Default RGBA value is 0.60f, 0.60f, 0.60f, 1.0f
Method issues markShapeDirty().
Reimplemented in com.jogamp.graph.ui.widgets.RangeSlider.
Definition at line 1389 of file Shape.java.
Set base color.
Default base-color w/o color channel, will be modulated w/ pressed- and toggle color
Default RGBA value is 0.60f, 0.60f, 0.60f, 1.0f
Method issues markShapeDirty().
Reimplemented in com.jogamp.graph.ui.widgets.RangeSlider.
Definition at line 1408 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.setDiscarded | ( | final boolean | v | ) |
Set whether this shape is discarded in last draw(GL2ES2, RegionRenderer), i.e.
culled via frustum or occlusion criteria.
Definition at line 1735 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.setDragAndResizable | ( | final boolean | v | ) |
Set whether this shape is draggable and resizable.
Default draggable and resizable is true.
Definition at line 1801 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.setDraggable | ( | final boolean | draggable | ) |
Set whether this shape is draggable, i.e.
translated by 1-pointer-click and drag.
Default draggable is true.
Definition at line 1751 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.setFixedARatioResize | ( | final boolean | v | ) |
Sets whether aspect-ratio shall be kept at resize, if isResizable().
Definition at line 1788 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.setID | ( | final int | id | ) |
Set a symbolic ID for this shape for identification.
Default is -1 for noname.
Definition at line 334 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.setInteractive | ( | final boolean | v | ) |
Set whether this shape is interactive in general, i.e.
any user interaction like
isToggleable()isDraggable()isResizable() but excluding programmatic changes. | v | new value for isInteractive() |
Definition at line 1711 of file Shape.java.
| Shape com.jogamp.graph.ui.Shape.setName | ( | final String | name | ) |
Set a symbolic name for this shape for identification.
Default is noname.
Definition at line 339 of file Shape.java.
Sets the unscaled padding for this shape, which is included in unscaled getBounds() and also includes the border.
Default is zero.
Method issues markShapeDirty().
| padding | distance of shape to the border, i.e. padding |
Definition at line 376 of file Shape.java.
|
protected |
| final PMVMatrix4f com.jogamp.graph.ui.Shape.setPMVMatrix | ( | final Scene | scene, |
| final PMVMatrix4f | pmv | ||
| ) |
Setup the given PMVMatrix4f and apply this shape's transformation.
| scene | Scene to retrieve Scene.PMVMatrixSetup and the viewport. |
| pmv | a new PMVMatrix4f which will be setup, shape-transformed and can be reused by the caller. |
PMVMatrix4f for chaining Definition at line 1051 of file Shape.java.
| final PMVMatrix4f com.jogamp.graph.ui.Shape.setPMVMatrix | ( | final Scene.PMVMatrixSetup | pmvMatrixSetup, |
| final Recti | viewport, | ||
| final PMVMatrix4f | pmv | ||
| ) |
Setup the given PMVMatrix4f and apply this shape's transformation.
| pmvMatrixSetup | Scene.PMVMatrixSetup to setup given PMVMatrix4f pmv. |
| viewport | used viewport for PMVMatrix4f#mapObjToWin(Vec3f, Recti, Vec3f) |
| pmv | a new PMVMatrix4f which will be setup, shape-transformed and can be reused by the caller. |
PMVMatrix4f for chaining Definition at line 1033 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.setPressed | ( | final boolean | b | ) |
| Shape com.jogamp.graph.ui.Shape.setPressedColorMod | ( | final float | r, |
| final float | g, | ||
| final float | b, | ||
| final float | a | ||
| ) |
Set pressed color, modulating getColor() if isPressed().
Default pressed color, modulation -factor w/o color channel, modulated base-color. ~0.65 (due to alpha)
Default RGBA value is 0.70f, 0.70f, 0.70f, 0.8f
Reimplemented in com.jogamp.graph.ui.widgets.RangeSlider.
Definition at line 1423 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.setResizable | ( | final boolean | resizable | ) |
Set whether this shape is resizable, i.e.
zoomed by 1-pointer-click and drag in 1/4th bottom-left and bottom-right corner.
Default resizable is true.
Definition at line 1769 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.setRotation | ( | final Quaternion | q | ) |
Sets the rotation Quaternion.
Definition at line 604 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.setRotationPivot | ( | final float | px, |
| final float | py, | ||
| final float | pz | ||
| ) |
Set unscaled rotation origin, aka pivot.
Usually the getBounds() center and should be set while validateImpl(GL2ES2, GLProfile).
Definition at line 620 of file Shape.java.
Set unscaled rotation origin, aka pivot.
Usually the getBounds() center and should be set while validateImpl(GL2ES2, GLProfile).
| pivot | rotation origin |
Definition at line 630 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.setScale | ( | final float | sx, |
| final float | sy, | ||
| final float | sz | ||
| ) |
Set scale factor to given scale.
Definition at line 651 of file Shape.java.
Set scale factor to given scale.
Definition at line 641 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.setToggle | ( | final boolean | v | ) |
Set this shape's toggle state, default is off.
| v |
Definition at line 1587 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.setToggleable | ( | final boolean | toggleable | ) |
Set this shape toggleable, default is off.
| toggleable |
Definition at line 1573 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.setToggleOffColorMod | ( | final float | r, |
| final float | g, | ||
| final float | b, | ||
| final float | a | ||
| ) |
Set toggle-off color, modulating getColor() if !isToggleOn() and setToggleable(boolean).
Default toggle-off color-factor w/o color channel, modulated base-color. 0.60 * 1.00 ~= 0.60
Default RGBA value is 1.00f, 1.00f, 1.00f, 1.0f
Definition at line 1451 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.setToggleOnColorMod | ( | final float | r, |
| final float | g, | ||
| final float | b, | ||
| final float | a | ||
| ) |
Set toggle-on color, modulating getColor() if isToggleOn() and setToggleable(boolean).
Default toggle-on color-factor w/o color channel, modulated base-color. 0.60 * 0.83 ~= 0.50
Default RGBA value is 0.83f, 0.83f, 0.83f, 1.0f
Definition at line 1437 of file Shape.java.
Set's a new Tooltip for this shape.
The Shape must be set interactive to receive the mouse-over signal, i.e. being picked.
Definition at line 1653 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.setVisible | ( | final boolean | v | ) |
Enable (default) or disable this shape's visibility.
Note that invisible shapes are not considered for picking/activation.
This visibility flag is toggled by the user only.
Definition at line 363 of file Shape.java.
| final int[] com.jogamp.graph.ui.Shape.shapeToWinCoord | ( | final PMVMatrix4f | pmv, |
| final Recti | viewport, | ||
| final Vec3f | objPos, | ||
| final int[] | glWinPos | ||
| ) |
Map given object coordinate relative to this shape to window coordinates.
The given PMVMatrix4f has to be setup properly for this object, i.e. its GLMatrixFunc#GL_PROJECTION and GLMatrixFunc#GL_MODELVIEW for the surrounding scene including this shape's applyMatToMv(PMVMatrix4f). See setPMVMatrix(Scene, PMVMatrix4f).
| pmv | well formed PMVMatrix4f, e.g. could have been setup via Shape#setPMVMatrix(Scene, PMVMatrix4f). |
| viewport | the viewport |
| objPos | object position relative to this shape's center |
| glWinPos | int[2] target window position of objPos relative to this shape |
glWinPos for successful gluProject(..) operation, otherwise null Definition at line 1236 of file Shape.java.
| final int[] com.jogamp.graph.ui.Shape.shapeToWinCoord | ( | final Scene | scene, |
| final Vec3f | objPos, | ||
| final PMVMatrix4f | pmv, | ||
| final int[] | glWinPos | ||
| ) |
Map given object coordinate relative to this shape to window coordinates.
The given PMVMatrix4f will be setup properly for this shape including this shape's applyMatToMv(PMVMatrix4f).
| scene | Scene to retrieve Scene.PMVMatrixSetup and the viewport. |
| objPos | object position relative to this shape's center |
| pmv | a new PMVMatrix4f which will be setup, shape-transformed and can be reused by the caller. |
| glWinPos | int[2] target window position of objPos relative to this shape |
glWinPos for successful gluProject(..) operation, otherwise null Definition at line 1283 of file Shape.java.
| final int[] com.jogamp.graph.ui.Shape.shapeToWinCoord | ( | final Scene.PMVMatrixSetup | pmvMatrixSetup, |
| final Recti | viewport, | ||
| final Vec3f | objPos, | ||
| final PMVMatrix4f | pmv, | ||
| final int[] | glWinPos | ||
| ) |
Map given object coordinate relative to this shape to window coordinates.
The given PMVMatrix4f will be setup properly for this shape including this shape's applyMatToMv(PMVMatrix4f).
| pmvMatrixSetup | Scene.PMVMatrixSetup to setup given PMVMatrix4f pmv. |
| viewport | used viewport for PMVMatrix4f#mapObjToWin(Vec3f, Recti, Vec3f) |
| objPos | object position relative to this shape's center |
| pmv | a new PMVMatrix4f which will be setup, shape-transformed and can be reused by the caller. |
| glWinPos | int[2] target window position of objPos relative to this shape |
glWinPos for successful gluProject(..) operation, otherwise null Definition at line 1264 of file Shape.java.
| final Shape com.jogamp.graph.ui.Shape.toggle | ( | ) |
|
protected |
Reimplemented in com.jogamp.graph.ui.shapes.Button.
Definition at line 1607 of file Shape.java.
| final String com.jogamp.graph.ui.Shape.toString | ( | ) |
| final void com.jogamp.graph.ui.Shape.updateMat | ( | ) |
Updates the internal Matrix4f with local position, rotation and scale.
setRotationPivot(float[])), otherwise rotate around its scaled center (default) Shape's origin should be bottom-left @ 0/0 to have build-in drag-zoom work properly.
Sets isMatIdentity() to true if neither position, scale or rotate is performed, otherwise to false.
Called by applyMatToMv(PMVMatrix4f), getMat() and getMat(Matrix4f) if internal matrix is dirty.
After any mutating operations, .e.g move(float, float, float) etc, the internal matrix is marked dirty.
Definition at line 971 of file Shape.java.
Validates the shape's underlying GLRegion.
If the region is dirty, it gets cleared and is reused.
| gl | current GL2ES2 object |
Definition at line 850 of file Shape.java.
Validate the shape via validate(GL2ES2) if gl is not null, otherwise uses validate(GLProfile).
Definition at line 886 of file Shape.java.
Validates the shape's underlying GLRegion w/o a current GL2ES2 object.
If the region is dirty a new region is created and the old one gets pushed to a dirty-list to get disposed when a GL context is available.
Definition at line 869 of file Shape.java.
|
abstractprotected |
Reimplemented in com.jogamp.graph.ui.GraphShape, com.jogamp.graph.ui.Group, com.jogamp.graph.ui.shapes.HUDShape, com.jogamp.graph.ui.widgets.RangedGroup, and com.jogamp.graph.ui.widgets.RangeSlider.
| final Vec3f com.jogamp.graph.ui.Shape.winToShapeCoord | ( | final PMVMatrix4f | pmv, |
| final Recti | viewport, | ||
| final int | glWinX, | ||
| final int | glWinY, | ||
| final Vec3f | objPos | ||
| ) |
Map given gl-window-coordinates to object coordinates relative to this shape and its z-coordinate.
The given PMVMatrix4f has to be setup properly for this object, i.e. its GLMatrixFunc#GL_PROJECTION and GLMatrixFunc#GL_MODELVIEW for the surrounding scene including this shape's applyMatToMv(PMVMatrix4f). See setPMVMatrix(Scene, PMVMatrix4f).
| pmv | well formed PMVMatrix4f, e.g. could have been setup via Shape#setPMVMatrix(Scene, PMVMatrix4f). |
| viewport | the Rect4i viewport |
| glWinX | in GL window coordinates, origin bottom-left |
| glWinY | in GL window coordinates, origin bottom-left |
| objPos | target object position of glWinX/glWinY relative to this shape |
objPos for successful gluProject(..) and gluUnProject(..) operation, otherwise null Definition at line 1305 of file Shape.java.
| final Vec3f com.jogamp.graph.ui.Shape.winToShapeCoord | ( | final Scene | scene, |
| final int | glWinX, | ||
| final int | glWinY, | ||
| final PMVMatrix4f | pmv, | ||
| final Vec3f | objPos | ||
| ) |
Map given gl-window-coordinates to object coordinates relative to this shape and its z-coordinate.
The given PMVMatrix4f will be setup properly for this shape including this shape's applyMatToMv(PMVMatrix4f).
| scene | Scene to retrieve Scene.PMVMatrixSetup and the viewport. |
| glWinX | in GL window coordinates, origin bottom-left |
| glWinY | in GL window coordinates, origin bottom-left |
| pmv | a new PMVMatrix4f which will be setup, shape-transformed and can be reused by the caller. |
| objPos | target object position of glWinX/glWinY relative to this shape |
objPos for successful gluProject(..) and gluUnProject(..) operation, otherwise null Definition at line 1358 of file Shape.java.
| final Vec3f com.jogamp.graph.ui.Shape.winToShapeCoord | ( | final Scene.PMVMatrixSetup | pmvMatrixSetup, |
| final Recti | viewport, | ||
| final int | glWinX, | ||
| final int | glWinY, | ||
| final PMVMatrix4f | pmv, | ||
| final Vec3f | objPos | ||
| ) |
Map given gl-window-coordinates to object coordinates relative to this shape and its z-coordinate.
The given PMVMatrix4f will be setup properly for this shape including this shape's applyMatToMv(PMVMatrix4f).
| pmvMatrixSetup | Scene.PMVMatrixSetup to setup given PMVMatrix4f pmv. |
| viewport | used viewport for PMVMatrix4f#mapWinToObj(float, float, float, Recti, Vec3f) |
| glWinX | in GL window coordinates, origin bottom-left |
| glWinY | in GL window coordinates, origin bottom-left |
| pmv | a new PMVMatrix4f which will be setup, shape-transformed and can be reused by the caller. |
| objPos | target object position of glWinX/glWinY relative to this shape |
objPos for successful gluProject(..) and gluUnProject(..) operation, otherwise null Definition at line 1336 of file Shape.java.
|
protected |
Default active color-factor (dark), modulates base-color.
0.60 * 0.25 ~= 0.15
Definition at line 269 of file Shape.java.
|
protected |
Definition at line 270 of file Shape.java.
Definition at line 245 of file Shape.java.
|
staticprotected |
Definition at line 238 of file Shape.java.
|
protected |
Default pressed color-factor (darker and slightly transparent), modulates base-color.
~0.65 (due to alpha)
Definition at line 263 of file Shape.java.
Default base-color w/o color channel, will be modulated w/ pressed- and toggle color.
Definition at line 261 of file Shape.java.
|
protected |
Default toggle color-factor (original), modulates base-color.
0.60 * 1.00 ~= 0.60
Definition at line 267 of file Shape.java.
|
protected |
Default toggle color-factor (darker), modulates base-color.
0.60 * 0.83 ~= 0.50
Definition at line 265 of file Shape.java.
|
static |
Definition at line 2287 of file Shape.java.
|
static |
Definition at line 2293 of file Shape.java.