|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--nl.kun.Engine3D.TPhysCanvas
A canvas that can be used to display all items inherited from TEntity3D
. The camera is set
with the following constructor input: (0,0,10, 0,0,-1,0,1,0); A 10 points Times new roman
font is used for all string output.
All TEntity3D
's should be appended with the function Append().
Inner classes inherited from class java.awt.Component |
java.awt.Component.AWTTreeLock |
Field Summary | |
TCamera3D |
camera
A camera object, on which the scenery is projected |
boolean |
threadSuspended
Flag to determine if the thread is Suspended or not |
Fields inherited from class java.awt.Component |
actionListenerK,
adjustmentListenerK,
appContext,
background,
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
componentListener,
componentListenerK,
componentOrientation,
containerListenerK,
cursor,
dropTarget,
enabled,
eventMask,
focusListener,
focusListenerK,
font,
foreground,
hasFocus,
height,
incRate,
inputMethodListener,
inputMethodListenerK,
isInc,
isPacked,
itemListenerK,
keyListener,
keyListenerK,
LEFT_ALIGNMENT,
locale,
LOCK,
minSize,
mouseListener,
mouseListenerK,
mouseMotionListener,
mouseMotionListenerK,
newEventsOnly,
ownedWindowK,
parent,
peer,
peerFont,
popups,
prefSize,
RIGHT_ALIGNMENT,
textListenerK,
TOP_ALIGNMENT,
valid,
visible,
width,
windowListenerK,
x,
y |
Constructor Summary | |
TPhysCanvas(double _Xmin,
double _Ymin,
double _Xmax,
double _Ymax)
Constructor This canvas resizes itself to the maximum area it gets from the applet, so no need to input a pixel height and width Input variables determine the rectangle in physical coordinates that can be shown at Z=0 in camera coordinate system. |
Method Summary | |
void |
Append(TEntity3D _ent)
Appends a TEntity3D object to the objectlist of the canvas. |
boolean |
bufferDraw()
Called by the user to draw the simulation to an offline buffer if there are any buffers ready. |
java.lang.String |
BufferDrawn2String()
Used for debugging. |
java.lang.String |
BufferReady2String()
Used for debugging. |
void |
initGraphics()
Initialize all the graphics. |
void |
paint(java.awt.Graphics g)
This function paint the buffer to the screen if an offline buffer is ready. |
void |
redraw()
This function calls the paint() with a graphics object it gets from the canvas. |
void |
setActive()
Activates the simulation. |
void |
setInactive()
Deactivates the simulation. |
void |
update(java.awt.Graphics g)
Called by JVM to redraw the canvas when necessary. |
Methods inherited from class java.awt.Canvas |
|
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
areInputMethodsEnabled,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
deliverEvent,
disable,
disableEvents,
dispatchEvent,
dispatchEventImpl,
doLayout,
enable,
enable,
enableEvents,
enableInputMethods,
eventEnabled,
firePropertyChange,
getAlignmentX,
getAlignmentY,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentAt,
getComponentAt,
getComponentOrientation,
getCursor,
getDropTarget,
getFont_NoClientCode,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getIntrinsicCursor,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getMaximumSize,
getMinimumSize,
getName,
getNativeContainer,
getParent_NoClientCode,
getParent,
getPeer,
getPreferredSize,
getSize,
getSize,
getToolkit,
getToolkitImpl,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
invalidate,
isDisplayable,
isDoubleBuffered,
isEnabled,
isEnabledImpl,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
layout,
lightweightPrint,
list,
list,
list,
list,
list,
locate,
location,
lostFocus,
minimumSize,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
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,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setFont,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus,
validate |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public TCamera3D camera
public boolean threadSuspended
Constructor Detail |
public TPhysCanvas(double _Xmin, double _Ymin, double _Xmax, double _Ymax)
_Xmin
- The minimum X value at Z=0 that can be displayed on screen._Ymin
- The minimum Y value at Z=0 that can be displayed on screen._Xmax
- The maximum X value at Z=0 that can be displayed on screen._Ymax
- The maximum Y value at Z=0 that can be displayed on screen.Method Detail |
public void paint(java.awt.Graphics g)
public void redraw()
public void update(java.awt.Graphics g)
public void setActive()
public void setInactive()
public boolean bufferDraw()
public void initGraphics()
start()
subroutine of the applet,
everytime the physical boundaries of the canvas are changed,
or if you want to reset the buffers.public void Append(TEntity3D _ent)
public java.lang.String BufferReady2String()
public java.lang.String BufferDrawn2String()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |