|
|||||||||
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
The Canvas3D class provides a drawing canvas for 3D rendering. It is an extension of the AWT Canvas class that users may further subclass to implement additional functionality. Java 3D will render to all canvases that are attached to an active View object.
Screen3D
,
View
, Serialized FormField Summary | |
static int |
FIELD_ALL
Specifies a single-field rendering loop. |
static int |
FIELD_LEFT
Specifies the left field of a field-sequential stereo rendering loop. |
static int |
FIELD_RIGHT
Specifies the right field of a field-sequential stereo rendering loop. |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
Canvas3D(java.awt.GraphicsConfiguration graphicsConfiguration)
Constructs and initializes a new Canvas3D object that Java 3D can render into. |
Method Summary | |
void |
addNotify()
Canvas3D uses the addNotify callback to track when it is added to a container. |
void |
getCenterEyeInImagePlate(Point3d position)
Retrieves the actual position of the center eye in image-plate coordinates and copies that value into the object provided. |
boolean |
getDoubleBufferAvailable()
Returns a status flag indicating whether or not double buffering is available. |
boolean |
getDoubleBufferEnable()
Returns a status flag indicating whether or not double buffering is enabled. |
GraphicsContext3D |
getGraphicsContext3D()
Get the immediate mode 3D graphics context associated with this Canvas3D. |
void |
getImagePlateToVworld(Transform3D t)
Retrieves the current ImagePlate coordinates to Virtual World coordinates transform and places it into the specified object. |
void |
getLeftEyeInImagePlate(Point3d position)
Retrieves the actual position of the left eye in image-plate coordinates and copies that value into the object provided. |
void |
getLeftManualEyeInImagePlate(Point3d position)
Retrieves the position of the user-specified, manual left eye in image-plate coordinates and copies that value into the object provided. |
double |
getPhysicalHeight()
Retrieves the physical height of this canvas window in meters. |
double |
getPhysicalWidth()
Retrieves the physical width of this canvas window in meters. |
void |
getPixelLocationInImagePlate(int x,
int y,
Point3d position)
Computes the position of the specified AWT pixel value in image-plate coordinates and copies that value into the object provided. |
void |
getRightEyeInImagePlate(Point3d position)
Retrieves the actual position of the right eye in image-plate coordinates and copies that value into the object provided. |
void |
getRightManualEyeInImagePlate(Point3d position)
Retrieves the position of the user-specified, manual right eye in image-plate coordinates and copies that value into the object provided. |
boolean |
getSceneAntialiasingAvailable()
Returns a status flag indicating whether or not scene antialiasing is available. |
Screen3D |
getScreen3D()
Retrieve the Screen3D object that this Canvas3D is attached to. |
boolean |
getStereoAvailable()
Returns a status flag indicating whether or not stereo is available. |
boolean |
getStereoEnable()
Returns a status flag indicating whether or not stereo is enabled. |
View |
getView()
Gets view that points to this Canvas3D. |
void |
getVworldToImagePlate(Transform3D t)
Retrieves the current Virtual World coordinates to ImagePlate coordinates transform and places it into the specified object. |
void |
paint(java.awt.Graphics g)
Canvas3D uses the paint callback to track when it is possible to render into the canvas. |
void |
postRender()
This routine is called by the Java 3D rendering loop after completing all rendering to the canvas for this frame and before the buffer swap. |
void |
postSwap()
This routine is called by the Java 3D rendering loop after completing all rendering to the canvas, and all other canvases associated with this view, for this frame following the buffer swap. |
void |
preRender()
This routine is called by the Java 3D rendering loop after clearing the canvas and before any rendering has been done for this frame. |
void |
removeNotify()
Canvas3D uses the removeNotify callback to track when it is removed from a container. |
void |
renderField(int fieldDesc)
This routine is called by the Java 3D rendering loop during the execution of the rendering loop. |
void |
setDoubleBufferEnable(boolean flag)
Turns double buffering on or off. |
void |
setLeftEyeInImagePlate(Point3d position)
Deprecated. Use setLeftManualEyeInImagePlate instead. |
void |
setLeftManualEyeInImagePlate(Point3d position)
Sets the position of the manual left eye in image-plate coordinates. |
void |
setRightEyeInImagePlate(Point3d position)
Deprecated. Use setRightManualEyeInImagePlate instead. |
void |
setRightManualEyeInImagePlate(Point3d position)
Sets the position of the manual right eye in image-plate coordinates. |
void |
setStereoEnable(boolean flag)
Turns stereo on or off. |
void |
startRenderer()
Start the Java 3D renderer on this Canvas3D object. |
void |
stopRenderer()
Stop the Java 3D renderer on this Canvas3D object. |
void |
swap()
Synchronize and swap buffers on a double buffered canvas for this Canvas3D object. |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
deliverEvent,
disable,
disableEvents,
dispatchEvent,
doLayout,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
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,
paramString,
postEvent,
preferredSize,
prepareImage,
prepareImage,
print,
printAll,
processComponentEvent,
processEvent,
processFocusEvent,
processInputMethodEvent,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
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 |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int FIELD_LEFT
public static final int FIELD_RIGHT
public static final int FIELD_ALL
Constructor Detail |
public Canvas3D(java.awt.GraphicsConfiguration graphicsConfiguration)
graphicsConfiguration
- a valid GraphicsConfiguration object
that will be used to create the canvas.GraphicsConfiguration
Method Detail |
public void paint(java.awt.Graphics g)
public void addNotify()
public void removeNotify()
public final Screen3D getScreen3D()
public final GraphicsContext3D getGraphicsContext3D()
public void preRender()
public void postRender()
public void postSwap()
public void renderField(int fieldDesc)
fieldDesc
- field description, one of: FIELD_LEFT, FIELD_RIGHT or
FIELD_ALL. Applications that wish to work correctly in stereo mode
should render the same image for both FIELD_LEFT and FIELD_RIGHT calls.
If Java 3D calls the renderer with FIELD_ALL then the immediate mode
rendering only needs to be done once.public final void stopRenderer()
public final void startRenderer()
public final void swap()
stopRenderer()
public final void setLeftEyeInImagePlate(Point3d position)
public final void setRightEyeInImagePlate(Point3d position)
public final void setLeftManualEyeInImagePlate(Point3d position)
position
- the new manual left eye positionpublic final void setRightManualEyeInImagePlate(Point3d position)
position
- the new manual right eye positionpublic final void getLeftManualEyeInImagePlate(Point3d position)
position
- the object that will receive the positionpublic final void getRightManualEyeInImagePlate(Point3d position)
position
- the object that will receive the positionpublic final void getLeftEyeInImagePlate(Point3d position)
position
- the object that will receive the positionpublic final void getRightEyeInImagePlate(Point3d position)
position
- the object that will receive the positionpublic final void getCenterEyeInImagePlate(Point3d position)
position
- the object that will receive the positionView.setMonoscopicViewPolicy(int)
public final void getImagePlateToVworld(Transform3D t)
t
- the Transform3D object that will receive the
transformpublic final void getPixelLocationInImagePlate(int x, int y, Point3d position)
x
- the X coordinate of the pixel relative to the upper-left
hand corner of the window.y
- the Y coordinate of the pixel relative to the upper-left
hand corner of the window.position
- the object that will receive the position in
physical image plate coordinates (relative to the lower-left
corner of the screen).public final double getPhysicalWidth()
public final double getPhysicalHeight()
public final void getVworldToImagePlate(Transform3D t)
t
- the Transform3D object that will receive the
transformpublic final View getView()
public final boolean getStereoAvailable()
public final void setStereoEnable(boolean flag)
flag
- enables or disables the display of stereopublic final boolean getStereoEnable()
public final boolean getDoubleBufferAvailable()
public final void setDoubleBufferEnable(boolean flag)
flag
- enables or disables double buffering.public final boolean getDoubleBufferEnable()
public final boolean getSceneAntialiasingAvailable()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |