JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.graph.ui.Group Class Reference

Group of Shapes, optionally utilizing a Group.Layout. More...

Inheritance diagram for com.jogamp.graph.ui.Group:
Collaboration diagram for com.jogamp.graph.ui.Group:

Classes

interface  Layout
 Layout for the GraphUI Group, called @ Shape#validate(GL2ES2) or Shape#validate(GLProfile). More...
 

Public Member Functions

 Group ()
 Create a group of Shapes w/o Group.Layout. More...
 
 Group (final Layout l)
 Create a group of Shapes w/ given Group.Layout. More...
 
 Group (final String name, final Layout l, final Vec2f fixedSize, final Shape s)
 Create a group of Shapes w/ given Group.Layout and Shape. More...
 
final boolean isGroup ()
 Returns true if this shape denotes a Group, otherwise false. More...
 
Layout getLayout ()
 Return current Group.Layout. More...
 
Group setLayout (final Layout l)
 Set Group.Layout. More...
 
Group setFixedSize (final Vec3f v)
 Enforce size of this group for all given 3 dimensions getBounds() without adjusting 3D z-axis like setFixedSize(Vec2f). More...
 
Group setFixedSize (final Vec2f v)
 Enforce size of this group to given 2 dimensions, adjusting the 3D z-axis getBounds() giving room for potential clipping via setClipOnBounds(boolean) or setClipMvFrustum(Frustum). More...
 
Vec3f getFixedSize ()
 Returns borrowed fixed size instance, see setFixedSize(Vec3f) and setFixedSize(Vec2f). More...
 
Vec2f getFixedSize (final Vec2f out)
 Returns given Vec2f instance set with 2 dimensions, see setFixedSize(Vec2f). More...
 
Group setClipOnBounds (final boolean v)
 Enable Modelview (Mv) Frustum clipping on getBounds() for this group and its shapes as follows. More...
 
boolean getClipOnBounds ()
 Returns setClipOnBounds(boolean) value. More...
 
Group setClipMvFrustum (final Frustum v)
 Enable Modelview (Mv) Frustum clipping on explicit given pre-multiplied w/ Mv-matrix clip-box for this group and its shapes as follows. More...
 
Frustum getClipMvFrustum ()
 Returns setClipMvFrustum(Frustum) value. More...
 
int getShapeCount ()
 Returns number of Shapes, see getShapes(). More...
 
List< ShapegetShapes ()
 Returns added Shapes. More...
 
List< ShapegetRenderedShapes ()
 Returns added shapes which are rendered and sorted by z-axis in ascending order toward z-near. More...
 
void addShape (final Shape s)
 Adds a Shape. More...
 
boolean replaceShape (final Shape remove, final Shape replacement)
 Atomic replacement of the given Shape remove with Shape replacement. More...
 
Shape removeShape (final Shape s)
 Removes given shape, w/o Shape#destroy(GL2ES2, RegionRenderer). More...
 
void removeShapes (final Collection<? extends Shape > shapes)
 Removes all given shapes, w/o Shape#destroy(GL2ES2, RegionRenderer). More...
 
boolean removeShape (final GL2ES2 gl, final RegionRenderer renderer, final Shape s)
 Removes given shape with Shape#destroy(GL2ES2, RegionRenderer), if contained. More...
 
void addShapes (final Collection<? extends Shape > shapes)
 
void removeShapes (final GL2ES2 gl, final RegionRenderer renderer, final Collection<? extends Shape > shapes)
 Removes all given shapes with Shape#destroy(GL2ES2, RegionRenderer). More...
 
void removeAllShapes (final GL2ES2 gl, final RegionRenderer renderer)
 Removes all contained shapes with Shape#destroy(GL2ES2, RegionRenderer). More...
 
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...
 
final void setPMvCullingEnabled (final boolean v)
 Enable or disable Project-Modelview (PMv) frustum culling per Shape for this container. More...
 
final boolean isPMvCullingEnabled ()
 Return whether Project-Modelview (PMv) frustum culling is enabled for this container. More...
 
final boolean isCullingEnabled ()
 Return whether Project-Modelview (PMv) frustum culling or Group's Modelview (Mv) frustum clipping is enabled for this container. More...
 
final boolean isOutside (final PMVMatrix4f pmv, final Shape shape)
 Returns whether the given Shape is completely outside of this container. More...
 
boolean isOutside2 (final Matrix4f mvCont, final Shape shape, final PMVMatrix4f pmvShape)
 Returns whether the given Shape is completely outside of this container. More...
 
void setRelayoutOnDirtyShapes (final boolean v)
 Set relayout on dirty shapes mode, defaults to true. More...
 
boolean getRelayoutOnDirtyShapes ()
 
final Group enableTopLevelWidget (final Scene scene)
 Enables top-level widget behavior for this group, default is disabled. More...
 
final Group disableTopLevelWidget ()
 Disables top-level widget behavior as potentially set via enableTopLevelWidget(Scene). More...
 
final boolean isTopLevelWidget ()
 Returns whether setTopLevelWidget(boolean) is enabled or disabled. More...
 
boolean contains (final Shape s)
 
Shape getShapeByIdx (final int id)
 
Shape getShapeByID (final int id)
 
Shape getShapeByName (final String name)
 
AABBox getBounds (final PMVMatrix4f pmv, final Shape shape)
 Returns AABBox dimension of given Shape from this container's perspective, i.e. More...
 
String getSubString ()
 
- Public Member Functions inherited from com.jogamp.graph.ui.Shape
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...
 
int getShapeCount ()
 Returns number of Shapes, see getShapes(). More...
 
List< ShapegetShapes ()
 Returns added Shapes. More...
 
List< ShapegetRenderedShapes ()
 Returns added shapes which are rendered and sorted by z-axis in ascending order toward z-near. More...
 
void addShape (Shape s)
 Adds a Shape. More...
 
Shape removeShape (final Shape s)
 Removes given shape, w/o Shape#destroy(GL2ES2, RegionRenderer). More...
 
void removeShapes (Collection<? extends Shape > shapes)
 Removes all given shapes, w/o Shape#destroy(GL2ES2, RegionRenderer). More...
 
boolean removeShape (final GL2ES2 gl, final RegionRenderer renderer, final Shape s)
 Removes given shape with Shape#destroy(GL2ES2, RegionRenderer), if contained. More...
 
void addShapes (Collection<? extends Shape > shapes)
 
void removeShapes (final GL2ES2 gl, final RegionRenderer renderer, final Collection<? extends Shape > shapes)
 Removes all given shapes with Shape#destroy(GL2ES2, RegionRenderer). More...
 
void removeAllShapes (final GL2ES2 gl, final RegionRenderer renderer)
 Removes all contained shapes with Shape#destroy(GL2ES2, RegionRenderer). More...
 
boolean contains (Shape s)
 
Shape getShapeByIdx (final int id)
 
Shape getShapeByID (final int id)
 
Shape getShapeByName (final String name)
 
AABBox getBounds (final PMVMatrix4f pmv, Shape shape)
 Returns AABBox dimension of given Shape from this container's perspective, i.e. More...
 
void setPMvCullingEnabled (final boolean v)
 Enable or disable Project-Modelview (PMv) frustum culling per Shape for this container. More...
 
boolean isPMvCullingEnabled ()
 Return whether Project-Modelview (PMv) frustum culling is enabled for this container. More...
 
boolean isCullingEnabled ()
 Return whether Project-Modelview (PMv) frustum culling or Group's Modelview (Mv) frustum clipping is enabled for this container. More...
 
boolean isOutside (final PMVMatrix4f pmv, final Shape shape)
 Returns whether the given Shape is completely outside of this container. More...
 
boolean isOutside2 (final Matrix4f mvCont, final Shape shape, final PMVMatrix4f pmvShape)
 Returns whether the given Shape is completely outside of this container. More...
 

Protected Member Functions

void clearImpl0 (final GL2ES2 gl, final RegionRenderer renderer)
 Custom clear(GL2ES2, RegionRenderer) task, called 1st. More...
 
void destroyImpl0 (final GL2ES2 gl, final RegionRenderer renderer)
 Custom destroy(GL2ES2, RegionRenderer) task, called 1st. More...
 
void drawImpl0 (final GL2ES2 gl, final RegionRenderer renderer, final Vec4f rgba)
 Actual draw implementation, called by draw(GL2ES2, RegionRenderer). More...
 
final void drawToSelectImpl0 (final GL2ES2 gl, final RegionRenderer renderer)
 Actual draw implementation, called by drawToSelect(GL2ES2, RegionRenderer). More...
 
boolean isShapeDirty ()
 Returns the shape's dirty state, see markShapeDirty(). More...
 
void validateImpl (final GL2ES2 gl, final GLProfile glp)
 
- Protected Member Functions inherited from com.jogamp.graph.ui.Shape
 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...
 

Additional Inherited Members

- Static Public Attributes inherited from com.jogamp.graph.ui.Shape
static Comparator< ShapeZAscendingComparator
 
static Comparator< ShapeZDescendingComparator
 
- Protected Attributes inherited from com.jogamp.graph.ui.Shape
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 inherited from com.jogamp.graph.ui.Shape
static final boolean DEBUG_DRAW = false
 

Detailed Description

Group of Shapes, optionally utilizing a Group.Layout.

See also
Scene
Shape
Group.Layout

Definition at line 61 of file Group.java.

Constructor & Destructor Documentation

◆ Group() [1/3]

com.jogamp.graph.ui.Group.Group ( )

Create a group of Shapes w/o Group.Layout.

Default is non-interactive.

Definition at line 106 of file Group.java.

Here is the caller graph for this function:

◆ Group() [2/3]

com.jogamp.graph.ui.Group.Group ( final Layout  l)

Create a group of Shapes w/ given Group.Layout.

Default is non-interactive.

Parameters
loptional Layout, maybe null

Definition at line 117 of file Group.java.

◆ Group() [3/3]

com.jogamp.graph.ui.Group.Group ( final String  name,
final Layout  l,
final Vec2f  fixedSize,
final Shape  s 
)

Create a group of Shapes w/ given Group.Layout and Shape.

Default is non-interactive.

Parameters
nameoptional name for setName(String)
loptional Layout, maybe null
fixedSizeoptional fixed size for setFixedSize(Vec2f)
soptional Shape for addShape(Shape)

Definition at line 131 of file Group.java.

Here is the call graph for this function:

Member Function Documentation

◆ addShape()

void com.jogamp.graph.ui.Group.addShape ( final Shape  s)

Adds a Shape.

Implements com.jogamp.graph.ui.Container.

Definition at line 225 of file Group.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addShapes()

void com.jogamp.graph.ui.Group.addShapes ( final Collection<? extends Shape shapes)

Implements com.jogamp.graph.ui.Container.

Definition at line 283 of file Group.java.

Here is the call graph for this function:

◆ clearImpl0()

void com.jogamp.graph.ui.Group.clearImpl0 ( final GL2ES2  gl,
final RegionRenderer  renderer 
)
protected

Custom clear(GL2ES2, RegionRenderer) task, called 1st.

Reimplemented from com.jogamp.graph.ui.Shape.

Reimplemented in com.jogamp.graph.ui.widgets.RangeSlider.

Definition at line 309 of file Group.java.

Here is the call graph for this function:

◆ contains()

boolean com.jogamp.graph.ui.Group.contains ( final Shape  s)

Implements com.jogamp.graph.ui.Container.

Definition at line 666 of file Group.java.

◆ destroyImpl0()

void com.jogamp.graph.ui.Group.destroyImpl0 ( final GL2ES2  gl,
final RegionRenderer  renderer 
)
protected

Custom destroy(GL2ES2, RegionRenderer) task, called 1st.

Reimplemented from com.jogamp.graph.ui.Shape.

Reimplemented in com.jogamp.graph.ui.widgets.RangeSlider.

Definition at line 324 of file Group.java.

Here is the call graph for this function:

◆ disableTopLevelWidget()

final Group com.jogamp.graph.ui.Group.disableTopLevelWidget ( )

Disables top-level widget behavior as potentially set via enableTopLevelWidget(Scene).

NOP if not enabled.

Definition at line 541 of file Group.java.

Here is the caller graph for this function:

◆ drawImpl0()

void com.jogamp.graph.ui.Group.drawImpl0 ( final GL2ES2  gl,
final RegionRenderer  renderer,
final Vec4f  rgba 
)
protected

Actual draw implementation, called by draw(GL2ES2, RegionRenderer).

Parameters
gl
renderer
rgba

Reimplemented from com.jogamp.graph.ui.Shape.

Reimplemented in com.jogamp.graph.ui.widgets.RangedGroup.

Definition at line 403 of file Group.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawToSelectImpl0()

final void com.jogamp.graph.ui.Group.drawToSelectImpl0 ( final GL2ES2  gl,
final RegionRenderer  renderer 
)
protected

Actual draw implementation, called by drawToSelect(GL2ES2, RegionRenderer).

Parameters
gl
renderer

Reimplemented from com.jogamp.graph.ui.Shape.

Definition at line 483 of file Group.java.

Here is the call graph for this function:

◆ enableTopLevelWidget()

final Group com.jogamp.graph.ui.Group.enableTopLevelWidget ( final Scene  scene)

Enables top-level widget behavior for this group, default is disabled.

Enabled top-level widget behavior for a group causes

  • the whole group to be shown on top on (mouse over) activation of one of its elements
  • this group's addActivationListener(Listener) to handle all it's elements activation events
  • isActive() of this group to return true if one of its elements is active

Disable this behavior via disableTopLevelWidget(), otherwise done at clear(GL2ES2, RegionRenderer) or destroy(GL2ES2, RegionRenderer).

Parameters
scenethe top-level widget holder where this Group gets registered
Returns
this group for chaining
See also
disableTopLevelWidget()

Definition at line 535 of file Group.java.

◆ getBounds()

AABBox com.jogamp.graph.ui.Group.getBounds ( final PMVMatrix4f  pmv,
final Shape  shape 
)

Returns AABBox dimension of given Shape from this container's perspective, i.e.

world-bounds if performing from the Scene.

Implements com.jogamp.graph.ui.Container.

Definition at line 686 of file Group.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getClipMvFrustum()

Frustum com.jogamp.graph.ui.Group.getClipMvFrustum ( )

Returns setClipMvFrustum(Frustum) value.

Definition at line 213 of file Group.java.

◆ getClipOnBounds()

boolean com.jogamp.graph.ui.Group.getClipOnBounds ( )

Returns setClipOnBounds(boolean) value.

Definition at line 189 of file Group.java.

◆ getFixedSize() [1/2]

Vec3f com.jogamp.graph.ui.Group.getFixedSize ( )

Returns borrowed fixed size instance, see setFixedSize(Vec3f) and setFixedSize(Vec2f).

Definition at line 164 of file Group.java.

Here is the caller graph for this function:

◆ getFixedSize() [2/2]

Vec2f com.jogamp.graph.ui.Group.getFixedSize ( final Vec2f  out)

Returns given Vec2f instance set with 2 dimensions, see setFixedSize(Vec2f).

Definition at line 166 of file Group.java.

Here is the call graph for this function:

◆ getLayout()

Layout com.jogamp.graph.ui.Group.getLayout ( )

Return current Group.Layout.

Definition at line 150 of file Group.java.

Here is the caller graph for this function:

◆ getRelayoutOnDirtyShapes()

boolean com.jogamp.graph.ui.Group.getRelayoutOnDirtyShapes ( )

Definition at line 515 of file Group.java.

◆ getRenderedShapes()

List< Shape > com.jogamp.graph.ui.Group.getRenderedShapes ( )

Returns added shapes which are rendered and sorted by z-axis in ascending order toward z-near.

The rendered shapes are visible and not deemed outside of this container due to culling.

Only rendered shapes are considered for picking/activation.

The returned list is data-race free, i.e. won't be mutated by the rendering thread as it gets completely replace at each rendering loop using a local volatile reference.
Only when disposing the container, the list gets cleared, hence {@Link List::size()} shall be used in the loop.

See also
addShape(Shape)
isCullingEnabled()
Shape::isVisible()
isOutside(PMVMatrix4f, Shape)

Implements com.jogamp.graph.ui.Container.

Definition at line 222 of file Group.java.

◆ getShapeByID()

Shape com.jogamp.graph.ui.Group.getShapeByID ( final int  id)

Implements com.jogamp.graph.ui.Container.

Definition at line 677 of file Group.java.

◆ getShapeByIdx()

Shape com.jogamp.graph.ui.Group.getShapeByIdx ( final int  id)

Implements com.jogamp.graph.ui.Container.

Definition at line 670 of file Group.java.

Here is the caller graph for this function:

◆ getShapeByName()

Shape com.jogamp.graph.ui.Group.getShapeByName ( final String  name)

Implements com.jogamp.graph.ui.Container.

Definition at line 681 of file Group.java.

◆ getShapeCount()

int com.jogamp.graph.ui.Group.getShapeCount ( )

Returns number of Shapes, see getShapes().

Implements com.jogamp.graph.ui.Container.

Definition at line 216 of file Group.java.

Here is the caller graph for this function:

◆ getShapes()

List< Shape > com.jogamp.graph.ui.Group.getShapes ( )

Returns added Shapes.

Implements com.jogamp.graph.ui.Container.

Definition at line 219 of file Group.java.

Here is the caller graph for this function:

◆ getSubString()

String com.jogamp.graph.ui.Group.getSubString ( )

Reimplemented from com.jogamp.graph.ui.Shape.

Reimplemented in com.jogamp.graph.ui.widgets.RangeSlider.

Definition at line 700 of file Group.java.

◆ hasColorChannel()

boolean com.jogamp.graph.ui.Group.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[]).

Otherwise the base color will be modulated and passed to drawImpl0(GL2ES2, RegionRenderer, float[]).

Reimplemented from com.jogamp.graph.ui.Shape.

Definition at line 304 of file Group.java.

◆ isCullingEnabled()

final boolean com.jogamp.graph.ui.Group.isCullingEnabled ( )

Return whether Project-Modelview (PMv) frustum culling or Group's Modelview (Mv) frustum clipping is enabled for this container.

Default is disabled.

Implements com.jogamp.graph.ui.Container.

Definition at line 352 of file Group.java.

◆ isGroup()

final boolean com.jogamp.graph.ui.Group.isGroup ( )

Returns true if this shape denotes a Group, otherwise false.

Reimplemented from com.jogamp.graph.ui.Shape.

Definition at line 147 of file Group.java.

◆ isOutside()

final boolean com.jogamp.graph.ui.Group.isOutside ( final PMVMatrix4f  pmv,
final Shape  shape 
)

Returns whether the given Shape is completely outside of this container.

Note: If method returns false, the box may only be partially inside, i.e. intersects with this container

Parameters
pmvcurrent PMVMatrix4f of this container
shapethe Shape to test
See also
isOutside2(Matrix4f, Shape, PMVMatrix4f)
Shape::isOutside()

Implements com.jogamp.graph.ui.Container.

Definition at line 355 of file Group.java.

Here is the call graph for this function:

◆ isOutside2()

boolean com.jogamp.graph.ui.Group.isOutside2 ( final Matrix4f  mvCont,
final Shape  shape,
final PMVMatrix4f  pmvShape 
)

Returns whether the given Shape is completely outside of this container.

Note: If method returns false, the box may only be partially inside, i.e. intersects with this container

Parameters
mvContcopy of the model-view of this container shape the Shape to test
pmvShapecurrent PMVMatrix4f of the shape to test
See also
isOutside(PMVMatrix4f, Shape)
Shape::isOutside()

Implements com.jogamp.graph.ui.Container.

Definition at line 382 of file Group.java.

Here is the call graph for this function:

◆ isPMvCullingEnabled()

final boolean com.jogamp.graph.ui.Group.isPMvCullingEnabled ( )

Return whether Project-Modelview (PMv) frustum culling is enabled for this container.

Implements com.jogamp.graph.ui.Container.

Definition at line 349 of file Group.java.

◆ isShapeDirty()

boolean com.jogamp.graph.ui.Group.isShapeDirty ( )
protected

Returns the shape's dirty state, see markShapeDirty().

If re-layouting on dirty shape mode is enabled (default), see setRelayoutOnDirtyShapes(boolean), this method traverses through all shapes updating all dirty states of all its groups provoking a re-layout if required.

Reimplemented from com.jogamp.graph.ui.Shape.

Definition at line 561 of file Group.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isTopLevelWidget()

final boolean com.jogamp.graph.ui.Group.isTopLevelWidget ( )

Returns whether setTopLevelWidget(boolean) is enabled or disabled.

Definition at line 550 of file Group.java.

◆ removeAllShapes()

void com.jogamp.graph.ui.Group.removeAllShapes ( final GL2ES2  gl,
final RegionRenderer  renderer 
)

Removes all contained shapes with Shape#destroy(GL2ES2, RegionRenderer).

Implements com.jogamp.graph.ui.Container.

Definition at line 296 of file Group.java.

Here is the call graph for this function:

◆ removeShape() [1/2]

boolean com.jogamp.graph.ui.Group.removeShape ( final GL2ES2  gl,
final RegionRenderer  renderer,
final Shape  s 
)

Removes given shape with Shape#destroy(GL2ES2, RegionRenderer), if contained.

Parameters
glGL2ES2 context
renderer
sthe shape to be removed
Returns
true if given Shape is removed and destroyed

Implements com.jogamp.graph.ui.Container.

Definition at line 271 of file Group.java.

Here is the call graph for this function:

◆ removeShape() [2/2]

Shape com.jogamp.graph.ui.Group.removeShape ( final Shape  s)

Removes given shape, w/o Shape#destroy(GL2ES2, RegionRenderer).

Returns
the removed shape or null if not contained

Implements com.jogamp.graph.ui.Container.

Definition at line 253 of file Group.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeShapes() [1/2]

void com.jogamp.graph.ui.Group.removeShapes ( final Collection<? extends Shape shapes)

Removes all given shapes, w/o Shape#destroy(GL2ES2, RegionRenderer).

Implements com.jogamp.graph.ui.Container.

Definition at line 264 of file Group.java.

Here is the call graph for this function:

◆ removeShapes() [2/2]

void com.jogamp.graph.ui.Group.removeShapes ( final GL2ES2  gl,
final RegionRenderer  renderer,
final Collection<? extends Shape shapes 
)

Removes all given shapes with Shape#destroy(GL2ES2, RegionRenderer).

Implements com.jogamp.graph.ui.Container.

Definition at line 289 of file Group.java.

Here is the call graph for this function:

◆ replaceShape()

boolean com.jogamp.graph.ui.Group.replaceShape ( final Shape  remove,
final Shape  replacement 
)

Atomic replacement of the given Shape remove with Shape replacement.

Parameters
removethe shape to be replaced
replacementthe replacement shape to be inserted at same position
Returns
true if shape remove is contained and replaced by replacement, otherwise false.

Definition at line 237 of file Group.java.

Here is the call graph for this function:

◆ setClipMvFrustum()

Group com.jogamp.graph.ui.Group.setClipMvFrustum ( final Frustum  v)

Enable Modelview (Mv) Frustum clipping on explicit given pre-multiplied w/ Mv-matrix clip-box for this group and its shapes as follows.

  • Discard Shape rendering if not intersecting clip-box.
  • Otherwise perform pixel-accurate clipping inside the shader to clip-box.

setClipMvFrustum(Frustum) takes precedence over setClipOnBounds(boolean).

With clipping enabled, the 3D z-axis getBounds() depth will be slightly increased for functional Frustum operation.

Parameters
vFrustum pre-multiplied w/ Mv-matrix
Returns
this instance for chaining
See also
setClipOnBounds(boolean)
setFixedSize(Vec2f)
setFixedSize(Vec3f)

Definition at line 211 of file Group.java.

Here is the caller graph for this function:

◆ setClipOnBounds()

Group com.jogamp.graph.ui.Group.setClipOnBounds ( final boolean  v)

Enable Modelview (Mv) Frustum clipping on getBounds() for this group and its shapes as follows.

  • Discard Shape rendering if not intersecting clip-box.
  • Otherwise perform pixel-accurate clipping inside the shader to clip-box.

setClipMvFrustum(Frustum) takes precedence over setClipOnBounds(boolean).

With clipping enabled, the 3D z-axis getBounds() depth will be slightly increased for functional Frustum operation.

Parameters
vboolean to toggle clipping
Returns
this instance for chaining
See also
setClipMvFrustum(Frustum)
setFixedSize(Vec2f)
setFixedSize(Vec3f)

Definition at line 187 of file Group.java.

Here is the caller graph for this function:

◆ setFixedSize() [1/2]

Group com.jogamp.graph.ui.Group.setFixedSize ( final Vec2f  v)

Enforce size of this group to given 2 dimensions, adjusting the 3D z-axis getBounds() giving room for potential clipping via setClipOnBounds(boolean) or setClipMvFrustum(Frustum).

See also
setFixedSize(Vec3f)

Definition at line 162 of file Group.java.

Here is the call graph for this function:

◆ setFixedSize() [2/2]

Group com.jogamp.graph.ui.Group.setFixedSize ( final Vec3f  v)

Enforce size of this group for all given 3 dimensions getBounds() without adjusting 3D z-axis like setFixedSize(Vec2f).

Definition at line 156 of file Group.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLayout()

Group com.jogamp.graph.ui.Group.setLayout ( final Layout  l)

Set Group.Layout.

Definition at line 153 of file Group.java.

Here is the caller graph for this function:

◆ setPMvCullingEnabled()

final void com.jogamp.graph.ui.Group.setPMvCullingEnabled ( final boolean  v)

Enable or disable Project-Modelview (PMv) frustum culling per Shape for this container.

Default is disabled.

Implements com.jogamp.graph.ui.Container.

Definition at line 346 of file Group.java.

Here is the caller graph for this function:

◆ setRelayoutOnDirtyShapes()

void com.jogamp.graph.ui.Group.setRelayoutOnDirtyShapes ( final boolean  v)

Set relayout on dirty shapes mode, defaults to true.

If relayouting on dirty shape mode is enabler (default), isShapeDirty() traverses through all shapes updating all dirty states of all its groups provoking a relayout if required.

Definition at line 514 of file Group.java.

Here is the caller graph for this function:

◆ validateImpl()

void com.jogamp.graph.ui.Group.validateImpl ( final GL2ES2  gl,
final GLProfile  glp 
)
protected

Reimplemented from com.jogamp.graph.ui.Shape.

Reimplemented in com.jogamp.graph.ui.shapes.HUDShape, com.jogamp.graph.ui.widgets.RangedGroup, and com.jogamp.graph.ui.widgets.RangeSlider.

Definition at line 576 of file Group.java.

Here is the call graph for this function:

The documentation for this class was generated from the following file: