graphics.ddd
Class Applet3d
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
graphics.ddd.Applet3d
- All Implemented Interfaces:
- Rotatable, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
public class Applet3d
- extends java.applet.Applet
- implements Rotatable
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class java.awt.Component |
java.awt.Component.BaselineResizeBehavior |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary |
Applet3d(int width,
int height)
|
Method Summary |
void |
addLight(Vector3d v,
int mode,
int intensity)
|
void |
addNode(int objectNr,
float x,
float y,
float z)
|
void |
addNode(int objectNr,
graphics.ddd.Node t)
|
void |
addObject(int rendermode,
int color)
|
void |
addTexture(java.awt.Image img)
|
void |
addTriangle(int objectNr,
int p1,
int p2,
int p3)
|
float |
crop(float a,
float b,
float c)
|
int |
crop(int a,
int b,
int c)
|
graphics.ddd.Matrix4x4 |
crossproduct(graphics.ddd.Matrix4x4 a,
graphics.ddd.Matrix4x4 b)
|
void |
generateField(float[][] data,
int xmax,
int ymax,
int rm,
int c)
|
void |
generateRotationObject(int obj,
int steps)
|
void |
generateScanObject(int obj,
int rows,
int cols)
|
java.lang.String |
getFPS(int frames)
|
int |
getIntColor(int r,
int g,
int b)
|
Vector3d |
getNormal(Vector3d a,
Vector3d b,
Vector3d c)
|
boolean |
inrange(float a,
float b,
float c)
|
boolean |
inrange(int a,
int b,
int c)
|
Vector3d |
matrixvectorproduct(graphics.ddd.Matrix4x4 b,
Vector3d a)
|
void |
myResize(int width,
int height)
|
Vector3d |
normalize(Vector3d v)
|
java.awt.Image |
renderScene()
|
float |
rnd()
|
int |
rndColor()
|
graphics.ddd.Node |
rndNode()
|
Vector3d |
rndVector()
|
graphics.ddd.Matrix4x4 |
rotateMatrix(float dx,
float dy,
float dz)
|
void |
rotateObject(int o,
float dx,
float dy,
float dz)
|
void |
rotateObject(int obj,
float px,
float py,
float pz,
float dx,
float dy,
float dz)
|
void |
rotateObjectWorld(int o,
float dx,
float dy,
float dz)
|
void |
rotateWorld(float dx,
float dy,
float dz)
|
graphics.ddd.Matrix4x4 |
scaleMatrix(float dx,
float dy,
float dz)
|
void |
scaleObject(int obj,
float d)
|
void |
scaleObject(int o,
float dx,
float dy,
float dz)
|
void |
scaleWorld(float d)
|
void |
scaleWorld(float dx,
float dy,
float dz)
|
void |
setBackground(java.awt.Image TempImage)
|
void |
setEnvironment(java.awt.Image TempImage)
|
void |
setPhong(int p)
|
void |
setStatic()
|
graphics.ddd.Matrix4x4 |
shiftMatrix(float dx,
float dy,
float dz)
|
void |
shiftObject(int o,
float dx,
float dy,
float dz)
|
void |
shiftWorld(float dx,
float dy,
float dz)
|
Vector3d |
vectordist(Vector3d v1,
Vector3d v2)
|
float |
vectorlength(Vector3d v)
|
Methods inherited from class java.applet.Applet |
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, init, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop |
Methods inherited from class java.awt.Panel |
addNotify |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
info
public java.lang.String info
copyright
public java.lang.String copyright
version
public java.lang.String version
build
public java.lang.String build
sysinfo
public java.lang.String sysinfo
object
public graphics.ddd.Object3d[] object
light
public graphics.ddd.Light[] light
texture
public graphics.ddd.Texture[] texture
objects
public int objects
lights
public int lights
textures
public int textures
maxobjects
public int maxobjects
maxlights
public int maxlights
maxtextures
public int maxtextures
bgcolor
public int bgcolor
perspective
public float perspective
zoomcorrection
public float zoomcorrection
ambient
public int ambient
phong
public int phong
reflectivity
public int reflectivity
staticLight
public boolean staticLight
Applet3d
public Applet3d(int width,
int height)
myResize
public void myResize(int width,
int height)
setStatic
public void setStatic()
setPhong
public void setPhong(int p)
crop
public float crop(float a,
float b,
float c)
crop
public int crop(int a,
int b,
int c)
inrange
public boolean inrange(int a,
int b,
int c)
inrange
public boolean inrange(float a,
float b,
float c)
rnd
public float rnd()
rndNode
public graphics.ddd.Node rndNode()
rndVector
public Vector3d rndVector()
rndColor
public int rndColor()
vectordist
public Vector3d vectordist(Vector3d v1,
Vector3d v2)
vectorlength
public float vectorlength(Vector3d v)
normalize
public Vector3d normalize(Vector3d v)
getNormal
public Vector3d getNormal(Vector3d a,
Vector3d b,
Vector3d c)
crossproduct
public graphics.ddd.Matrix4x4 crossproduct(graphics.ddd.Matrix4x4 a,
graphics.ddd.Matrix4x4 b)
matrixvectorproduct
public Vector3d matrixvectorproduct(graphics.ddd.Matrix4x4 b,
Vector3d a)
addObject
public void addObject(int rendermode,
int color)
addLight
public void addLight(Vector3d v,
int mode,
int intensity)
addTexture
public void addTexture(java.awt.Image img)
addTriangle
public void addTriangle(int objectNr,
int p1,
int p2,
int p3)
addNode
public void addNode(int objectNr,
graphics.ddd.Node t)
addNode
public void addNode(int objectNr,
float x,
float y,
float z)
shiftMatrix
public graphics.ddd.Matrix4x4 shiftMatrix(float dx,
float dy,
float dz)
scaleMatrix
public graphics.ddd.Matrix4x4 scaleMatrix(float dx,
float dy,
float dz)
rotateMatrix
public graphics.ddd.Matrix4x4 rotateMatrix(float dx,
float dy,
float dz)
shiftObject
public void shiftObject(int o,
float dx,
float dy,
float dz)
scaleObject
public void scaleObject(int o,
float dx,
float dy,
float dz)
rotateObject
public void rotateObject(int o,
float dx,
float dy,
float dz)
rotateObjectWorld
public void rotateObjectWorld(int o,
float dx,
float dy,
float dz)
rotateObject
public void rotateObject(int obj,
float px,
float py,
float pz,
float dx,
float dy,
float dz)
shiftWorld
public void shiftWorld(float dx,
float dy,
float dz)
scaleWorld
public void scaleWorld(float dx,
float dy,
float dz)
rotateWorld
public void rotateWorld(float dx,
float dy,
float dz)
- Specified by:
rotateWorld
in interface Rotatable
scaleObject
public void scaleObject(int obj,
float d)
scaleWorld
public void scaleWorld(float d)
renderScene
public java.awt.Image renderScene()
getIntColor
public int getIntColor(int r,
int g,
int b)
setBackground
public void setBackground(java.awt.Image TempImage)
setEnvironment
public void setEnvironment(java.awt.Image TempImage)
generateField
public void generateField(float[][] data,
int xmax,
int ymax,
int rm,
int c)
generateScanObject
public void generateScanObject(int obj,
int rows,
int cols)
generateRotationObject
public void generateRotationObject(int obj,
int steps)
getFPS
public java.lang.String getFPS(int frames)