Class Shape
- java.lang.Object
-
- com.jogamp.graph.ui.Shape
-
- Direct Known Subclasses:
GraphShape,Group
public abstract class Shape extends Object
Generic Shape, potentially using a Graph viaGraphShapeor other means of representing content.A shape includes the following build-in user-interactions - drag shape w/ 1-pointer click, see
setDraggable(boolean)- resize shape w/ 1-pointer click and drag in 1/4th bottom-left and bottom-right corner, seesetResizable(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 optionalgetPadding()and optionalgetBorderThickness().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): - non-toggle: 0.6 * color, static -> 0.6 - pressed: 0.8 * color, static -> 0.5 - toggle-off: 1.0 * color, static -> 0.6 - toggle-on: 0.8 * color
- See Also:
Scene
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceShape.DrawListenerShapedraw listener action returning a boolean valuestatic classShape.EventInfoShapeevent info for propagatedNEWTEvents containing reference ofthe intended shapeas well as therotated relative positionto this shape.static classShape.ForwardKeyListenerForwardKeyListener, to be attached to a key event source forwarded to the receiver set at constructor.static classShape.ForwardMouseListenerForwardShape.MouseGestureListener, to be attached to a mouse event source forwarded to the receiver set at constructor.static interfaceShape.ListenerGeneralShapelistener actionstatic classShape.MouseGestureAdapterConvenient adapter combining dummy implementation forMouseListenerandGestureHandler.GestureListenerstatic interfaceShape.MouseGestureListenerCombiningMouseListenerandGestureHandler.GestureListenerstatic interfaceShape.MoveListenerShapemove listenerstatic interfaceShape.PointerListenerShapepointer listener, e.g.static interfaceShape.Visitor1GeneralShapevisitorstatic interfaceShape.Visitor2GeneralShapevisitor
-
Field Summary
Fields Modifier and Type Field Description static Comparator<Shape>ZAscendingComparatorstatic Comparator<Shape>ZDescendingComparator
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ShapeaddActivationListener(Shape.Listener l)Add user callback to be notified when shape is activated (pointer-over and/or click) or de-activated (pointer left).ShapeaddKeyListener(KeyListener l)ShapeaddMouseListener(Shape.MouseGestureListener l)voidapplyMatToMv(com.jogamp.math.util.PMVMatrix4f pmv)Applies the internalMatrix4fto the givenmodelview matrix, i.e.voidclear(GL2ES2 gl, RegionRenderer renderer)Clears all data and reset all states as if this instance was newly createdvoiddestroy(GL2ES2 gl, RegionRenderer renderer)Destroys all datavoiddraw(GL2ES2 gl, RegionRenderer renderer)Renders the shape.voiddrawToSelect(GL2ES2 gl, RegionRenderer renderer)Experimental selection draw command used byScene.com.jogamp.math.Vec4fgetActiveColorMod()Returns modulation color whenisActive().floatgetAdjustedZ()com.jogamp.math.Vec4fgetBorderColor()floatgetBorderThickness()Returns the border thickness, see#setBorder(float, Padding).com.jogamp.math.geom.AABBoxgetBounds()Returns the unscaled boundingAABBoxfor this shape, borrowing internal instance.com.jogamp.math.geom.AABBoxgetBounds(GLProfile glp)Returns the unscaled boundingAABBoxfor this shape.com.jogamp.math.Vec4fgetColor()Returns base-color w/o color channel, will be modulated w/getPressedColorMod(),getToggleOnColorMod(),getToggleOffColorMod()andgetActiveColorMod().intgetID()Return the optional symbolic ID for this shape.com.jogamp.math.Matrix4fgetMat()Returns the internalMatrix4freference.com.jogamp.math.Matrix4fgetMat(com.jogamp.math.Matrix4f out)Returns a copy of the internalMatrix4ftoout.StringgetName()Return the optional symbolic name for this shape, defaults to `noname`.PaddinggetPadding()Returns unscaledPaddingof this shape, which is included in unscaledgetBounds()and also includes the border.GroupgetParent()Returns the last parent containerGroupthis shape has been added to ornull.float[]getPixelPerShapeUnit(int[] shapeSizePx, float[] pixPerShape)Retrieve pixel per scaled shape-coordinate unit, i.e.float[]getPixelPerShapeUnit(Scene scene, com.jogamp.math.util.PMVMatrix4f pmv, float[] pixPerShape)Retrieve pixel per scaled shape-coordinate unit, i.e.float[]getPixelPerShapeUnit(com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Recti viewport, float[] pixPerShape)Retrieve pixel per scaled shape-coordinate unit, i.e.com.jogamp.math.Vec3fgetPosition()Returns positionVec3freference, i.e.com.jogamp.math.Vec4fgetPressedColorMod()Returns modulation color whenisPressed().com.jogamp.math.QuaterniongetRotation()ReturnsQuaternionfor rotation.com.jogamp.math.Vec3fgetRotationPivot()Return unscaled rotation originVec3freference, aka pivot.com.jogamp.math.Vec3fgetScale()Returns scaleVec3freference.floatgetScaledDepth()floatgetScaledHeight()Returns the scaled height of the boundingAABBoxfor this shape.floatgetScaledWidth()Returns the scaled width of the boundingAABBoxfor this shape.StringgetSubString()com.jogamp.math.RectigetSurfacePort(com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Recti viewport, com.jogamp.math.Recti surfacePort)Retrieve surface (view) port of this shape, i.e.int[]getSurfaceSize(Scene.PMVMatrixSetup pmvMatrixSetup, com.jogamp.math.Recti viewport, com.jogamp.math.util.PMVMatrix4f pmv, int[] surfaceSize)Retrieve surface (view) size in pixels of this shape.int[]getSurfaceSize(Scene scene, com.jogamp.math.util.PMVMatrix4f pmv, int[] surfaceSize)Retrieve surface (view) size in pixels of this shape.int[]getSurfaceSize(com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Recti viewport, int[] surfaceSize)Retrieve surface (view) size in pixels of this shape.com.jogamp.math.Vec4fgetToggleOffColorMod()Returns modulation color when notisToggleOn().com.jogamp.math.Vec4fgetToggleOnColorMod()Returns modulation color whenisToggleOn().TooltipgetTooltip()booleanhasBorder()Returns true if a border has been enabled via#setBorder(float, Padding).abstract booleanhasColorChannel()Returns true if implementation uses an extra color channel or texture which will be modulated with the passed rgba color#drawImpl0(GL2ES2, RegionRenderer, float[]).booleanhasPadding()Returns true ifsetPaddding(Padding)added a nonPadding.zeroSize()spacing to this shape.booleanisActivable()Returns if this shape is allowed to be activated, i.e becomeisActive().booleanisActive()Returns true of this shape is activebooleanisDiscarded()Returns whether this shape is discarded in lastdraw(GL2ES2, RegionRenderer), i.e.booleanisDraggable()Returns if this shape is draggable, a user interaction.booleanisFixedARatioResize()Returns if aspect-ratio shall be kept at resize, ifisResizable().booleanisGroup()Returns true if this shape denotes aGroup, otherwise false.booleanisInteractive()Returns if this shape allows user interaction in general, seesetInteractive(boolean)booleanisMatIdentity()Returns true ifgetMat()has not been mutated, i.e.booleanisPressed()booleanisResizable()Returns if this shape is resizable, a user interaction.booleanisToggleable()Returns true if this shape is toggable, i.e.booleanisToggleOn()Returns true this shape's toggle state.booleanisVisible()Returns true if this shape is setvisibleby the user, otherwise false.voidmarkShapeDirty()Marks the shape dirty, causing nextdraw()to recreate the Graph shape and reset the region.voidmarkStateDirty()Marks the rendering state dirty, causing nextdraw()to notify the Graph region to reselect shader and repaint potentially used FBOs.Shapemove(float dtx, float dty, float dtz)Move about scaled distance.Shapemove(com.jogamp.math.Vec3f dt)Move about scaled distance.ShapemoveTo(float tx, float ty, float tz)Move to scaled position.ShapemoveTo(com.jogamp.math.Vec3f t)Move to scaled position.voidonClicked(Shape.PointerListener l)Set user callback to be notified when shape is clicked.voidonDraw(Shape.DrawListener l)Set a user one-shot initializer callback or customdraw(GL2ES2, RegionRenderer)hook.voidonHover(Shape.PointerListener l)Set user callback to be notified when a pointer/mouse is moving over this shapevoidonMove(Shape.MoveListener l)Set user callback to be notified when shape ismove(Vec3f)'ed.voidonToggle(Shape.Listener l)Set user callback to be notified when shapetoggle()'ed.voidreceiveKeyEvents(Shape source)voidreceiveMouseEvents(Shape source)ForwardShape.MouseGestureListenerevents to thisShapefromsourceusing aShape.ForwardMouseListener.ShaperemoveActivationListener(Shape.Listener l)ShaperemoveKeyListener(KeyListener l)ShaperemoveMouseListener(Shape.MouseGestureListener l)voidremoveToolTip()voidrunSynced(Runnable action)Perform givenRunnableaction synchronizedShapescale(float sx, float sy, float sz)Multiply current scale factor by given scale.Shapescale(com.jogamp.math.Vec3f s)Multiply current scale factor by given scale.ShapesetActivable(boolean v)Set whether this shape is allowed to be activated, i.e becomeisActive().ShapesetActiveColorMod(com.jogamp.math.Vec4f c)Enable active color, modulationgetColor()ifisActive()with passingc != null, disable with passingc == null.ShapesetBorder(float thickness)Sets the thickness of the border, which is included ingetBounds()and is outside ofgetPadding().ShapesetBorderColor(float r, float g, float b, float a)Set border color.ShapesetBorderColor(com.jogamp.math.Vec4f c)Set border color.ShapesetColor(float r, float g, float b, float a)Set base color.ShapesetColor(com.jogamp.math.Vec4f c)Set base color.ShapesetDiscarded(boolean v)Set whether this shape is discarded in lastdraw(GL2ES2, RegionRenderer), i.e.ShapesetDragAndResizable(boolean v)Set whether this shape is draggable and resizable.ShapesetDraggable(boolean draggable)Set whether this shape is draggable, i.e.ShapesetFixedARatioResize(boolean v)Sets whether aspect-ratio shall be kept at resize, ifisResizable().ShapesetID(int id)Set a symbolic ID for this shape for identification.ShapesetInteractive(boolean v)Set whether this shape is interactive in general, i.e.ShapesetName(String name)Set a symbolic name for this shape for identification.ShapesetPaddding(Padding padding)Sets the unscaled padding for this shape, which is included in unscaledgetBounds()and also includes the border.com.jogamp.math.util.PMVMatrix4fsetPMVMatrix(Scene.PMVMatrixSetup pmvMatrixSetup, com.jogamp.math.Recti viewport, com.jogamp.math.util.PMVMatrix4f pmv)com.jogamp.math.util.PMVMatrix4fsetPMVMatrix(Scene scene, com.jogamp.math.util.PMVMatrix4f pmv)ShapesetPressed(boolean b)ShapesetPressedColorMod(float r, float g, float b, float a)Set pressed color, modulatinggetColor()ifisPressed().ShapesetResizable(boolean resizable)Set whether this shape is resizable, i.e.ShapesetRotation(com.jogamp.math.Quaternion q)Sets the rotationQuaternion.ShapesetRotationPivot(float px, float py, float pz)Set unscaled rotation origin, aka pivot.ShapesetRotationPivot(com.jogamp.math.Vec3f pivot)Set unscaled rotation origin, aka pivot.ShapesetScale(float sx, float sy, float sz)Set scale factor to given scale.ShapesetScale(com.jogamp.math.Vec3f s)Set scale factor to given scale.ShapesetToggle(boolean v)Set this shape's toggle state, default is off.ShapesetToggleable(boolean toggleable)Set this shape toggleable, default is off.ShapesetToggleOffColorMod(float r, float g, float b, float a)ShapesetToggleOnColorMod(float r, float g, float b, float a)TooltipsetToolTip(Tooltip newTooltip)Set's a newTooltipfor this shape.ShapesetVisible(boolean v)Enable (default) or disable this shape's visibility.int[]shapeToWinCoord(Scene.PMVMatrixSetup pmvMatrixSetup, com.jogamp.math.Recti viewport, com.jogamp.math.Vec3f objPos, com.jogamp.math.util.PMVMatrix4f pmv, int[] glWinPos)Map given object coordinate relative to this shape to window coordinates.int[]shapeToWinCoord(Scene scene, com.jogamp.math.Vec3f objPos, com.jogamp.math.util.PMVMatrix4f pmv, int[] glWinPos)Map given object coordinate relative to this shape to window coordinates.int[]shapeToWinCoord(com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Recti viewport, com.jogamp.math.Vec3f objPos, int[] glWinPos)Map given object coordinate relative to this shape to window coordinates.Shapetoggle()StringtoString()voidupdateMat()Updates the internalMatrix4fwith local position, rotation and scale.Shapevalidate(GL2ES2 gl)Validates the shape's underlyingGLRegion.Shapevalidate(GL2ES2 gl, GLProfile glp)Shapevalidate(GLProfile glp)Validates the shape's underlyingGLRegionw/o a currentGL2ES2objectcom.jogamp.math.Vec3fwinToShapeCoord(Scene.PMVMatrixSetup pmvMatrixSetup, com.jogamp.math.Recti viewport, int glWinX, int glWinY, com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Vec3f objPos)Map given gl-window-coordinates to object coordinates relative to this shape and its z-coordinate.com.jogamp.math.Vec3fwinToShapeCoord(Scene scene, int glWinX, int glWinY, com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Vec3f objPos)Map given gl-window-coordinates to object coordinates relative to this shape and its z-coordinate.com.jogamp.math.Vec3fwinToShapeCoord(com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Recti viewport, int glWinX, int glWinY, com.jogamp.math.Vec3f objPos)Map given gl-window-coordinates to object coordinates relative to this shape and its z-coordinate.
-
-
-
Field Detail
-
ZAscendingComparator
public static Comparator<Shape> ZAscendingComparator
-
ZDescendingComparator
public static Comparator<Shape> ZDescendingComparator
-
-
Method Detail
-
getParent
public Group getParent()
Returns the last parent containerGroupthis shape has been added to ornull.Since a shape can be added to multiple container (DAG), usability of this information depends on usage.
-
setID
public final Shape setID(int id)
Set a symbolic ID for this shape for identification. Default is -1 for noname.
-
getID
public final int getID()
Return the optional symbolic ID for this shape.
-
setName
public Shape setName(String name)
Set a symbolic name for this shape for identification. Default is `noname`.
-
getName
public final String getName()
Return the optional symbolic name for this shape, defaults to `noname`.
-
isGroup
public boolean isGroup()
Returns true if this shape denotes aGroup, otherwise false.
-
isVisible
public final boolean isVisible()
Returns true if this shape is setvisibleby the user, otherwise false. Defaults to true.Note that invisible shapes are not considered for picking/activation.
- See Also:
isInteractive()
-
setVisible
public final Shape setVisible(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.
-
setPaddding
public final Shape setPaddding(Padding padding)
Sets the unscaled padding for this shape, which is included in unscaledgetBounds()and also includes the border. Default is zero.Method issues
markShapeDirty().- Parameters:
padding- distance of shape to the border, i.e. padding- Returns:
- this shape for chaining
- See Also:
getPadding(),hasPadding(),markShapeDirty()
-
getPadding
public Padding getPadding()
Returns unscaledPaddingof this shape, which is included in unscaledgetBounds()and also includes the border. Default is zero.- See Also:
setPaddding(Padding),hasPadding()
-
hasPadding
public boolean hasPadding()
Returns true ifsetPaddding(Padding)added a nonPadding.zeroSize()spacing to this shape.
-
setBorder
public final Shape setBorder(float thickness)
Sets the thickness of the border, which is included ingetBounds()and is outside ofgetPadding(). Default is zero for no border.Method issues
markShapeDirty().- Parameters:
thickness- border thickness, zero for no border- Returns:
- this shape for chaining
- See Also:
setBorderColor(Vec4f),markShapeDirty()
-
hasBorder
public final boolean hasBorder()
Returns true if a border has been enabled via#setBorder(float, Padding).
-
getBorderThickness
public final float getBorderThickness()
Returns the border thickness, see#setBorder(float, Padding).
-
clear
public final void clear(GL2ES2 gl, RegionRenderer renderer)
Clears all data and reset all states as if this instance was newly created- Parameters:
gl- currentGL2ES2instance used to release GPU resourcesrenderer-RegionRendererused to release GPU resources
-
destroy
public final void destroy(GL2ES2 gl, RegionRenderer renderer)
Destroys all data- Parameters:
gl- currentGL2ES2instance used to release GPU resourcesrenderer-RegionRendererused to release GPU resources
-
onDraw
public final void onDraw(Shape.DrawListener l)
Set a user one-shot initializer callback or customdraw(GL2ES2, RegionRenderer)hook.#run(Shape, GL2ES2, RegionRenderer)is called atdraw(GL2ES2, RegionRenderer)and if returningtrue, the listener will be removed. Otherwise kept calling.This instrument allows the user either to be signaled when initialization of this
Shapeis completed, or just too hook-up customdraw(GL2ES2, RegionRenderer)actions.- Parameters:
l- callback, which shall return true to be removed, i.e. user initialization is done.
-
onHover
public final void onHover(Shape.PointerListener l)
Set user callback to be notified when a pointer/mouse is moving over this shape
-
onMove
public final void onMove(Shape.MoveListener l)
Set user callback to be notified when shape ismove(Vec3f)'ed.
-
onToggle
public final void onToggle(Shape.Listener l)
Set user callback to be notified when shapetoggle()'ed.This is usually the case when clicked, see
onClicked(PointerListener).Use
isToggleOn()to retrieve the state.
-
onClicked
public final void onClicked(Shape.PointerListener l)
Set user callback to be notified when shape is clicked.Usually shape is
toggle()'ed when clicked, seeonToggle(Listener). However, in case shape is notisToggleable()this is the last resort.
-
addActivationListener
public final Shape addActivationListener(Shape.Listener l)
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.
-
removeActivationListener
public final Shape removeActivationListener(Shape.Listener l)
-
moveTo
public final Shape moveTo(float tx, float ty, float tz)
Move to scaled position. Position ends up in PMVMatrix4f unmodified. NoShape.MoveListenernotification will occur.
-
moveTo
public final Shape moveTo(com.jogamp.math.Vec3f t)
Move to scaled position. Position ends up in PMVMatrix4f unmodified. NoShape.MoveListenernotification will occur.
-
move
public final Shape move(float dtx, float dty, float dtz)
Move about scaled distance. Position ends up in PMVMatrix4f unmodified. NoShape.MoveListenernotification will occur.
-
move
public final Shape move(com.jogamp.math.Vec3f dt)
Move about scaled distance. Position ends up in PMVMatrix4f unmodified. NoShape.MoveListenernotification will occur.
-
getPosition
public final com.jogamp.math.Vec3f getPosition()
Returns positionVec3freference, i.e. scaled translation as set viaor {@link #move(float, float, float)}.
-
getRotation
public final com.jogamp.math.Quaternion getRotation()
ReturnsQuaternionfor rotation.
-
setRotation
public final Shape setRotation(com.jogamp.math.Quaternion q)
Sets the rotationQuaternion.- Returns:
- this shape for chaining
-
getRotationPivot
public final com.jogamp.math.Vec3f getRotationPivot()
Return unscaled rotation originVec3freference, aka pivot. Null if not set viasetRotationPivot(float, float, float).- See Also:
updateMat()
-
setRotationPivot
public final Shape setRotationPivot(float px, float py, float pz)
Set unscaled rotation origin, aka pivot. Usually thegetBounds()center and should be set whilevalidateImpl(GL2ES2, GLProfile).- Returns:
- this shape for chaining
-
setRotationPivot
public final Shape setRotationPivot(com.jogamp.math.Vec3f pivot)
Set unscaled rotation origin, aka pivot. Usually thegetBounds()center and should be set whilevalidateImpl(GL2ES2, GLProfile).- Parameters:
pivot- rotation origin- Returns:
- this shape for chaining
-
setScale
public final Shape setScale(com.jogamp.math.Vec3f s)
Set scale factor to given scale.- See Also:
scale(Vec3f),getScale()
-
setScale
public final Shape setScale(float sx, float sy, float sz)
Set scale factor to given scale.- See Also:
scale(float, float, float),getScale()
-
scale
public final Shape scale(com.jogamp.math.Vec3f s)
Multiply current scale factor by given scale.- See Also:
setScale(Vec3f),getScale()
-
scale
public final Shape scale(float sx, float sy, float sz)
Multiply current scale factor by given scale.- See Also:
setScale(float, float, float),getScale()
-
getScale
public final com.jogamp.math.Vec3f getScale()
Returns scaleVec3freference.
-
markShapeDirty
public final void markShapeDirty()
Marks the shape dirty, causing nextdraw()to recreate the Graph shape and reset the region.
-
markStateDirty
public final void markStateDirty()
Marks the rendering state dirty, causing nextdraw()to notify the Graph region to reselect shader and repaint potentially used FBOs.
-
getBounds
public final com.jogamp.math.geom.AABBox getBounds()
Returns the unscaled boundingAABBoxfor this shape, borrowing internal instance. The returnedAABBoxwill cover the unscaled shape as well as its optionalgetPadding()and optionalgetBorderThickness(). The returnedAABBoxis only valid after an initial call todraw(..)orvalidate(GL2ES2).- See Also:
getBounds(GLProfile)
-
getScaledWidth
public final float getScaledWidth()
Returns the scaled width of the boundingAABBoxfor this shape. The returned width will cover the scaled shape as well as its optional scaledgetPadding()and optional scaledgetBorderThickness(). The returned width is only valid after an initial call todraw(..)orvalidate(GL2ES2).- See Also:
getBounds()
-
getScaledHeight
public final float getScaledHeight()
Returns the scaled height of the boundingAABBoxfor this shape. The returned height will cover the scaled shape as well as its optional scaledgetPadding()and optional scaledgetBorderThickness(). The returned height is only valid after an initial call todraw(..)orvalidate(GL2ES2).- See Also:
getBounds()
-
getScaledDepth
public final float getScaledDepth()
-
getBounds
public final com.jogamp.math.geom.AABBox getBounds(GLProfile glp)
Returns the unscaled boundingAABBoxfor this shape. This variant differs fromgetBounds()as it returns a validAABBoxeven beforedraw(..)and having an OpenGL instance available.- See Also:
getBounds()
-
drawToSelect
public void drawToSelect(GL2ES2 gl, RegionRenderer renderer)
Experimental selection draw command used byScene.
-
draw
public void draw(GL2ES2 gl, RegionRenderer renderer)
Renders the shape.applyMatToMv(PMVMatrix4f)is expected to be completed beforehand.- Parameters:
gl- the current GL objectrenderer-RegionRendererwhich might be used for Graph Curve Rendering, also source ofRegionRenderer.getMatrix()andRegionRenderer.getViewport().
-
validate
public final Shape validate(GL2ES2 gl)
Validates the shape's underlyingGLRegion.If the region is dirty, it gets
clearedand is reused.- Parameters:
gl- currentGL2ES2object- See Also:
validate(GLProfile)
-
validate
public final Shape validate(GLProfile glp)
Validates the shape's underlyingGLRegionw/o a currentGL2ES2objectIf 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.
- See Also:
validate(GL2ES2)
-
validate
public final Shape validate(GL2ES2 gl, GLProfile glp)
- See Also:
validate(GL2ES2),validate(GLProfile)
-
applyMatToMv
public final void applyMatToMv(com.jogamp.math.util.PMVMatrix4f pmv)
Applies the internalMatrix4fto the givenmodelview matrix, i.e.pmv.mulMv( getMat() ).Calls
In caseupdateMat()if dirty.isMatIdentity()istrue, implementation is a no-operation.- Parameters:
pmv- the matrix- See Also:
isMatIdentity(),updateMat(),getMat(),PMVMatrix4f.mulMv(Matrix4f)
-
getMat
public final com.jogamp.math.Matrix4f getMat()
Returns the internalMatrix4freference.Calls
updateMat()if dirty.- See Also:
getMat(Matrix4f),applyMatToMv(PMVMatrix4f),updateMat()
-
getMat
public final com.jogamp.math.Matrix4f getMat(com.jogamp.math.Matrix4f out)
- See Also:
getMat(),applyMatToMv(PMVMatrix4f),updateMat()
-
isMatIdentity
public final boolean isMatIdentity()
Returns true ifgetMat()has not been mutated, i.e. contains identity.- See Also:
updateMat()
-
updateMat
public final void updateMat()
Updates the internalMatrix4fwith local position, rotation and scale.- Scale shape from its center position
- Rotate shape around optional scaled pivot, see
#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.
SetsisMatIdentity()totrueif neither position, scale or rotate is performed, otherwise tofalse.Called by
applyMatToMv(PMVMatrix4f),getMat()andgetMat(Matrix4f)if internal matrix is dirty.After any mutating operations, .e.g
move(float, float, float)etc, the internal matrix is marked dirty.
-
setPMVMatrix
public final com.jogamp.math.util.PMVMatrix4f setPMVMatrix(Scene.PMVMatrixSetup pmvMatrixSetup, com.jogamp.math.Recti viewport, com.jogamp.math.util.PMVMatrix4f pmv)
- Parameters:
pmvMatrixSetup-Scene.PMVMatrixSetuptosetupgivenPMVMatrix4fpmv.viewport- used viewport forPMVMatrix4f.mapObjToWin(Vec3f, Recti, Vec3f)pmv- a newPMVMatrix4fwhich willbe setup,shape-transformedand can be reused by the caller.- Returns:
- the given
PMVMatrix4ffor chaining - See Also:
Scene.PMVMatrixSetup.set(PMVMatrix4f, Recti),applyMatToMv(PMVMatrix4f),setPMVMatrix(Scene, PMVMatrix4f)
-
setPMVMatrix
public final com.jogamp.math.util.PMVMatrix4f setPMVMatrix(Scene scene, com.jogamp.math.util.PMVMatrix4f pmv)
- Parameters:
scene-Sceneto retrieveScene.PMVMatrixSetupand the viewport.pmv- a newPMVMatrix4fwhich willbe setup,shape-transformedand can be reused by the caller.- Returns:
- the given
PMVMatrix4ffor chaining - See Also:
Scene.PMVMatrixSetup.set(PMVMatrix4f, Recti),applyMatToMv(PMVMatrix4f),setPMVMatrix(com.jogamp.graph.ui.Scene.PMVMatrixSetup, Recti, PMVMatrix4f)
-
getSurfacePort
public final com.jogamp.math.Recti getSurfacePort(com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Recti viewport, com.jogamp.math.Recti surfacePort)Retrieve surface (view) port of this shape, i.e. lower x/y position and size.The given
PMVMatrix4fhas to be setup properly for this object, i.e. itsGLMatrixFunc.GL_PROJECTIONandGLMatrixFunc.GL_MODELVIEWfor the surrounding scene including this shape'sapplyMatToMv(PMVMatrix4f). SeesetPMVMatrix(Scene, PMVMatrix4f).- Parameters:
pmv- well formedPMVMatrix4f, e.g. could have been setup viasetPMVMatrix(Scene, PMVMatrix4f).viewport- the int[4] viewportsurfacePort- Recti target surface port- Returns:
- given Recti
surfacePortfor successfulgluProject(..)operation, otherwisenull
-
getSurfaceSize
public final int[] getSurfaceSize(com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Recti viewport, int[] surfaceSize)Retrieve surface (view) size in pixels of this shape.The given
PMVMatrix4fhas to be setup properly for this object, i.e. itsGLMatrixFunc.GL_PROJECTIONandGLMatrixFunc.GL_MODELVIEWfor the surrounding scene including this shape'sapplyMatToMv(PMVMatrix4f). SeesetPMVMatrix(Scene, PMVMatrix4f).- Parameters:
pmv- well formedPMVMatrix4f, e.g. could have been setup viasetPMVMatrix(Scene, PMVMatrix4f).viewport- the int[4] viewportsurfaceSize- int[2] target surface size- Returns:
- given int[2]
surfaceSizein pixels for successfulgluProject(..)operation, otherwisenull - See Also:
getSurfaceSize(com.jogamp.graph.ui.Scene.PMVMatrixSetup, Recti, PMVMatrix4f, int[]),getSurfaceSize(Scene, PMVMatrix4f, int[])
-
getSurfaceSize
public final int[] getSurfaceSize(Scene.PMVMatrixSetup pmvMatrixSetup, com.jogamp.math.Recti viewport, com.jogamp.math.util.PMVMatrix4f pmv, int[] surfaceSize)
Retrieve surface (view) size in pixels of this shape.The given
PMVMatrix4fwill besetupproperly for this shape including this shape'sapplyMatToMv(PMVMatrix4f).- Parameters:
pmvMatrixSetup-Scene.PMVMatrixSetuptosetupgivenPMVMatrix4fpmv.viewport- used viewport forgluProject(..)pmv- a newPMVMatrix4fwhich willbe setup,shape-transformedand can be reused by the caller.surfaceSize- int[2] target surface size- Returns:
- given int[2]
surfaceSizein pixels for successfulgluProject(..)operation, otherwisenull - See Also:
getSurfaceSize(PMVMatrix4f, Recti, int[]),getSurfaceSize(Scene, PMVMatrix4f, int[])
-
getSurfaceSize
public final int[] getSurfaceSize(Scene scene, com.jogamp.math.util.PMVMatrix4f pmv, int[] surfaceSize)
Retrieve surface (view) size in pixels of this shape.The given
PMVMatrix4fwill besetupproperly for this shape including this shape'sapplyMatToMv(PMVMatrix4f).- Parameters:
scene-Sceneto retrieveScene.PMVMatrixSetupand the viewport.pmv- a newPMVMatrix4fwhich willbe setup,shape-transformedand can be reused by the caller.surfaceSize- int[2] target surface size- Returns:
- given int[2]
surfaceSizein pixels for successfulgluProject(..)operation, otherwisenull - See Also:
getSurfaceSize(PMVMatrix4f, Recti, int[]),getSurfaceSize(com.jogamp.graph.ui.Scene.PMVMatrixSetup, Recti, PMVMatrix4f, int[])
-
getPixelPerShapeUnit
public final float[] getPixelPerShapeUnit(int[] shapeSizePx, float[] pixPerShape)Retrieve pixel per scaled shape-coordinate unit, i.e. [px]/[obj].- Parameters:
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- Returns:
- given float[2]
pixPerShape - See Also:
getPixelPerShapeUnit(Scene, PMVMatrix4f, float[]),getSurfaceSize(com.jogamp.graph.ui.Scene.PMVMatrixSetup, Recti, PMVMatrix4f, int[]),getScaledWidth(),getScaledHeight()
-
getPixelPerShapeUnit
public final float[] getPixelPerShapeUnit(com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Recti viewport, float[] pixPerShape)Retrieve pixel per scaled shape-coordinate unit, i.e. [px]/[obj].The given
PMVMatrix4fhas to be setup properly for this object, i.e. itsGLMatrixFunc.GL_PROJECTIONandGLMatrixFunc.GL_MODELVIEWfor the surrounding scene including this shape'sapplyMatToMv(PMVMatrix4f). SeesetPMVMatrix(Scene, PMVMatrix4f).- Parameters:
pmv- well formedPMVMatrix4f, e.g. could have been setup viasetPMVMatrix(Scene, PMVMatrix4f).viewport- the int[4] viewportpixPerShape- float[2] pixel per scaled shape-coordinate unit result storage- Returns:
- given float[2]
pixPerShapefor successfulgluProject(..)operation, otherwisenull - See Also:
getPixelPerShapeUnit(int[], float[]),getSurfaceSize(Scene, PMVMatrix4f, int[]),getScaledWidth(),getScaledHeight()
-
getPixelPerShapeUnit
public final float[] getPixelPerShapeUnit(Scene scene, com.jogamp.math.util.PMVMatrix4f pmv, float[] pixPerShape)
Retrieve pixel per scaled shape-coordinate unit, i.e. [px]/[obj].The given
PMVMatrix4fwill besetupproperly for this shape including this shape'sapplyMatToMv(PMVMatrix4f).- Parameters:
scene-Sceneto retrieveScene.PMVMatrixSetupand the viewport.pmv- a newPMVMatrix4fwhich willbe setup,shape-transformedand can be reused by the caller.pixPerShape- float[2] pixel per scaled shape-coordinate unit result storage- Returns:
- given float[2]
pixPerShapefor successfulgluProject(..)operation, otherwisenull - See Also:
getPixelPerShapeUnit(int[], float[]),getSurfaceSize(Scene, PMVMatrix4f, int[]),getScaledWidth(),getScaledHeight()
-
shapeToWinCoord
public final int[] shapeToWinCoord(com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Recti viewport, com.jogamp.math.Vec3f objPos, int[] glWinPos)Map given object coordinate relative to this shape to window coordinates.The given
PMVMatrix4fhas to be setup properly for this object, i.e. itsGLMatrixFunc.GL_PROJECTIONandGLMatrixFunc.GL_MODELVIEWfor the surrounding scene including this shape'sapplyMatToMv(PMVMatrix4f). SeesetPMVMatrix(Scene, PMVMatrix4f).- Parameters:
pmv- well formedPMVMatrix4f, e.g. could have been setup viasetPMVMatrix(Scene, PMVMatrix4f).viewport- the viewportobjPos- object position relative to this shape's centerglWinPos- int[2] target window position of objPos relative to this shape- Returns:
- given int[2]
glWinPosfor successfulgluProject(..)operation, otherwisenull - See Also:
#shapeToWinCoord(com.jogamp.graph.ui.Scene.PMVMatrixSetup, Recti, float[], PMVMatrix4f, int[]),#shapeToWinCoord(Scene, float[], PMVMatrix4f, int[])
-
shapeToWinCoord
public final int[] shapeToWinCoord(Scene.PMVMatrixSetup pmvMatrixSetup, com.jogamp.math.Recti viewport, com.jogamp.math.Vec3f objPos, com.jogamp.math.util.PMVMatrix4f pmv, int[] glWinPos)
Map given object coordinate relative to this shape to window coordinates.The given
PMVMatrix4fwill besetupproperly for this shape including this shape'sapplyMatToMv(PMVMatrix4f).- Parameters:
pmvMatrixSetup-Scene.PMVMatrixSetuptosetupgivenPMVMatrix4fpmv.viewport- used viewport forPMVMatrix4f.mapObjToWin(Vec3f, Recti, Vec3f)objPos- object position relative to this shape's centerpmv- a newPMVMatrix4fwhich willbe setup,shape-transformedand can be reused by the caller.glWinPos- int[2] target window position of objPos relative to this shape- Returns:
- given int[2]
glWinPosfor successfulgluProject(..)operation, otherwisenull - See Also:
#shapeToWinCoord(PMVMatrix4f, Recti, float[], int[]),#shapeToWinCoord(Scene, float[], PMVMatrix4f, int[])
-
shapeToWinCoord
public final int[] shapeToWinCoord(Scene scene, com.jogamp.math.Vec3f objPos, com.jogamp.math.util.PMVMatrix4f pmv, int[] glWinPos)
Map given object coordinate relative to this shape to window coordinates.The given
PMVMatrix4fwill besetupproperly for this shape including this shape'sapplyMatToMv(PMVMatrix4f).- Parameters:
scene-Sceneto retrieveScene.PMVMatrixSetupand the viewport.objPos- object position relative to this shape's centerpmv- a newPMVMatrix4fwhich willbe setup,shape-transformedand can be reused by the caller.glWinPos- int[2] target window position of objPos relative to this shape- Returns:
- given int[2]
glWinPosfor successfulgluProject(..)operation, otherwisenull - See Also:
#shapeToWinCoord(PMVMatrix4f, Recti, float[], int[]),#shapeToWinCoord(com.jogamp.graph.ui.Scene.PMVMatrixSetup, Recti, float[], PMVMatrix4f, int[])
-
winToShapeCoord
public final com.jogamp.math.Vec3f winToShapeCoord(com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Recti viewport, int glWinX, int glWinY, com.jogamp.math.Vec3f objPos)Map given gl-window-coordinates to object coordinates relative to this shape and its z-coordinate.The given
PMVMatrix4fhas to be setup properly for this object, i.e. itsGLMatrixFunc.GL_PROJECTIONandGLMatrixFunc.GL_MODELVIEWfor the surrounding scene including this shape'sapplyMatToMv(PMVMatrix4f). SeesetPMVMatrix(Scene, PMVMatrix4f).- Parameters:
pmv- well formedPMVMatrix4f, e.g. could have been setup viasetPMVMatrix(Scene, PMVMatrix4f).viewport- the Rect4i viewportglWinX- in GL window coordinates, origin bottom-leftglWinY- in GL window coordinates, origin bottom-leftobjPos- target object position of glWinX/glWinY relative to this shape- Returns:
- given
objPosfor successfulgluProject(..)andgluUnProject(..)operation, otherwisenull - See Also:
#winToShapeCoord(com.jogamp.graph.ui.Scene.PMVMatrixSetup, Recti, int, int, PMVMatrix4f, float[]),#winToShapeCoord(Scene, int, int, PMVMatrix4f, float[])
-
winToShapeCoord
public final com.jogamp.math.Vec3f winToShapeCoord(Scene.PMVMatrixSetup pmvMatrixSetup, com.jogamp.math.Recti viewport, int glWinX, int glWinY, com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Vec3f objPos)
Map given gl-window-coordinates to object coordinates relative to this shape and its z-coordinate.The given
PMVMatrix4fwill besetupproperly for this shape including this shape'sapplyMatToMv(PMVMatrix4f).- Parameters:
pmvMatrixSetup-Scene.PMVMatrixSetuptosetupgivenPMVMatrix4fpmv.viewport- used viewport forPMVMatrix4f.mapWinToObj(float, float, float, Recti, Vec3f)glWinX- in GL window coordinates, origin bottom-leftglWinY- in GL window coordinates, origin bottom-leftpmv- a newPMVMatrix4fwhich willbe setup,shape-transformedand can be reused by the caller.objPos- target object position of glWinX/glWinY relative to this shape- Returns:
- given
objPosfor successfulgluProject(..)andgluUnProject(..)operation, otherwisenull - See Also:
#winToShapeCoord(PMVMatrix4f, Recti, int, int, float[]),#winToShapeCoord(Scene, int, int, PMVMatrix4f, float[])
-
winToShapeCoord
public final com.jogamp.math.Vec3f winToShapeCoord(Scene scene, int glWinX, int glWinY, com.jogamp.math.util.PMVMatrix4f pmv, com.jogamp.math.Vec3f objPos)
Map given gl-window-coordinates to object coordinates relative to this shape and its z-coordinate.The given
PMVMatrix4fwill besetupproperly for this shape including this shape'sapplyMatToMv(PMVMatrix4f).- Parameters:
scene-Sceneto retrieveScene.PMVMatrixSetupand the viewport.glWinX- in GL window coordinates, origin bottom-leftglWinY- in GL window coordinates, origin bottom-leftpmv- a newPMVMatrix4fwhich willbe setup,shape-transformedand can be reused by the caller.objPos- target object position of glWinX/glWinY relative to this shape- Returns:
- given
objPosfor successfulgluProject(..)andgluUnProject(..)operation, otherwisenull - See Also:
#winToShapeCoord(PMVMatrix4f, Recti, int, int, float[]),#winToShapeCoord(com.jogamp.graph.ui.Scene.PMVMatrixSetup, Recti, int, int, PMVMatrix4f, float[])
-
getColor
public final com.jogamp.math.Vec4f getColor()
Returns base-color w/o color channel, will be modulated w/getPressedColorMod(),getToggleOnColorMod(),getToggleOffColorMod()andgetActiveColorMod().
-
getPressedColorMod
public final com.jogamp.math.Vec4f getPressedColorMod()
Returns modulation color whenisPressed().
-
getToggleOnColorMod
public final com.jogamp.math.Vec4f getToggleOnColorMod()
Returns modulation color whenisToggleOn().
-
getToggleOffColorMod
public final com.jogamp.math.Vec4f getToggleOffColorMod()
Returns modulation color when notisToggleOn().
-
getActiveColorMod
public final com.jogamp.math.Vec4f getActiveColorMod()
Returns modulation color whenisActive().
-
setColor
public Shape setColor(float r, float g, float b, 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().- See Also:
markShapeDirty()
-
setColor
public Shape setColor(com.jogamp.math.Vec4f c)
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().- See Also:
markShapeDirty()
-
setPressedColorMod
public Shape setPressedColorMod(float r, float g, float b, float a)
Set pressed color, modulatinggetColor()ifisPressed().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
-
setToggleOnColorMod
public final Shape setToggleOnColorMod(float r, float g, float b, float a)
Set toggle-on color, modulatinggetColor()ifisToggleOn()andsetToggleable(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
-
setToggleOffColorMod
public final Shape setToggleOffColorMod(float r, float g, float b, float a)
Set toggle-off color, modulatinggetColor()if !isToggleOn()andsetToggleable(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
-
setActiveColorMod
public final Shape setActiveColorMod(com.jogamp.math.Vec4f c)
Enable active color, modulationgetColor()ifisActive()with passingc != null, disable with passingc == null.Default active color-factor w/o color channel, modulated base-color. 0.60 * 0.25 ~= 0.15
Default is disabled.
-
getBorderColor
public final com.jogamp.math.Vec4f getBorderColor()
-
setBorderColor
public final Shape setBorderColor(float r, float g, float b, float a)
Set border color.Default RGBA value is 0.00f, 0.00f, 0.00f, 1.0f
Method issues
markShapeDirty().- See Also:
setBorder(float),markShapeDirty()
-
setBorderColor
public final Shape setBorderColor(com.jogamp.math.Vec4f c)
Set border color.Default RGBA value is 0.00f, 0.00f, 0.00f, 1.0f
Method issues
markShapeDirty().- See Also:
setBorder(float),markShapeDirty()
-
getSubString
public String getSubString()
-
setPressed
public final Shape setPressed(boolean b)
-
isPressed
public final boolean isPressed()
-
setToggleable
public final Shape setToggleable(boolean toggleable)
Set this shape toggleable, default is off.- Parameters:
toggleable-- See Also:
isInteractive()
-
isToggleable
public boolean isToggleable()
Returns true if this shape is toggable, i.e. rendered w/setToggleOnColorMod(float, float, float, float)orsetToggleOffColorMod(float, float, float, float).- See Also:
isInteractive()
-
setToggle
public final Shape setToggle(boolean v)
Set this shape's toggle state, default is off.- Parameters:
v-- Returns:
-
toggle
public final Shape toggle()
-
isToggleOn
public final boolean isToggleOn()
Returns true this shape's toggle state.
-
isActive
public final boolean isActive()
Returns true of this shape is active
-
getAdjustedZ
public final float getAdjustedZ()
-
setToolTip
public Tooltip setToolTip(Tooltip newTooltip)
Set's a newTooltipfor this shape.The
Shapemust be setinteractiveto receive the mouse-over signal, i.e. being picked.
-
removeToolTip
public void removeToolTip()
-
getTooltip
public Tooltip getTooltip()
-
setInteractive
public final Shape setInteractive(boolean v)
Set whether this shape is interactive in general, i.e. any user interaction like -isToggleable()-isDraggable()-isResizable()but excluding programmatic changes.- Parameters:
v- new value forisInteractive()- See Also:
isInteractive(),isVisible(),setDraggable(boolean),setResizable(boolean),setDragAndResizable(boolean)
-
isInteractive
public final boolean isInteractive()
Returns if this shape allows user interaction in general, seesetInteractive(boolean)- See Also:
setInteractive(boolean),isVisible()
-
setActivable
public final Shape setActivable(boolean v)
Set whether this shape is allowed to be activated, i.e becomeisActive().A non activable shape still allows a shape to be dragged or resized, it just can't gain the main focus.
-
isActivable
public final boolean isActivable()
Returns if this shape is allowed to be activated, i.e becomeisActive().
-
setDiscarded
public final Shape setDiscarded(boolean v)
Set whether this shape is discarded in lastdraw(GL2ES2, RegionRenderer), i.e. culled via frustum or occlusion criteria.
-
isDiscarded
public final boolean isDiscarded()
Returns whether this shape is discarded in lastdraw(GL2ES2, RegionRenderer), i.e. culled via frustum or occlusion criteria.
-
setDraggable
public final Shape setDraggable(boolean draggable)
Set whether this shape is draggable, i.e. translated by 1-pointer-click and drag.Default draggable is true.
-
isDraggable
public final boolean isDraggable()
Returns if this shape is draggable, a user interaction.- See Also:
setDraggable(boolean)
-
setResizable
public final Shape setResizable(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.
-
isResizable
public final boolean isResizable()
Returns if this shape is resizable, a user interaction.- See Also:
setResizable(boolean)
-
isFixedARatioResize
public final boolean isFixedARatioResize()
Returns if aspect-ratio shall be kept at resize, ifisResizable().- See Also:
setFixedARatioResize(boolean)
-
setFixedARatioResize
public final Shape setFixedARatioResize(boolean v)
Sets whether aspect-ratio shall be kept at resize, ifisResizable().- See Also:
isResizable(),isFixedARatioResize()
-
setDragAndResizable
public final Shape setDragAndResizable(boolean v)
Set whether this shape is draggable and resizable.Default draggable and resizable is true.
-
addMouseListener
public final Shape addMouseListener(Shape.MouseGestureListener l)
-
removeMouseListener
public final Shape removeMouseListener(Shape.MouseGestureListener l)
-
receiveMouseEvents
public void receiveMouseEvents(Shape source)
ForwardShape.MouseGestureListenerevents to thisShapefromsourceusing aShape.ForwardMouseListener.This source
Shapemust besetInteractive(boolean)to receive and forward the events.This receiver
Shapemust besetInteractive(boolean)to have the events forwarded.- See Also:
receiveKeyEvents(Shape)
-
addKeyListener
public final Shape addKeyListener(KeyListener l)
-
removeKeyListener
public final Shape removeKeyListener(KeyListener l)
-
receiveKeyEvents
public void receiveKeyEvents(Shape source)
ForwardKeyListenerevents to thisShapefromsourceusing aShape.ForwardKeyListener.This source
Shapemust besetInteractive(boolean)to receive and forward the events.This receiver
Shapemust besetInteractive(boolean)to have the events forwarded.- See Also:
receiveMouseEvents(Shape)
-
hasColorChannel
public 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[]). Otherwise the base color will be modulated and passed to#drawImpl0(GL2ES2, RegionRenderer, float[]).
-
-