Class AbstractGLRenderer
- java.lang.Object
-
- jadex.extension.envsupport.observer.graphics.opengl.AbstractGLRenderer
-
- All Implemented Interfaces:
IGLRenderer
- Direct Known Subclasses:
EllipseGLRenderer
,RectangleGLRenderer
,RegularPolygonGLRenderer
,TexturedRectangleGLRenderer
,TriangleGLRenderer
public abstract class AbstractGLRenderer extends java.lang.Object implements IGLRenderer
-
-
Constructor Summary
Constructors Constructor Description AbstractGLRenderer()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
draw(DrawableCombiner dc, Primitive primitive, java.lang.Object obj, ViewportJOGL vp)
Draws the primitive.void
prepareAndExecuteDraw(DrawableCombiner dc, Primitive primitive, java.lang.Object obj, ViewportJOGL vp)
Prepares the object for rendering to a JOGL viewportstatic boolean
setupDCMatrix(DrawableCombiner dc, java.lang.Object obj, boolean enablePos, boolean enableSize, boolean enableRot, ViewportJOGL vp)
Sets the basic matrix for the combiner, call can be skipped if alternative draw method is required.protected boolean
setupMatrix(DrawableCombiner dc, Primitive primitive, java.lang.Object obj, javax.media.opengl.GL gl, IViewport vp)
Sets up the transformation matrix before drawing.
-
-
-
Method Detail
-
prepareAndExecuteDraw
public final void prepareAndExecuteDraw(DrawableCombiner dc, Primitive primitive, java.lang.Object obj, ViewportJOGL vp)
Prepares the object for rendering to a JOGL viewport- Specified by:
prepareAndExecuteDraw
in interfaceIGLRenderer
- Parameters:
dc
- the DrawableCombiner drawing the objectprimitive
- the primitive being drawnobj
- the object being drawnvp
- the viewport
-
setupMatrix
protected boolean setupMatrix(DrawableCombiner dc, Primitive primitive, java.lang.Object obj, javax.media.opengl.GL gl, IViewport vp)
Sets up the transformation matrix before drawing.- Parameters:
obj
- object being drawng
- graphics context- Returns:
- true, if the setup was successful
-
setupDCMatrix
public static final boolean setupDCMatrix(DrawableCombiner dc, java.lang.Object obj, boolean enablePos, boolean enableSize, boolean enableRot, ViewportJOGL vp)
Sets the basic matrix for the combiner, call can be skipped if alternative draw method is required.- Parameters:
obj
- object being drawngl
- the viewport contextenablePos
- enables position setupenableSize
- enables size setupenableRot
- enables rotation setup
-
draw
public abstract void draw(DrawableCombiner dc, Primitive primitive, java.lang.Object obj, ViewportJOGL vp)
Draws the primitive.- Specified by:
draw
in interfaceIGLRenderer
- Parameters:
dc
- the DrawableCombiner drawing the objectprimitive
- the primitive being drawnobj
- the object being drawnvp
- the viewport
-
-