|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfhm.edu.fem.animation.GLFEMRenderer
public abstract class GLFEMRenderer
Class Description: This class is the base class for all renderers. It offers an abstract method which is automatically called by this class during rendering, where the extended classes can put their render-stuff.
Field Summary | |
---|---|
protected FEMManager |
femManager
|
protected boolean |
mouseLButtonDown
|
protected boolean |
mouseRButtonDown
|
protected float |
nRange
|
protected int |
prevMouseX
|
protected int |
prevMouseY
|
protected boolean |
showPointsOnly
|
protected boolean |
showPolygons
|
protected double |
transX
|
protected double |
transY
|
protected boolean |
useColorMode
|
protected boolean |
viewChangedByUser
|
protected int |
viewHeight
|
protected float |
viewRotX
|
protected float |
viewRotY
|
protected float |
viewRotZ
|
protected int |
viewWidth
|
protected int |
viewX
|
protected int |
viewY
|
Constructor Summary | |
---|---|
GLFEMRenderer()
Constructor of the FEM Renderer, the mid point is automatically set at the mid of the whole figure shown |
|
GLFEMRenderer(double xMid,
double yMid)
Constructor of the FEM Renderer, manually setting the mid point of the drawing |
Method Summary | |
---|---|
void |
display(GLDrawable drawable)
This method is automatically called in a loop to keep drawing the window |
void |
displayChanged(GLDrawable drawable,
boolean modeChanged,
boolean deviceChanged)
Method required by the GLEventListener Interface |
protected abstract void |
drawContents(GLDrawable drawable)
The abstract draw method which needs to be implemented in all extending renderers |
protected void |
drawCoordSystem(GLDrawable drawable)
Draw the coordinate system |
void |
init(GLDrawable drawable)
Initialize This method is automatically called by OpenGL |
void |
keyPressed(java.awt.event.KeyEvent e)
METHODS NEEDED BY THE KEYLISTENER INTERFACE |
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
keyTyped(java.awt.event.KeyEvent e)
Automatically called when the user presses a key |
void |
mouseClicked(java.awt.event.MouseEvent e)
METHODS REQUIRED BY THE MOUSE LISTENERS - NOT USED |
void |
mouseDragged(java.awt.event.MouseEvent e)
Called when the user drags the mouse |
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
Called when the user presses any mouse button |
void |
mouseReleased(java.awt.event.MouseEvent e)
Called when the user releases the mouse button |
void |
reshape(GLDrawable drawable,
int x,
int y,
int w,
int h)
This method is called when the user resizes the window |
protected void |
setMidPointFromNodes()
Calculate and set the mid point of the graphic based on all nodes in the figure |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected FEMManager femManager
protected boolean mouseLButtonDown
protected boolean mouseRButtonDown
protected float nRange
protected int prevMouseX
protected int prevMouseY
protected boolean showPointsOnly
protected boolean showPolygons
protected double transX
protected double transY
protected boolean useColorMode
protected boolean viewChangedByUser
protected int viewHeight
protected float viewRotX
protected float viewRotY
protected float viewRotZ
protected int viewWidth
protected int viewX
protected int viewY
Constructor Detail |
---|
public GLFEMRenderer()
xMid,
- the x-value which should be moved to the middle of the screenyMid,
- the y-value which should be moved to the middle of the screenpublic GLFEMRenderer(double xMid, double yMid)
xMid,
- the x-value which should be moved to the middle of the screenyMid,
- the y-value which should be moved to the middle of the screenMethod Detail |
---|
public void display(GLDrawable drawable)
drawable,
- the main GLDrawable given by OpenGLpublic void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged)
drawable
- modeChanged
- deviceChanged
- protected abstract void drawContents(GLDrawable drawable)
drawable,
- the main GLDrawable given by OpenGLprotected void drawCoordSystem(GLDrawable drawable)
drawable,
- the main GLDrawable given by OpenGLpublic void init(GLDrawable drawable)
drawable,
- the main GLDrawable given by OpenGLpublic void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
e,
- the key eventpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
e,
- the mouse eventpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
e,
- the mouse eventpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
e,
- the mouse eventpublic void reshape(GLDrawable drawable, int x, int y, int w, int h)
drawable,
- the main GLDrawable given by OpenGLx,
- the x-value of the viewy,
- the y-value of the vieww,
- the width of the viewh,
- the height of the viewprotected void setMidPointFromNodes()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |