Package com.jogamp.graph.ui.shapes
Class HUDShape
- java.lang.Object
-
- com.jogamp.graph.ui.Shape
-
- com.jogamp.graph.ui.Group
-
- com.jogamp.graph.ui.shapes.HUDShape
-
- All Implemented Interfaces:
Container
public class HUDShape extends Group
A Head Up Display (HUD)Shapefor a clientShapeusing `inner size and Mv position` to be displayed on top in aScene.Purpose of this class is to provide a convenient tool to create a HUD within
Sceneusing a Mv-coordinates and size of a target shape within the tree w/o manually transforming them toScene.Further, the client shape is wrapped in a layout group, not mutating it and hence allowing it for DAG usage.
This instance determines initial size and position in
Shape.validate(GL2ES2), having a valid target shape.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.jogamp.graph.ui.Group
Group.Layout
-
Nested classes/interfaces inherited from class com.jogamp.graph.ui.Shape
Shape.DrawListener, Shape.EventInfo, Shape.ForwardKeyListener, Shape.ForwardMouseListener, Shape.Listener, Shape.MouseGestureAdapter, Shape.MouseGestureListener, Shape.MoveListener, Shape.PointerListener, Shape.Visitor1, Shape.Visitor2
-
-
Field Summary
-
Fields inherited from class com.jogamp.graph.ui.Shape
ZAscendingComparator, ZDescendingComparator
-
-
Constructor Summary
Constructors Constructor Description HUDShape(Scene scene, float clientWidth, float clientHeight, int renderModes, Shape targetShape, Shape clientShape)Ctor ofHUDShape.HUDShape(Scene scene, float clientWidth, float clientHeight, com.jogamp.math.Vec4f backColor, com.jogamp.math.Vec4f borderColor, float borderThickness, Padding padding, int renderModes, Shape targetShape, Shape clientShape)Ctor ofHUDShape.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.jogamp.math.Vec3fgetClientPos()ShapegetClientShape()Returns the clientShapeto be presented in the HUD tipcom.jogamp.math.Vec2fgetClientSize()ShapegetTargetShape()Returns the targetShapethis HUD is put on top, used to resolve the Mv matrix for HUD size and positionHUDShapemoveHUDPos(com.jogamp.math.Vec3f clientDelta)Move about scaled HUD position with givenclientDeltaintargetShapeobject Mv-space coordinates.HUDShapemoveToHUDPos(com.jogamp.math.Vec3f clientPos)Move to scaled HUD position with givenclientPosintargetShapeobject Mv-space coordinates.ShaperemoveClient()Removed the user provided clientShapefrom this HUD.HUDShapesetClientSize(float clientWidth, float clientHeight)-
Methods inherited from class com.jogamp.graph.ui.Group
addShape, addShapes, contains, disableTopLevelWidget, enableTopLevelWidget, getBounds, getClipMvFrustum, getClipOnBounds, getFixedSize, getFixedSize, getLayout, getRelayoutOnDirtyShapes, getRenderedShapes, getShapeByID, getShapeByIdx, getShapeByName, getShapeCount, getShapes, getSubString, hasColorChannel, isCullingEnabled, isGroup, isOutside, isOutside2, isPMvCullingEnabled, isTopLevelWidget, removeAllShapes, removeShape, removeShape, removeShapes, removeShapes, replaceShape, setClipMvFrustum, setClipOnBounds, setFixedSize, setFixedSize, setLayout, setPMvCullingEnabled, setRelayoutOnDirtyShapes
-
Methods inherited from class com.jogamp.graph.ui.Shape
addActivationListener, addKeyListener, addMouseListener, applyMatToMv, clear, destroy, draw, drawToSelect, getActiveColorMod, getAdjustedZ, getBorderColor, getBorderThickness, getBounds, getBounds, getColor, getID, getMat, getMat, getName, getPadding, getParent, getPixelPerShapeUnit, getPixelPerShapeUnit, getPixelPerShapeUnit, getPosition, getPressedColorMod, getRotation, getRotationPivot, getScale, getScaledDepth, getScaledHeight, getScaledWidth, getSurfacePort, getSurfaceSize, getSurfaceSize, getSurfaceSize, getToggleOffColorMod, getToggleOnColorMod, getTooltip, hasBorder, hasPadding, isActivable, isActive, isDiscarded, isDraggable, isFixedARatioResize, isInteractive, isMatIdentity, isPressed, isResizable, isToggleable, isToggleOn, isVisible, markShapeDirty, markStateDirty, move, move, moveTo, moveTo, onClicked, onDraw, onHover, onMove, onToggle, receiveKeyEvents, receiveMouseEvents, removeActivationListener, removeKeyListener, removeMouseListener, removeToolTip, runSynced, scale, scale, setActivable, setActiveColorMod, setBorder, setBorderColor, setBorderColor, setColor, setColor, setDiscarded, setDragAndResizable, setDraggable, setFixedARatioResize, setID, setInteractive, setName, setPaddding, setPMVMatrix, setPMVMatrix, setPressed, setPressedColorMod, setResizable, setRotation, setRotationPivot, setRotationPivot, setScale, setScale, setToggle, setToggleable, setToggleOffColorMod, setToggleOnColorMod, setToolTip, setVisible, shapeToWinCoord, shapeToWinCoord, shapeToWinCoord, toggle, toString, updateMat, validate, validate, validate, winToShapeCoord, winToShapeCoord, winToShapeCoord
-
-
-
-
Constructor Detail
-
HUDShape
public HUDShape(Scene scene, float clientWidth, float clientHeight, int renderModes, Shape targetShape, Shape clientShape)
Ctor ofHUDShape.Adjust HUD position using
targetShapeobject Mv-space coordinates viamoveToHUDPos(Vec3f)andmoveHUDPos(Vec3f).- Parameters:
scene- theScenetop-level containerclientWidth- width of this HUD in giventargetShapeobject Mv-space, notscene.clientHeight- height of this HUD in giventargetShapeobject Mv-space, notscene.renderModes- Graph'sRegionrender modes, seecreate(..).targetShape- targetShapethis HUD is put on top, used to resolve the Mv matrix for HUD size and positionclientShape- clientShapeto be presented in the HUD tip
-
HUDShape
public HUDShape(Scene scene, float clientWidth, float clientHeight, com.jogamp.math.Vec4f backColor, com.jogamp.math.Vec4f borderColor, float borderThickness, Padding padding, int renderModes, Shape targetShape, Shape clientShape)
Ctor ofHUDShape.Adjust HUD position using
targetShapeobject Mv-space coordinates viamoveToHUDPos(Vec3f)andmoveHUDPos(Vec3f).- Parameters:
scene- theScenetop-level containerclientWidth- width of this HUD in giventargetShapeobject Mv-space, notscene.clientHeight- height of this HUD in giventargetShapeobject Mv-space, notscene.backColor- optional background color, will add a frame to this HUD if notnullborderColor- optional border color, only used withbackColorborderThickness- border thickness, only used withbackColorpadding- optional padding for the givenclientShapefor the internal wrapper grouprenderModes- Graph'sRegionrender modes, seecreate(..).targetShape- targetShapethis HUD is put on top, used to resolve the Mv matrix for HUD size and positionclientShape- clientShapeto be presented in the HUD tip
-
-
Method Detail
-
moveToHUDPos
public HUDShape moveToHUDPos(com.jogamp.math.Vec3f clientPos)
Move to scaled HUD position with givenclientPosintargetShapeobject Mv-space coordinates. SeeShape.moveTo(Vec3f).- See Also:
moveHUDPos(Vec3f)
-
moveHUDPos
public HUDShape moveHUDPos(com.jogamp.math.Vec3f clientDelta)
Move about scaled HUD position with givenclientDeltaintargetShapeobject Mv-space coordinates. SeeShape.move(Vec3f).- See Also:
moveToHUDPos(Vec3f)
-
setClientSize
public HUDShape setClientSize(float clientWidth, float clientHeight)
-
getClientSize
public com.jogamp.math.Vec2f getClientSize()
-
getClientPos
public com.jogamp.math.Vec3f getClientPos()
-
getClientShape
public Shape getClientShape()
Returns the clientShapeto be presented in the HUD tip
-
getTargetShape
public Shape getTargetShape()
Returns the targetShapethis HUD is put on top, used to resolve the Mv matrix for HUD size and position
-
-