|
NCSA Portfolio | ||||||||
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 | +--javax.media.j3d.Canvas3D | +--ncsa.j3d.ui.record.RecordableCanvas3D
RecordableCanvas3D can be used to dump JPEG files of the canvas contents. The image dump occurs during the postSwap() method call and is done automatically in Java 3D. By default, files are dumped into a directory called "frames", and have a prefix of "image" with the frame number as the suffix.
This is meant to be used as a drop-in replacement for Canvas3D.
Fields inherited from class javax.media.j3d.Canvas3D |
FIELD_ALL,
FIELD_LEFT,
FIELD_RIGHT |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
RecordableCanvas3D(java.awt.GraphicsConfiguration graphicsConfiguration)
Constructs and initializes a new RecordableCanvas3D object that Java 3D can render into. |
|
RecordableCanvas3D(java.awt.GraphicsConfiguration graphicsConfiguration,
boolean bRepaint)
Constructs and initializes a new RecordableCanvas3D object that Java 3D can render into. |
Method Summary | |
void |
allocImage()
Allocates the image based on the width and height of the canvas, or the size specified by setImageSize. |
void |
captureInPostRender(boolean b)
Sets a flag about whether to do capturing in postRender instead of in postSwap. |
java.lang.String |
getDirectoryName()
Returns the directory name where files will written |
java.lang.String |
getFilePrefix()
Returns the file name prefix |
void |
Notify()
notifies the people who have called rendezvous |
void |
postRender()
This routine is called by Java 3D automatically after completing all rendering to the canvas, but before the buffer swap. |
void |
postSwap()
This routine is called by Java 3D automatically after completing all rendering to the canvas, following the buffer swap. |
void |
rendezvous()
This is used by the Record/Replay scripting mechanisms to prevent transformations from being updated during the time it takes to write files. |
void |
setDirectoryName(java.lang.String dir)
Sets the directory name to write to |
void |
setFilePrefix(java.lang.String prefix)
Sets the file name prefix |
void |
startRecording()
Start dumping frames on the next call to postSwap() |
void |
stopRecording()
turns recording off |
void |
takeSnapshot()
Dump a single frame on the next call to postSwap(), using the default filename |
void |
takeSnapshot(java.lang.String filename)
Dump a single frame on the next call to postSwap(), using the given filename |
void |
writeImage(java.lang.String imagename,
java.awt.image.BufferedImage image)
Writes a JPEG file for the specified BufferedImage |
Methods inherited from class javax.media.j3d.Canvas3D |
addNotify,
getCenterEyeInImagePlate,
getDoubleBufferAvailable,
getDoubleBufferEnable,
getGraphicsContext3D,
getImagePlateToVworld,
getLeftEyeInImagePlate,
getLeftManualEyeInImagePlate,
getPhysicalHeight,
getPhysicalWidth,
getPixelLocationInImagePlate,
getRightEyeInImagePlate,
getRightManualEyeInImagePlate,
getSceneAntialiasingAvailable,
getScreen3D,
getStereoAvailable,
getStereoEnable,
getView,
getVworldToImagePlate,
paint,
preRender,
removeNotify,
renderField,
setDoubleBufferEnable,
setLeftEyeInImagePlate,
setLeftManualEyeInImagePlate,
setRightEyeInImagePlate,
setRightManualEyeInImagePlate,
setStereoEnable,
startRenderer,
stopRenderer,
swap |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
contains,
contains,
createImage,
createImage,
deliverEvent,
disable,
dispatchEvent,
doLayout,
enable,
enable,
enableInputMethods,
getAlignmentX,
getAlignmentY,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentAt,
getComponentAt,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getMaximumSize,
getMinimumSize,
getName,
getParent,
getPeer,
getPreferredSize,
getSize,
getSize,
getToolkit,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
invalidate,
isDisplayable,
isDoubleBuffered,
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,
paintAll,
postEvent,
preferredSize,
prepareImage,
prepareImage,
print,
printAll,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
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,
update,
validate |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public RecordableCanvas3D(java.awt.GraphicsConfiguration graphicsConfiguration)
graphicsConfiguration
- a valid GraphicsConfiguration object
which will be used to create the canvaspublic RecordableCanvas3D(java.awt.GraphicsConfiguration graphicsConfiguration, boolean bRepaint)
graphicsConfiguration
- a valid GraphicsConfiguration object
which will be used to create the canvasbRepaint
- set to false to prevent repainting during snapshotsMethod Detail |
public void captureInPostRender(boolean b)
public void setDirectoryName(java.lang.String dir)
public java.lang.String getDirectoryName()
public void setFilePrefix(java.lang.String prefix)
public java.lang.String getFilePrefix()
public void allocImage()
public void startRecording()
public void takeSnapshot(java.lang.String filename)
public void takeSnapshot()
public void postSwap()
public void postRender()
public void writeImage(java.lang.String imagename, java.awt.image.BufferedImage image)
filename
- the file name to write toimage
- the BufferedImage to write as a JPEG filepublic void rendezvous()
none
- public void stopRecording()
public void Notify()
|
NCSA Portfolio | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |