Contents | Package | Class | Tree | Deprecated | Index | Help
PREV | NEXT SHOW LISTS | HIDE LISTS

Class edu.calpoly.smetzger.j3d.loaders.UniverseCanvas

java.lang.Object
    |
    +----java.awt.Component
            |
            +----java.awt.Container
                    |
                    +----java.awt.Panel
                            |
                            +----edu.calpoly.smetzger.j3d.loaders.UniverseCanvas

public class UniverseCanvas
extends java.awt.Panel

Fields inherited from class java.awt.Component
 BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 

Constructor Summary
 UniverseCanvas()
Construct a canvas with universe as in Sun's ObjLoad example
 

Method Summary
void  readFile(java.lang.String filename)
Read the given filename.
void  renderFastest()
Set the Coloring attributes of all the shapes to ColoringAttributes.FASTEST
void  renderFlat()
Set the Coloring attributes of all the shapes to ColoringAttributes.SHADE_FLAT
void  renderGouraud()
Set the Coloring attributes of all the shapes to ColoringAttributes.SHADE_GOURAUD
void  renderLines()
Set the Polygon attributes of all the shapes to PolygonAttributes.POLYGON_LINE
void  renderNicest()
Set the Coloring attributes of all the shapes to ColoringAttributes.NICEST
void  renderPoints()
Set the Polygon attributes of all the shapes to PolygonAttributes.POLYGON_POINT
void  renderSolids()
Set the Polygon attributes of all the shapes to PolygonAttributes.POLYGON_FILL
void  setLightLevel(float level)
 
 
Methods inherited from class java.awt.Panel
 addNotify
 
Methods inherited from class java.awt.Container
 add, add, add, add, add, addContainerListener, addImpl, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setLayout, update, validate, validateTree
 
Methods inherited from class java.awt.Component
 action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getColorModel, getComponentAt, getComponentAt, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniverseCanvas

public UniverseCanvas()
Construct a canvas with universe as in Sun's ObjLoad example
Method Detail

readFile

public void readFile(java.lang.String filename)
Read the given filename. This method only supports .obj and .nff files
Parameters:
filename - name of the file to read in. Note: if there is a material file it must be in the same directory as the Objfile

setLightLevel

public void setLightLevel(float level)

renderFlat

public void renderFlat()
Set the Coloring attributes of all the shapes to ColoringAttributes.SHADE_FLAT

renderGouraud

public void renderGouraud()
Set the Coloring attributes of all the shapes to ColoringAttributes.SHADE_GOURAUD

renderFastest

public void renderFastest()
Set the Coloring attributes of all the shapes to ColoringAttributes.FASTEST

renderNicest

public void renderNicest()
Set the Coloring attributes of all the shapes to ColoringAttributes.NICEST

renderPoints

public void renderPoints()
Set the Polygon attributes of all the shapes to PolygonAttributes.POLYGON_POINT

renderLines

public void renderLines()
Set the Polygon attributes of all the shapes to PolygonAttributes.POLYGON_LINE

renderSolids

public void renderSolids()
Set the Polygon attributes of all the shapes to PolygonAttributes.POLYGON_FILL

Contents | Package | Class | Tree | Deprecated | Index | Help
PREV | NEXT SHOW LISTS | HIDE LISTS