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

Container interface of UI Shapes. More...

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

Public Member Functions

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...
 

Detailed Description

Container interface of UI Shapes.

See also
Scene
Shape

Definition at line 44 of file Container.java.

Member Function Documentation

◆ addShape()

void com.jogamp.graph.ui.Container.addShape ( Shape  s)

◆ addShapes()

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

◆ contains()

boolean com.jogamp.graph.ui.Container.contains ( Shape  s)

◆ getBounds()

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

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

world-bounds if performing from the Scene.

Implemented in com.jogamp.graph.ui.Group, and com.jogamp.graph.ui.Scene.

◆ getRenderedShapes()

List< Shape > com.jogamp.graph.ui.Container.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)

Implemented in com.jogamp.graph.ui.Group, and com.jogamp.graph.ui.Scene.

◆ getShapeByID()

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

◆ getShapeByIdx()

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

◆ getShapeByName()

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

◆ getShapeCount()

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

Returns number of Shapes, see getShapes().

Implemented in com.jogamp.graph.ui.Group, and com.jogamp.graph.ui.Scene.

◆ getShapes()

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

◆ isCullingEnabled()

boolean com.jogamp.graph.ui.Container.isCullingEnabled ( )

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

Default is disabled.

Implemented in com.jogamp.graph.ui.Group, and com.jogamp.graph.ui.Scene.

◆ isOutside()

boolean com.jogamp.graph.ui.Container.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()

Implemented in com.jogamp.graph.ui.Group, and com.jogamp.graph.ui.Scene.

◆ isOutside2()

boolean com.jogamp.graph.ui.Container.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()

Implemented in com.jogamp.graph.ui.Group, and com.jogamp.graph.ui.Scene.

◆ isPMvCullingEnabled()

boolean com.jogamp.graph.ui.Container.isPMvCullingEnabled ( )

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

Implemented in com.jogamp.graph.ui.Group, and com.jogamp.graph.ui.Scene.

◆ removeAllShapes()

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

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

Implemented in com.jogamp.graph.ui.Group, and com.jogamp.graph.ui.Scene.

◆ removeShape() [1/2]

boolean com.jogamp.graph.ui.Container.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

Implemented in com.jogamp.graph.ui.Group, and com.jogamp.graph.ui.Scene.

◆ removeShape() [2/2]

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

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

Returns
the removed shape or null if not contained

Implemented in com.jogamp.graph.ui.Group, and com.jogamp.graph.ui.Scene.

◆ removeShapes() [1/2]

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

◆ removeShapes() [2/2]

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

◆ setPMvCullingEnabled()

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

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

Default is disabled.

Implemented in com.jogamp.graph.ui.Group, and com.jogamp.graph.ui.Scene.


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