|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ericsson.tic.vi.Renderer
public class Renderer
This class handles all OpenGL calls and rendering.
| Field Summary | |
|---|---|
Camera |
camera
The camera associated with the view which is being rendered. |
private float[] |
diffuseMaterial
Used for shading/lighting. |
GLAutoDrawable |
drawableForAnimator
A drawable. |
private float[] |
fogColor
Used for shading/lighting. |
NumberFormat |
form
Specifies the number formatting of floats. |
GL |
gl
The OpenGL rendering context. |
float |
globeRadius
Globe radius. |
GLU |
glu
The GLU rendering context. |
GLUT |
glut
A glut rendering context. |
protected int |
id
The renderer id. |
private TextRenderer |
labelTextRenderer
A text renderer field. |
private float[] |
lightAmbient0
Used for shading/lighting. |
private float[] |
lightAmbient1
Used for shading/lighting. |
private float[] |
lightDiffuse0
Used for shading/lighting. |
private float[] |
lightDiffuse1
Used for shading/lighting. |
private float[] |
lightPos0
Used for shading/lighting. |
private float[] |
lightPos1
Used for shading/lighting. |
private float[] |
lightSpecular0
Used for shading/lighting. |
private float[] |
lightSpecular1
Used for shading/lighting. |
private int |
limitedRenderCounter
A counter used for the limit rendering functionality. |
(package private) float[] |
lineWidthRanges
An array with the allowed line width ranges of this OGL environment. |
private float[] |
matSpecular
Used for shading/lighting. |
int |
nodeMoveCounter
A counter for node movement. |
float |
planeScale
Scale of the plane. |
private ViewPanel |
pv
The parent panel of this renderer. |
GLUquadric |
quadric
A GLUquadric. |
boolean |
readyForAnimator
Used by animator. |
private float |
skyboxRotation
The rotation angle of the skybox. |
private TextRenderer |
textRenderer
A text renderer field. |
| Constructor Summary | |
|---|---|
Renderer(int id,
Camera camera,
ViewPanel parentView)
Sets up a renderer. |
|
| Method Summary | |
|---|---|
void |
billboardCheatSphericalBegin()
Renders objects so they are facing the camera head on (billboarding). |
void |
billboardCheatSphericalEnd()
Renders objects so they are facing the camera head on (billboarding). |
void |
display(GLAutoDrawable drawable)
Called by the OpenGL rendering engine every time the scene is redrawn. |
void |
displayChanged(GLAutoDrawable drawable,
boolean modeChanged,
boolean deviceChanged)
Called by the OpenGL rendering engine when the window is resized. |
private void |
drawBackPlane(boolean picking)
Draws a neutral background for the plane view to block the stars. |
void |
drawBezierCurve(float[] start,
float[] controlStart,
float[] end,
float[] controlEnd,
float[] color4f)
Draws a bezier curve. |
void |
drawBezierCurve(FloatBuffer points,
float[] color4f)
Draws a bezier curve. |
void |
drawBrushingMarkers()
Draw brushingMarkers |
void |
drawCumulativeBar(GraphNode node,
int barType,
float[][] height,
float[][] color3f)
Draws a cumulative bar |
void |
drawCumulativeBars()
Draw all cumulative bars |
void |
drawFloatingWindow(GraphNode node,
boolean picking)
Draws a floating window. |
void |
drawFloatingWindowCloseButton(float[] pos,
byte[] pickingID,
boolean picking)
Draws the closing button for the floating window. |
void |
drawFloatingWindowFrame(GraphNode node,
float[] pos,
boolean picking,
float[] frameColor,
float[] borderColor,
float width,
float height)
Draws a floating window frame. |
private void |
drawGlobe(boolean picking)
Draws a globe. |
void |
drawHistogram(float[] pos,
float width,
float height,
boolean ordered,
float[][] values,
float[][] realValues,
float[][] color3f)
Draws a histogram. |
void |
drawLabels(boolean picking)
Draws all labels. |
private void |
drawNav()
Draws three balls which show the axes to make navigation easier in debug mode. |
void |
drawNodeLabel(GraphNode node,
boolean picking)
Draws a node label. |
private void |
drawNodes(boolean picking)
Draws the nodes. |
void |
drawPickingView()
Draws the pickable and blocking objects only. |
private void |
drawPlane(boolean picking)
Draws a plane. |
private void |
drawRelations(boolean picking)
Draws all relations (lines). |
private void |
drawScene(GLAutoDrawable drawable)
Draws the scene. |
private void |
drawSkybox()
Draw the skybox. |
void |
drawView()
Draws the objects specific to this view. |
float[][] |
getCategoryColors(int i)
Retrieve the colors used for categories. |
boolean |
hasPositiveValue(float[][][] v,
int node,
int cat)
Determine if the array has any positive values. |
void |
init(GLAutoDrawable drawable)
Called by the OpenGL rendering engine when the scene is initated. |
void |
loadTextures()
Load all predefined textures. |
void |
pick()
Handles picking (selection) of objects using a color based algorithm. |
void |
reshape(GLAutoDrawable drawable,
int x,
int y,
int width,
int height)
Called by the OpenGL rendering engine when the scene is reshaped when the window is resized. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public Camera camera
public float globeRadius
public float planeScale
public int nodeMoveCounter
protected int id
private float skyboxRotation
public GL gl
public GLU glu
public GLUT glut
public GLUquadric quadric
private ViewPanel pv
private TextRenderer textRenderer
private TextRenderer labelTextRenderer
public boolean readyForAnimator
public GLAutoDrawable drawableForAnimator
public NumberFormat form
float[] lineWidthRanges
private int limitedRenderCounter
private float[] diffuseMaterial
private float[] matSpecular
private float[] lightAmbient0
private float[] lightDiffuse0
private float[] lightSpecular0
private float[] lightPos0
private float[] lightAmbient1
private float[] lightDiffuse1
private float[] lightSpecular1
private float[] lightPos1
private float[] fogColor
| Constructor Detail |
|---|
public Renderer(int id,
Camera camera,
ViewPanel parentView)
camera - The camera associated with the view.id - The renderer id.parentView - The parent ViewPanel of this renderer.| Method Detail |
|---|
public void init(GLAutoDrawable drawable)
init in interface GLEventListenerdrawable - The Drawable.public void display(GLAutoDrawable drawable)
display in interface GLEventListenerdrawable - The Drawable.private void drawScene(GLAutoDrawable drawable)
drawable - The Drawable.public void drawView()
public void drawLabels(boolean picking)
picking - if true, renders using the picking color.
public void drawNodeLabel(GraphNode node,
boolean picking)
node - The node which this label is associated with.picking - if true, renders using the picking color.private void drawGlobe(boolean picking)
picking - if true, renders using the picking color.private void drawPlane(boolean picking)
picking - if true, renders using the picking color.private void drawBackPlane(boolean picking)
picking - if true, renders using the picking color.private void drawSkybox()
private void drawNav()
private void drawNodes(boolean picking)
picking - if true, renders using the picking color.private void drawRelations(boolean picking)
picking - if true, renders using the picking color.public void drawCumulativeBars()
public void drawCumulativeBar(GraphNode node,
int barType,
float[][] height,
float[][] color3f)
node - A node.barType - The type of the bar. this is a value between 0 and 9.height - The expected height of the bar.color3f - An array of colors to represent the multiple dimensional (cumulative) bar.public void drawBrushingMarkers()
public boolean hasPositiveValue(float[][][] v,
int node,
int cat)
v - An array of values.
public void drawFloatingWindowFrame(GraphNode node,
float[] pos,
boolean picking,
float[] frameColor,
float[] borderColor,
float width,
float height)
node - The node this floating window is tied to.pos - the position of the floating window in 3D-space.picking - if true, renders using the picking color.frameColor - The color of the frame.borderColor - The color of the border.width - the width of the floating window.height - the height of the floating window.
public void drawFloatingWindowCloseButton(float[] pos,
byte[] pickingID,
boolean picking)
pos - the relative position of the button in 3D-space.picking - if true, renders using the picking color.pickingID - A list of picking ID's.
public void drawFloatingWindow(GraphNode node,
boolean picking)
node - The node this floating window is tied to.picking - if true, renders using the picking color.
public void drawHistogram(float[] pos,
float width,
float height,
boolean ordered,
float[][] values,
float[][] realValues,
float[][] color3f)
pos - the position of the histogram in 3D-space.ordered - Set to true to have bars ordered. (deprecated)values - Values to be used for building up the componenets of the bars.realValues - the real values used for the labels.color3f - The color of the border.width - the width of the floating window.height - the height of the floating window.
public void drawBezierCurve(float[] start,
float[] controlStart,
float[] end,
float[] controlEnd,
float[] color4f)
start - point controlling the bezier curve.controlStart - point controlling the bezier curve.end - point controlling the bezier curve.controlEnd - point controlling the bezier curve.color4f - the color of the curve.
public void drawBezierCurve(FloatBuffer points,
float[] color4f)
points - Control points for the bezier curve.color4f - the color of the curve.public void billboardCheatSphericalBegin()
public void billboardCheatSphericalEnd()
public void loadTextures()
public float[][] getCategoryColors(int i)
i - An index denoting the category set.public void pick()
public void drawPickingView()
public void displayChanged(GLAutoDrawable drawable,
boolean modeChanged,
boolean deviceChanged)
displayChanged in interface GLEventListener
public void reshape(GLAutoDrawable drawable,
int x,
int y,
int width,
int height)
reshape in interface GLEventListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||