|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
| Method Summary | |
void |
addKeyListener(java.awt.event.KeyListener l)
|
void |
addLight(double x,
double y,
double z,
double r,
double g,
double b)
Adds light source with direction (x, y, z) & color (r, g, b). |
Widget |
addMenu(java.lang.String label,
int x,
int y)
adds a menu widget |
void |
addMenu(Widget menu)
adds a menu |
void |
addMouseListener(java.awt.event.MouseListener l)
|
void |
addMouseMotionListener(java.awt.event.MouseMotionListener l)
|
void |
addMouseWheelListener(java.awt.event.MouseWheelListener l)
|
java.awt.Image |
createImage(java.awt.image.ImageProducer producer)
|
java.awt.Image |
createImage(int width,
int height)
|
double |
getCurrentTime()
returns the current system time in seconds |
double |
getFL()
focal length |
double |
getFOV()
field of view |
Geometry |
getGeometry(int x,
int y)
Returns the Geometry of the frontmost object at the point (x, y) in the image (like a z-buffer value of geometries). |
boolean |
getGeometryBuffer()
status of the geometry z-buffer, for object picking |
int |
getHeight()
returns the height of the component |
int |
getLod()
level of detail |
Matrix[] |
getMatrix()
the matrix stack |
boolean |
getOutline()
get status of flag which produces the sketch-line drawing rendition of the scene |
int[] |
getPix()
the pixel array |
boolean |
getPoint(int x,
int y,
double[] xyz)
Returns the location in world space of the point (x, y) on the screen. |
Renderable |
getRenderable()
(@link Renderable} Renderable |
Renderer |
getRenderer()
Rendererobject |
boolean |
getTableMode()
flag that determines whether the normal tables should beprecomputed |
int |
getWidth()
the Component's width |
Geometry |
getWorld()
the root world geometry |
void |
identity()
Sets current matrix to the identity matrix. |
void |
init()
Initializes the renderer and internal variables; to initialize your model see Renderable.initialize() |
boolean |
isDragging()
Returns whether dragging is active or not. |
Matrix |
m()
Returns the matrix at the top of the stack. |
Widget |
menu(int i)
returns the menu at index i |
void |
mouseClicked(java.awt.Event e,
int x,
int y)
|
void |
mouseDragged(java.awt.Event e,
int x,
int y)
|
void |
mouseEntered(java.awt.Event e,
int x,
int y)
|
void |
mouseExited(java.awt.Event e,
int x,
int y)
|
void |
mouseMoved(java.awt.Event e,
int x,
int y)
|
void |
mousePressed(java.awt.Event e,
int x,
int y)
|
void |
mouseReleased(java.awt.Event e,
int x,
int y)
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e,
int rotation)
|
void |
pause()
pauses the renderer thread |
void |
pop()
Pops the top matrix from the stack. |
boolean |
processCommand(int key)
Handles commands received (generally for unicode commands from the KeyListener, but also for commands from any other sources, like buttons from webpages) : various default control keys to modify render style (Use CTRL + key). |
int |
pull(Geometry s,
double x0,
double x1,
double x2,
double y0,
double y1,
double y2,
double z0,
double z1,
double z2)
Deforms a geometric shape according to the beginning, middle, and end parameters in each dimension. |
void |
push()
Pushes a copy of the top matrix onto the stack. |
void |
recalculateSize(int width,
int height)
called upon a resize of the component |
void |
refresh()
Forces a refresh of the renderer. |
void |
removeKeyListener(java.awt.event.KeyListener l)
|
void |
removeMenu(Widget menu)
removes a particular menu |
void |
removeMouseListener(java.awt.event.MouseListener l)
|
void |
removeMouseMotionListener(java.awt.event.MouseMotionListener l)
|
void |
repaint()
repaint the component |
void |
rotateView(double theta,
double phi)
Rotate angle of view. |
void |
rotateX(double t)
Rotates the top matrix around the X axis by angle t (radians). |
void |
rotateY(double t)
Rotates the top matrix around the Y axis by angle t (radians). |
void |
rotateZ(double t)
Rotates the top matrix around the Z axis by angle t (radians). |
void |
scale(double x,
double y,
double z)
Scales the top matrix by x, y, z in their respective dimensions. |
void |
setBgColor(double r,
double g,
double b)
Sets the background color ( RGB values range: 0..1). |
void |
setDragging(boolean value)
If the user is interactively dragging the mouse, we want the renderer to know about it, so that any other background process (eg: a material which is building a lookup table) can ask the renderer, and thereby avoid consuming scarce CPU resources simultaneously. |
void |
setFL(double value)
Sets the camera's focal length. |
void |
setFOV(double value)
Sets the field of view value. |
void |
setGeometryBuffer(boolean value)
enables/disables the geometry z-buffer, for object picking |
void |
setLod(int value)
set the level of detail |
void |
setOutline(boolean value)
toggle outline mode |
void |
setRenderable(Renderable renderable)
set the renderable object |
void |
setTableMode(boolean value)
toggle table lookup mode and precomputation |
void |
showMesh(boolean value)
toggle the wireframe view of the world |
void |
start()
starts the renderer thread |
void |
transform(Geometry s)
Applies the top transformation matrix to Geometry s. |
void |
translate(double[] v)
Translates the top matrix by vector v. |
void |
translate(double x,
double y,
double z)
Translates the top matrix by vector v. |
Widget |
widgetAt(int x,
int y)
returns the widget at x, y |
| Method Detail |
public void addKeyListener(java.awt.event.KeyListener l)
public void addLight(double x,
double y,
double z,
double r,
double g,
double b)
Renderer.addLight(double x,double y,double z, double r,double
g,double b)
public Widget addMenu(java.lang.String label,
int x,
int y)
label - x - y -
public void addMenu(Widget menu)
menu - public void addMouseListener(java.awt.event.MouseListener l)
public void addMouseMotionListener(java.awt.event.MouseMotionListener l)
public void addMouseWheelListener(java.awt.event.MouseWheelListener l)
public java.awt.Image createImage(java.awt.image.ImageProducer producer)
public java.awt.Image createImage(int width,
int height)
public Geometry getGeometry(int x,
int y)
x - x coordinate in the imagey - y coordinate in the image
public double getCurrentTime()
public double getFOV()
public double getFL()
public boolean getGeometryBuffer()
public int getHeight()
public int getLod()
public Matrix[] getMatrix()
public int[] getPix()
public boolean getOutline()
public boolean getPoint(int x,
int y,
double[] xyz)
x - x coordinate in the imagey - y coordinate in the image
public Renderable getRenderable()
public Renderer getRenderer()
Rendererobject
public boolean getTableMode()
public int getWidth()
public Geometry getWorld()
public void identity()
public void init()
Renderable.initialize()
#Renderable.initialize()public boolean isDragging()
public Matrix m()
public Widget menu(int i)
i -
public void mouseClicked(java.awt.Event e,
int x,
int y)
public void mouseDragged(java.awt.Event e,
int x,
int y)
public void mouseEntered(java.awt.Event e,
int x,
int y)
public void mouseExited(java.awt.Event e,
int x,
int y)
public void mouseMoved(java.awt.Event e,
int x,
int y)
public void mousePressed(java.awt.Event e,
int x,
int y)
public void mouseReleased(java.awt.Event e,
int x,
int y)
public void mouseWheelMoved(java.awt.event.MouseWheelEvent e,
int rotation)
public void pause()
public void pop()
public int pull(Geometry s,
double x0,
double x1,
double x2,
double y0,
double y1,
double y2,
double z0,
double z1,
double z2)
0 - beginning, 1 - middle, 2 - end. To indicate infinity (a constant transformation) set two adjacent parameters to the same value. Setting all three parameters to the same value transforms the shape geometry consistently across the entire axis of the parameters.
s - shape object to be deformedx0 - location of beginning of deformation along the x axisx1 - location of beginning of deformation along the x axisx2 - location of beginning of deformation along the x axisy0 - location of beginning of deformation along the y axisy1 - location of beginning of deformation along the y axisy2 - location of beginning of deformation along the y axisz0 - location of beginning of deformation along the z axisz1 - location of beginning of deformation along the z axisz2 - location of beginning of deformation along the z axis
Geometry.pull(render.Matrix, double, double, double, double, double, double, double, double, double)public void push()
public boolean processCommand(int key)
'e' - toggles showMesh(boolean), that just displays
the shapes as mesh wireframes
'l' - toggles getOutline() which produces a
sketch-line drawing rendition of the scene
'm' - toggles #seeMesh which determines mesh
visibility
't' - toggles global texture manipulation method (MIP on/off) (@link Texture#useMIP)
key - value of the key released
public void removeMenu(Widget menu)
menu -
public void recalculateSize(int width,
int height)
width - height - public void refresh()
public void removeKeyListener(java.awt.event.KeyListener l)
public void removeMouseListener(java.awt.event.MouseListener l)
public void removeMouseMotionListener(java.awt.event.MouseMotionListener l)
public void repaint()
public void rotateView(double theta,
double phi)
theta - phi - public void rotateX(double t)
t - angle in radianspublic void rotateY(double t)
t - angle in radianspublic void rotateZ(double t)
t - angle in radians
public void scale(double x,
double y,
double z)
x - x scale factory - y scale factorz - z scale factor
public void setBgColor(double r,
double g,
double b)
r - red component 0..1g - green component 0..1b - blue component 0..1public void setDragging(boolean value)
public void setFL(double value)
value - focal lengthpublic void setFOV(double value)
value - public void setGeometryBuffer(boolean value)
value - on/offpublic void setLod(int value)
value - public void setOutline(boolean value)
value - public void setRenderable(Renderable renderable)
renderable - public void setTableMode(boolean value)
value - public void showMesh(boolean value)
value - public void start()
public void transform(Geometry s)
Geometry s.
s - Geometry object
public void translate(double x,
double y,
double z)
x - translation along the x axisy - translation along the y axisz - translation along the z axispublic void translate(double[] v)
v - an array of three doubles representing translations
in the x,y,z directions.
public Widget widgetAt(int x,
int y)
x - y -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||