28package com.jogamp.graph.ui.widgets;
30import com.jogamp.graph.curve.Region;
31import com.jogamp.graph.curve.opengl.GLRegion;
32import com.jogamp.graph.curve.opengl.RegionRenderer;
33import com.jogamp.graph.ui.Group;
34import com.jogamp.graph.ui.Shape;
35import com.jogamp.graph.ui.layout.Alignment;
36import com.jogamp.graph.ui.layout.GridLayout;
37import com.jogamp.math.Vec2f;
38import com.jogamp.math.Vec3f;
39import com.jogamp.math.Vec4f;
40import com.jogamp.math.geom.AABBox;
41import com.jogamp.math.geom.Cube;
42import com.jogamp.math.geom.Frustum;
43import com.jogamp.math.util.PMVMatrix4f;
44import com.jogamp.newt.event.MouseEvent;
45import com.jogamp.opengl.GL2ES2;
46import com.jogamp.opengl.GLProfile;
47import com.jogamp.opengl.util.texture.TextureSequence;
54 private final Group content;
55 private final Group clippedContent;
57 private final Vec2f contentPosZero =
new Vec2f();
97 this.content = content;
100 this.clippedContent.
addShape(content);
103 if(
null != horizSliderParam ) {
110 content.moveTo(contentPosZero.x()-val, oldPos.y(), oldPos.z());
112 content.moveTo(contentPosZero.x()+val, oldPos.y(), oldPos.z());
118 if(
null != vertSliderParam ) {
125 content.moveTo(oldPos.x(), contentPosZero.y()+val, oldPos.z());
127 content.moveTo(oldPos.x(), contentPosZero.y()-val, oldPos.z());
134 content.
moveTo(contentPosZero.x(), contentPosZero.y(), 0);
151 super.validateImpl(gl, glp);
155 contentPosZero.
set(0, 0);
156 if(
null != horizSlider ) {
162 if(
null != vertSlider ) {
184 private final Cube tempC00 =
new Cube();
final PMVMatrix4f getMatrix()
Borrow the current PMVMatrix4f.
Group of Shapes, optionally utilizing a Group.Layout.
Group()
Create a group of Shapes w/o Group.Layout.
void addShape(final Shape s)
Adds a Shape.
AABBox getBounds(final PMVMatrix4f pmv, final Shape shape)
Returns AABBox dimension of given Shape from this container's perspective, i.e.
Group setFixedSize(final Vec3f v)
Enforce size of this group for all given 3 dimensions getBounds() without adjusting 3D z-axis like se...
Group setClipMvFrustum(final Frustum v)
Enable Modelview (Mv) Frustum clipping on explicit given pre-multiplied w/ Mv-matrix clip-box for thi...
Vec3f getFixedSize()
Returns borrowed fixed size instance, see setFixedSize(Vec3f) and setFixedSize(Vec2f).
void drawImpl0(final GL2ES2 gl, final RegionRenderer renderer, final Vec4f rgba)
Actual draw implementation, called by draw(GL2ES2, RegionRenderer).
boolean isShapeDirty()
Returns the shape's dirty state, see markShapeDirty().
Generic Shape, potentially using a Graph via GraphShape or other means of representing content.
final void onDraw(final DrawListener l)
Set a user one-shot initializer callback or custom draw(GL2ES2, RegionRenderer) hook.
final Shape moveTo(final float tx, final float ty, final float tz)
Move to scaled position.
final Vec3f getPosition()
Returns position Vec3f reference, i.e.
final boolean isVisible()
Returns true if this shape is set visible by the user, otherwise false.
Immutable layout alignment options, including Bit#Fill.
static final Alignment None
No alignment constant.
GraphUI Grid Group.Layout.
2D Vector based upon two float components.
void set(final Vec2f o)
this = o, returns this.
3D Vector based upon three float components.
4D Vector based upon four float components.
Axis Aligned Bounding Box.
Simple 8-point Vec3f cube compound having z-far <= z-near @endiliteral.
Frustum updateFrustumPlanes(final Frustum frustum)
Calculate the frustum planes using this Cube.
Cube transform(final Matrix4f mat)
Affine 3f-vector transformation of all 8-points with given matrix, Matrix4f#mulVec3f(Vec3f).
Cube set(final AABBox box)
Setting this cube to given AABBox minimum and maximum.
Providing frustum planes derived by different inputs (P*MV, ..) used to classify objects.
PMVMatrix4f implements the basic computer graphics Matrix4f pack using projection (P),...
final Matrix4f getMv()
Returns the modelview matrix (Mv).
Pointer event of type PointerType.
Specifies the the OpenGL profile.