|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Canvas
javax.media.j3d.Canvas3D
org.jcae.viewer3d.View
public class View
An AWT component wich display Viewable in a Java3D canvas. This class is responsible for handling picking and refresh events. The expected navigation behavior is the one of the OrbitBehavior of Java3D. Multiple selection is available using ctrl+Left click.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.Canvas |
|---|
java.awt.Canvas.AccessibleAWTCanvas |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static byte |
BACK
|
static float |
BackClipDistanceFactor
|
static byte |
BOTTOM
|
static byte |
FRONT
|
static float |
FrontClipDistanceFactor
|
static byte |
LEFT
|
protected com.sun.j3d.utils.behaviors.vp.OrbitBehavior |
orbit
|
static byte |
RIGHT
|
static byte |
TOP
|
| 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 |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
View()
Deprecated. Will cause a "java.lang.IllegalArgumentException: adding a container to a container on a different GraphicsDevice" in dual screen mode. |
|
View(boolean offscreen)
Deprecated. Will cause a "java.lang.IllegalArgumentException: adding a container to a container on a different GraphicsDevice" in dual screen mode. |
|
View(boolean offscreen,
boolean isSharedUniverse)
Deprecated. Will cause a "java.lang.IllegalArgumentException: adding a container to a container on a different GraphicsDevice" in dual screen mode. |
|
View(java.awt.Window window)
|
|
View(java.awt.Window window,
boolean offscreen)
|
|
View(java.awt.Window window,
boolean offscreen,
boolean isSharedUniverse)
|
|
| Method Summary | |
|---|---|
void |
add(Viewable viewable)
Add a Viewable to the current view |
void |
addBranchGroup(javax.media.j3d.BranchGroup branchGroup)
Allow to had a custom branchgroup to the view |
void |
addPositionListener(PositionListener listener)
|
protected void |
addPostRenderer(java.lang.Runnable runnable)
Runnable to be call in the postRender method |
void |
addUnClipWidgetBranchGroup(javax.media.j3d.BranchGroup branchGroup)
add a widget BranchGroup not clip by the clipModel |
void |
addWidgetBranchGroup(javax.media.j3d.BranchGroup branchGroup)
add a widget BranchGroup |
boolean |
contains(Viewable viewable)
inform if the view contains the viewable |
protected void |
finalize()
|
protected void |
firePositionChanged()
|
protected void |
fireViewableChanged(Viewable viewable)
refresh the clip planes value |
void |
fit(Viewable viewable)
Fit the view to show the specified viewable |
void |
fitAll()
Fit the view to show all the Viewable |
double |
getBackClipDistance()
|
protected javax.media.j3d.BoundingSphere |
getBound()
|
protected javax.media.j3d.BranchGroup |
getBranchGroup(Viewable viewable)
Get the cloned branchgroup of a viewable for this view. |
Viewable |
getCurrentViewable()
|
double |
getFrontClipDistance()
|
protected java.awt.image.BufferedImage |
getImage()
Return an Image representing the current Canvas3D This method is not synchronized with the Java3D rendering. |
protected int |
getMouseMode()
|
javax.media.j3d.TransformGroup |
getOriginAxisTransformGroup()
|
double[] |
getRotationCenter()
|
Viewable[] |
getViewables()
Return viewables shown in this view |
com.sun.j3d.utils.universe.ViewingPlatform |
getViewingPlatform()
|
boolean |
isInModelClip(javax.vecmath.Point3d pt)
returns true if the point is in the modelclip |
boolean |
isOriginAxisVisible()
|
void |
move(javax.media.j3d.Transform3D position)
Move the view to the specified position |
void |
positionChanged()
Implement PositionListener. |
void |
postRender()
|
void |
postSwap()
Overloaded for to be able to take snapshots and draw overlays (selection rectangle) |
void |
println(java.lang.String line)
print a line in the PrintWriter |
void |
remove(Viewable viewable)
Remove a viewable from this view |
void |
removeModelClip()
remove the ModelClip of the view |
protected void |
removePostRenderer(java.lang.Runnable runnable)
|
void |
removeUnClipWidgetBranchGroup(javax.media.j3d.BranchGroup branchGroup)
remove the specified widget BranchGroup not clip by the clipModel |
void |
removeWidgetBranchGroup(javax.media.j3d.BranchGroup branchGroup)
remove the specified widget BranchGroup |
void |
restoreFrontClipDistance()
restore the Front clip distance to see all the Viewable |
void |
setBackClipDistance(double d)
|
void |
setChangeRotationCenter(boolean status)
Allow the user to specify the rotation center. |
void |
setClipBox(ClipBox box)
create a clip Box and remove the previous modelclip Warning : all shared viewables will be clipped in other views !! |
void |
setClipPlanes(javax.vecmath.Vector4d[] planes)
create the modelclip with the specified planes and remove the previous modelclip Warning : all shared viewables will be clipped in other views !! |
void |
setCurrentViewable(Viewable v)
|
void |
setFixedAxisVisible(boolean show)
Display 3D x-y-z cartesian, at the center of the view. |
void |
setFrontClipDistance(double d)
|
void |
setMouseMode(int mode)
set the current mouse mode : see ViewBehavior |
void |
setNavigationMaster(View view)
Create a navigation link with the specified view. |
void |
setOrientation(byte orientation)
Change the view angle to a predefined one. |
void |
setOriginAxisVisible(boolean show)
Display 3D x-y-z cartesian at the 3D origin of the model. |
void |
setPickableViewables(java.util.Collection viewables)
Set the list of Viewables to which picking events will be dispatched. |
void |
setPickingMode(short mode)
Set the picking mode: 0, for single click picking 1, for rectangular selection picking 2, for polygonal selection picking |
void |
setPrintWriter(java.io.PrintWriter writer)
set a PrintWriter for the viewer messages |
void |
setRotationCenter(double x,
double y,
double z)
|
static void |
startRenderer(Viewable viewable)
|
static void |
stopRenderer(Viewable viewable)
|
void |
takeScreenshot(ScreenshotListener listener)
Take a snapshot of the current view Do not use this for offscreen rendering. |
java.awt.image.BufferedImage |
takeSnapshot()
Deprecated. Use takeScreenshot Not thread safe. In some configuration a deadlock could occure. |
java.awt.image.BufferedImage |
takeSnapshot(int w,
int h)
Take a snapshot of the current view in Off-screen mode Do not use this for on-screen rendering. |
static void |
viewableChanged(Viewable viewable)
|
javax.media.j3d.Transform3D |
where()
Return the current position of the view |
void |
zoomTo(float x,
float y,
float z,
float radius)
Modify the view to best see what is include a given sphere |
| Methods inherited from class javax.media.j3d.Canvas3D |
|---|
addNotify, getBounds, getBounds, getCenterEyeInImagePlate, getDoubleBufferAvailable, getDoubleBufferEnable, getGraphics2D, getGraphicsContext3D, getHeight, getImagePlateToVworld, getInverseVworldProjection, getLeftEyeInImagePlate, getLeftManualEyeInImagePlate, getLocation, getLocation, getLocationOnScreen, getMonoscopicViewPolicy, getOffScreenBuffer, getOffScreenLocation, getOffScreenLocation, getPhysicalHeight, getPhysicalWidth, getPixelLocationFromImagePlate, getPixelLocationInImagePlate, getPixelLocationInImagePlate, getRightEyeInImagePlate, getRightManualEyeInImagePlate, getSceneAntialiasingAvailable, getScreen3D, getSize, getSize, getStereoAvailable, getStereoEnable, getView, getVworldProjection, getVworldToImagePlate, getWidth, getX, getY, isOffScreen, isRendererRunning, isShadingLanguageSupported, paint, preRender, queryProperties, removeNotify, renderField, renderOffScreenBuffer, setDoubleBufferEnable, setLeftManualEyeInImagePlate, setMonoscopicViewPolicy, setOffScreenBuffer, setOffScreenLocation, setOffScreenLocation, setRightManualEyeInImagePlate, setStereoEnable, startRenderer, stopRenderer, swap, waitForOffScreenRendering |
| Methods inherited from class java.awt.Canvas |
|---|
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final float FrontClipDistanceFactor
public static final float BackClipDistanceFactor
protected com.sun.j3d.utils.behaviors.vp.OrbitBehavior orbit
public static final byte TOP
public static final byte BOTTOM
public static final byte LEFT
public static final byte RIGHT
public static final byte FRONT
public static final byte BACK
| Constructor Detail |
|---|
@Deprecated public View()
@Deprecated public View(boolean offscreen)
@Deprecated
public View(boolean offscreen,
boolean isSharedUniverse)
public View(java.awt.Window window)
public View(java.awt.Window window,
boolean offscreen)
public View(java.awt.Window window,
boolean offscreen,
boolean isSharedUniverse)
| Method Detail |
|---|
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic void setPrintWriter(java.io.PrintWriter writer)
public void println(java.lang.String line)
public javax.media.j3d.TransformGroup getOriginAxisTransformGroup()
public void add(Viewable viewable)
public void addBranchGroup(javax.media.j3d.BranchGroup branchGroup)
branchGroup - public void addWidgetBranchGroup(javax.media.j3d.BranchGroup branchGroup)
branchGroup - public void removeWidgetBranchGroup(javax.media.j3d.BranchGroup branchGroup)
branchGroup - public void addUnClipWidgetBranchGroup(javax.media.j3d.BranchGroup branchGroup)
branchGroup - public void removeUnClipWidgetBranchGroup(javax.media.j3d.BranchGroup branchGroup)
branchGroup - public void removeModelClip()
public void setClipPlanes(javax.vecmath.Vector4d[] planes)
public void setClipBox(ClipBox box)
public boolean isInModelClip(javax.vecmath.Point3d pt)
public void addPositionListener(PositionListener listener)
view - protected void firePositionChanged()
public void fit(Viewable viewable)
public void fitAll()
public void restoreFrontClipDistance()
public void setFrontClipDistance(double d)
public double getFrontClipDistance()
public double getBackClipDistance()
public void setBackClipDistance(double d)
protected javax.media.j3d.BoundingSphere getBound()
protected javax.media.j3d.BranchGroup getBranchGroup(Viewable viewable)
view -
public Viewable[] getViewables()
public Viewable getCurrentViewable()
public com.sun.j3d.utils.universe.ViewingPlatform getViewingPlatform()
public void setCurrentViewable(Viewable v)
public void move(javax.media.j3d.Transform3D position)
public void positionChanged()
positionChanged in interface PositionListenerpublic void postSwap()
postSwap in class javax.media.j3d.Canvas3DtakeSnapshotprotected java.awt.image.BufferedImage getImage()
public void remove(Viewable viewable)
public boolean contains(Viewable viewable)
public void setNavigationMaster(View view)
view - the master view, null mean no master.public void setPickableViewables(java.util.Collection viewables)
viewables - public void setPickingMode(short mode)
mode - public void setFixedAxisVisible(boolean show)
show - public void setOriginAxisVisible(boolean show)
show - public boolean isOriginAxisVisible()
@Deprecated public java.awt.image.BufferedImage takeSnapshot()
public void takeScreenshot(ScreenshotListener listener)
public java.awt.image.BufferedImage takeSnapshot(int w,
int h)
public javax.media.j3d.Transform3D where()
public void zoomTo(float x,
float y,
float z,
float radius)
x - x coordinate of the center of the spherey - y coordinate of the center of the spherez - z coordinate of the center of the sphereradius - radius of the spherepublic double[] getRotationCenter()
public void setRotationCenter(double x,
double y,
double z)
public void setChangeRotationCenter(boolean status)
public void setMouseMode(int mode)
protected int getMouseMode()
public void setOrientation(byte orientation)
protected void fireViewableChanged(Viewable viewable)
public static void viewableChanged(Viewable viewable)
public static void stopRenderer(Viewable viewable)
public static void startRenderer(Viewable viewable)
protected void addPostRenderer(java.lang.Runnable runnable)
runnable - protected void removePostRenderer(java.lang.Runnable runnable)
public final void postRender()
postRender in class javax.media.j3d.Canvas3D
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||