28package com.jogamp.graph.ui.shapes;
30import com.jogamp.graph.curve.OutlineShape;
31import com.jogamp.graph.curve.Region;
32import com.jogamp.graph.curve.opengl.GLRegion;
33import com.jogamp.graph.ui.GraphShape;
34import com.jogamp.graph.ui.Shape;
35import com.jogamp.opengl.GL2ES2;
36import com.jogamp.opengl.GLProfile;
37import com.jogamp.opengl.util.texture.TextureSequence;
98 }
else if(
corner < 0.01f ){
118 if( this.width !=
width || this.height !=
height ) {
145 System.err.println(
"GraphShape.RoundButton: Shape: "+shape+
", "+
box);
154 final float minX = 0;
155 final float minY = 0;
156 final float minZ = zOffset;
159 shape.
addVertex(minX+tw, minY, minZ,
true);
160 shape.
addVertex(minX+tw, minY + th, minZ,
true);
161 shape.
addVertex(minX, minY + th, minZ,
true);
168 final float dC = 0.5f*
corner*Math.min(tw, th);
170 final float minX = 0;
171 final float minY = 0;
172 final float minZ = zOffset;
174 shape.
addVertex(minX, minY + dC, minZ,
true);
175 shape.
addVertex(minX, minY, minZ,
false);
177 shape.
addVertex(minX + dC, minY, minZ,
true);
179 shape.
addVertex(minX + tw - dC, minY, minZ,
true);
180 shape.
addVertex(minX + tw, minY, minZ,
false);
181 shape.
addVertex(minX + tw, minY + dC, minZ,
true);
182 shape.
addVertex(minX + tw, minY + th- dC, minZ,
true);
183 shape.
addVertex(minX + tw, minY + th, minZ,
false);
184 shape.
addVertex(minX + tw - dC, minY + th, minZ,
true);
185 shape.
addVertex(minX + dC, minY + th, minZ,
true);
186 shape.
addVertex(minX, minY + th, minZ,
false);
187 shape.
addVertex(minX, minY + th - dC, minZ,
true);
A Generic shape objects which is defined by a list of Outlines.
final void addVertex(final Vertex v)
Adds a vertex to the last open outline to the shape's tail.
final void setIsQuadraticNurbs()
Claim this outline's vertices are all OutlineShape.VerticesState#QUADRATIC_NURBS, hence no cubic tran...
final void setSharpness(final float s)
Sets sharpness, defaults to DEFAULT_SHARPNESS.
final void closeLastOutline(final boolean closeTail)
Closes the last outline in the shape.
final void addOutlineShape(final OutlineShape shape, final AffineTransform t, final Vec4f rgbaColor)
Add the given OutlineShape to this region with the given optional AffineTransform.
Graph based GLRegion Shape.
final void resetGLRegion(final GLProfile glp, final GL2ES2 gl, final TextureSequence colorTexSeq, int vertexCount, int indexCount)
Reset the GLRegion and reserving its buffers to have a free capacity for vertexCount and indexCount e...
static final boolean DEBUG_DRAW
final void markShapeDirty()
Marks the shape dirty, causing next draw() to recreate the Graph shape and reset the region.
final Vec4f rgbaColor
Default base-color w/o color channel, will be modulated w/ pressed- and toggle color.
final Shape setRotationPivot(final float px, final float py, final float pz)
Set unscaled rotation origin, aka pivot.
final AABBox resize(final AABBox newBox)
Resize the AABBox to encapsulate another AABox.
final Vec3f getCenter()
Returns computed center of this AABBox of getLow() and getHigh().
Specifies the the OpenGL profile.