|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvisualize.VisCanvas
public class VisCanvas
The Class VisCanvas
is used for the Open-GL drawing. It defines the viewing properties and reacts on user-changes to viewing properties. Also slicing is done here directly and the functions for raycasting (in the RayCasting
class) are called here.
Field Summary | |
---|---|
static int |
ACCUMULATE
|
static int |
canvasHeight
|
static int |
canvasPOTHeight
|
static int |
canvasPOTWidth
|
static int |
canvasWidth
|
static float |
EYE_X_INIT
|
static float |
EYE_Y_INIT
|
static float |
EYE_Z_INIT
|
static int |
GRADIENT_TEX
|
static int |
MIP
|
static float |
ROTATE_X_INIT
|
static float |
ROTATE_Y_INIT
|
static float |
ROTATE_Z_INIT
|
static int |
SLICING
|
static int |
VOLUME_TEX
|
static int |
X_DIR
|
static int |
Y_DIR
|
static int |
Z_DIR
|
Constructor Summary | |
---|---|
VisCanvas()
Creates a new VisCanvas - object. |
Method Summary | |
---|---|
void |
changeDirection(int direction)
Sets the viewing direction. |
void |
display(javax.media.opengl.GLAutoDrawable drawable)
Main Open-GL-loop. |
void |
displayChanged(javax.media.opengl.GLAutoDrawable drawable,
boolean modeChanged,
boolean deviceChanged)
Empty function. |
void |
flushCamera()
Resets the viewing properties to the initial values. |
Volume |
getVolume()
Returns the Volume binded to the VisCanvas |
void |
init(javax.media.opengl.GLAutoDrawable drawable)
Inits basic Open-GL-settings. |
void |
reshape(javax.media.opengl.GLAutoDrawable drawable,
int x,
int y,
int width,
int height)
Called when the size of the VisCanvas changes and adapts the size of the rendered content corresponding to the new VisCanvas-size. |
void |
rotateObject(int x,
int y)
Rotates the cameraposition. |
void |
saveImage(java.lang.String fileName)
Saves the current rendered Open-GL-drawing to a PNG-File. |
void |
setPlanarView(boolean planarView)
Called when the user switches between planarView and not planarView. |
void |
setRendering(int rendering)
Called when the user switches between slicing and raycasting. |
static void |
setSliceShader(int sp)
Defines the shader-program that is used for rendering the slices. |
void |
setTexCoord(int coord)
Set the x coordinate. |
static void |
setTransTex(int[] tt)
Sets a texture containing opacity values described the transfer-function. |
void |
setVolume(Volume volume)
Binds a Volume to the VisCanvas |
void |
translateObject(int x,
int y)
Translates the cameraposition. |
void |
zoomObject(int direction)
Moves the cameraposition in the specified direction. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int X_DIR
public static final int Y_DIR
public static final int Z_DIR
public static final int SLICING
public static final int MIP
public static final int ACCUMULATE
public static final float EYE_X_INIT
public static final float EYE_Y_INIT
public static final float EYE_Z_INIT
public static final float ROTATE_X_INIT
public static final float ROTATE_Y_INIT
public static final float ROTATE_Z_INIT
public static final int VOLUME_TEX
public static final int GRADIENT_TEX
public static int canvasPOTWidth
public static int canvasPOTHeight
public static int canvasWidth
public static int canvasHeight
Constructor Detail |
---|
public VisCanvas()
Method Detail |
---|
public void setVolume(Volume volume)
volume
- Volume object that should be binded.public Volume getVolume()
public void setTexCoord(int coord)
xCoord
- integer between 0 and 100.public void setRendering(int rendering)
rendering
- integer describing the rendering-type.public void saveImage(java.lang.String fileName)
fileName
- filename of the PNG-File.public void flushCamera()
public void changeDirection(int direction)
direction
- direction in integer form. (Possible directions: x-, y- and z-direction).public void display(javax.media.opengl.GLAutoDrawable drawable)
display
in interface javax.media.opengl.GLEventListener
public void displayChanged(javax.media.opengl.GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged)
displayChanged
in interface javax.media.opengl.GLEventListener
public void init(javax.media.opengl.GLAutoDrawable drawable)
init
in interface javax.media.opengl.GLEventListener
public void zoomObject(int direction)
direction
- direction in integer-formpublic void translateObject(int x, int y)
x
- the translation-value in x-direction (in integer form).y
- the translation-value in y-direction (in integer form).public void rotateObject(int x, int y)
x
- the rotation-value in x-direction (in integer form).y
- the rotation-value in y-direction (in integer form).public void reshape(javax.media.opengl.GLAutoDrawable drawable, int x, int y, int width, int height)
reshape
in interface javax.media.opengl.GLEventListener
public void setPlanarView(boolean planarView)
planarView
- boolean if this parameter is true the slice will be parallel to the screen.public static void setSliceShader(int sp)
sp
- integer that identifies the shader-programepublic static void setTransTex(int[] tt)
tt
- opacity values in integer-form.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |