28package com.jogamp.graph.ui.shapes;
30import com.jogamp.graph.curve.OutlineShape;
31import com.jogamp.graph.ui.GraphShape;
32import com.jogamp.opengl.GL2ES2;
33import com.jogamp.opengl.GLProfile;
42 private float width, height, lineWidth;
48 this.lineWidth = linewidth;
51 public final float getWidth() {
return width; }
55 public void setDimension(
final float width,
final float height,
final float lineWidth) {
58 this.lineWidth = lineWidth;
66 final float lwh = lineWidth/2f;
70 final float twh = tw/2f;
71 final float thh = th/2f;
73 final float ctrX = 0f, ctrY = 0f;
74 final float ctrZ = 0f;
77 shape.
moveTo(ctrX-lwh, ctrY-thh, ctrZ);
78 shape.
lineTo(ctrX+lwh, ctrY-thh, ctrZ);
79 shape.
lineTo(ctrX+lwh, ctrY+thh, ctrZ);
80 shape.
lineTo(ctrX-lwh, ctrY+thh, ctrZ);
84 shape.
moveTo(ctrX-twh, ctrY-lwh, ctrZ);
85 shape.
lineTo(ctrX+twh, ctrY-lwh, ctrZ);
86 shape.
lineTo(ctrX+twh, ctrY+lwh, ctrZ);
87 shape.
lineTo(ctrX-twh, ctrY+lwh, ctrZ);
A Generic shape objects which is defined by a list of Outlines.
final void setIsQuadraticNurbs()
Claim this outline's vertices are all OutlineShape.VerticesState#QUADRATIC_NURBS, hence no cubic tran...
final void moveTo(final float x, final float y, final float z)
Start a new position for the next line segment at given point x/y (P1).
final void lineTo(final float x, final float y, final float z)
Add a line segment, intersecting the last point and the given point x/y (P1).
final void setSharpness(final float s)
Sets sharpness, defaults to DEFAULT_SHARPNESS.
final void closePath()
Closes the current sub-path segment by drawing a straight line back to the coordinates of the last mo...
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...
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.
A GraphUI Crosshair GraphShape.
final float getLineWidth()
CrossHair(final int renderModes, final float width, final float height, final float linewidth)
void setDimension(final float width, final float height, final float lineWidth)
void addShapeToRegion(final GLProfile glp, final GL2ES2 gl)
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.