abstract class PEmulator
extends javax.swing.JPanel
This class emulates some 3D Processing methods using direct access to the JOGL library.(see http://www.jogamp.org/ This Emulator is usefull if OPENGL mode on Processing is not working
This source underlies the GNU General Public License; You can redistribute it or modify by nameing the originally author
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
private GLCanvas |
canvas |
private GL2 |
currentGL2 |
private PImage |
currentImage |
private int |
currentShapeMode |
private Texture |
currentTexture |
private int |
h |
private java.util.HashMap<PImage,Texture> |
textureCache |
protected static int |
TRIANGLE |
private int |
w |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Modifier | Constructor and Description |
---|---|
protected |
PEmulator(int width,
int height) |
Modifier and Type | Method and Description |
---|---|
protected void |
_background(float c)
refer to processing API
|
protected void |
_beginShape(int mode)
see Processing API
|
protected int |
_color(int r,
int g,
int b,
int a)
returns a processing pixel (see Processing API)
|
protected void |
_endShape()
see Processing API
|
protected void |
_fill(float c)
see Processing API
|
protected void |
_fill(float r,
float g,
float b,
float t)
see Processing API
|
protected void |
_lights()
see Processing API
|
protected void |
_line(float xa,
float ya,
float za,
float xb,
float yb,
float zb)
see Processing API
|
protected void |
_rotateX(float angle)
see Processing API
|
protected void |
_rotateY(float angle)
see Processing API
|
protected void |
_rotateZ(float angle)
see Processing API
|
protected void |
_scale(float v)
see Processing API
|
protected void |
_stroke(float r,
float g,
float b)
see Processing API
|
protected void |
_strokeWeight(float w)
see Processing API
|
protected void |
_texture(PImage img)
refer to processing API
|
protected void |
_translate(float x,
float y,
float z)
see Processing API
|
protected void |
_vertex(float x,
float y,
float z)
see Processing API
|
protected void |
_vertex(float x,
float y,
float z,
float tx,
float ty)
see Processing API
|
private Texture |
createTexture(int width,
int height,
int[] pixels)
a helper to create a GL Texture based on processing spec's
|
void |
display(GLAutoDrawable drawable) |
void |
dispose(GLAutoDrawable arg0) |
(package private) abstract void |
execQueue()
draws the polygons and lines.
|
void |
GLConfig()
Does a printout of the current GL version and driver
|
void |
init(GLAutoDrawable drawable) |
void |
repaint() |
void |
reshape(GLAutoDrawable drawable,
int x,
int y,
int width,
int height) |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected static final int TRIANGLE
private int w
private int h
private int currentShapeMode
private GL2 currentGL2
private Texture currentTexture
private PImage currentImage
private java.util.HashMap<PImage,Texture> textureCache
private GLCanvas canvas
public void GLConfig()
abstract void execQueue()
private Texture createTexture(int width, int height, int[] pixels)
public void display(GLAutoDrawable drawable)
public void init(GLAutoDrawable drawable)
public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height)
public void dispose(GLAutoDrawable arg0)
public void repaint()
repaint
in class java.awt.Component
protected void _lights()
protected void _strokeWeight(float w)
protected void _stroke(float r, float g, float b)
protected void _line(float xa, float ya, float za, float xb, float yb, float zb)
protected void _translate(float x, float y, float z)
protected void _rotateY(float angle)
protected void _rotateX(float angle)
protected void _rotateZ(float angle)
protected void _scale(float v)
protected void _beginShape(int mode)
protected void _endShape()
protected void _fill(float r, float g, float b, float t)
protected void _fill(float c)
protected void _vertex(float x, float y, float z)
protected void _vertex(float x, float y, float z, float tx, float ty)
protected int _color(int r, int g, int b, int a)
protected void _texture(PImage img)
img
- protected void _background(float c)
img
-