|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jzy3d.plot3d.rendering.view.View
public class View
A View
holds a Scene
, a LightSet
, an ICanvas
to render into.
It is the responsability to layout a set of concrete AbstractViewport
s such as the
rendering the scene or an ImageViewport
for displaying an image in the same window.
On can control the Camera
with a and get notifyed by a
IViewPointChangedListener
that the view point has changed. The control is relative
to the center of the Scene
and is defined using polar coordinates.
The View
supports post rendering through the addition of Renderer2d
s
whose implementation can define Java2d calls to render on top on OpenGL.
Last, the View
offers the ability to get an AxeBox
for embedding
the Scene
and getting values along axes.
Field Summary | |
---|---|
static Coord3d |
DEFAULT_VIEW
|
static float |
STRETCH_RATIO
|
Constructor Summary | |
---|---|
View(Scene scene,
ICanvas canvas,
Quality quality)
Create a view attached to a Scene, with its own Camera and Axe. |
Method Summary | |
---|---|
void |
addRenderer2d(Renderer2d renderer)
|
void |
addTooltip(ITooltipRenderer tooltip)
|
void |
addTooltips(java.util.List<ITooltipRenderer> tooltip)
|
boolean |
addViewOnTopEventListener(IViewIsVerticalEventListener listener)
|
boolean |
addViewPointChangedListener(IViewPointChangedListener listener)
|
void |
clearTooltips()
|
static View |
current()
|
void |
dispose()
|
IAxe |
getAxe()
|
Color |
getBackgroundColor()
|
java.awt.image.BufferedImage |
getBackgroundImage()
|
BoundingBox3d |
getBounds()
Get the AxeBox 's BoundingBox3d |
Camera |
getCamera()
|
CameraMode |
getCameraMode()
Get the projection of this view, either CameraMode.ORTHOGONAL or CameraMode.PERSPECTIVE. |
javax.media.opengl.GL |
getCurrentGL()
GL |
Coord3d |
getLastViewScaling()
|
void |
getMaximized()
|
Scale |
getScale()
|
java.awt.Rectangle |
getSceneViewportRectangle()
|
boolean |
getSquared()
|
java.util.List<ITooltipRenderer> |
getTooltips()
|
ViewPositionMode |
getViewMode()
Return the ViewPositionMode applied to this view. |
Coord3d |
getViewPoint()
Get the viewpoint. |
boolean |
isAxeBoxDisplayed()
|
void |
lookToBox(BoundingBox3d box)
Set the surrounding AxeBox dimensions and the Camera target, and the colorbar range. |
void |
project()
|
void |
removeRenderer2d(Renderer2d renderer)
|
boolean |
removeViewOnTopEventListener(IViewIsVerticalEventListener listener)
|
boolean |
removeViewPointChangedListener(IViewPointChangedListener listener)
|
void |
rotate(Coord2d move)
GENERAL DISPLAY CONTROLS |
void |
setAxe(AxeBox ax)
CONTROLS ANNOTATIONS & GENERAL RENDERING |
void |
setAxeBoxDisplayed(boolean axeBoxDisplayed)
|
void |
setBackgroundColor(Color color)
|
void |
setBackgroundImage(java.awt.image.BufferedImage i)
Set a buffered image, or null to desactivate background image |
void |
setBoundManual(BoundingBox3d bounds)
Set a manual bounding box and switch the bounding mode to manual. |
void |
setBoundMode(ViewBoundMode mode)
Select between an automatic bounding (that allows fitting the entire scene graph), or a custom bounding. |
void |
setCameraMode(CameraMode mode)
Set the projection of this view, either Camera.ORTHOGONAL or Camera.PERSPECTIVE. |
void |
setMaximized(boolean status)
|
void |
setScale(Scale scale)
|
void |
setScale(Scale scale,
boolean notify)
|
void |
setSquared(boolean status)
|
void |
setTooltip(ITooltipRenderer tooltip)
|
void |
setTooltips(java.util.List<ITooltipRenderer> tooltip)
|
void |
setViewPoint(Coord3d polar)
|
void |
setViewPoint(Coord3d polar,
boolean updateView)
Set the viewpoint using polar coordinates relative to the target (i.e. the center of the scene). |
void |
setViewPositionMode(ViewPositionMode mode)
Set the ViewPositionMode applied to this view. |
void |
shift(float factor)
|
void |
shoot()
Current view selection into the mother Scene, and call to target canvas rendering. |
void |
updateBounds()
Set the bounds of the view according to the current mode, and orders a shoot(). |
void |
zoom(float factor)
Factor > 1 zoom out. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static float STRETCH_RATIO
public static final Coord3d DEFAULT_VIEW
Constructor Detail |
---|
public View(Scene scene, ICanvas canvas, Quality quality)
Quality
allows setting the rendering capabilities that
are set one time by the init() method.
Method Detail |
---|
public void dispose()
public void shoot()
public void project()
public void rotate(Coord2d move)
public void shift(float factor)
public void zoom(float factor)
public void setScale(Scale scale)
public void setScale(Scale scale, boolean notify)
public Scale getScale()
public void lookToBox(BoundingBox3d box)
public BoundingBox3d getBounds()
AxeBox
's BoundingBox3d
public void setViewPositionMode(ViewPositionMode mode)
ViewPositionMode
applied to this view.
public ViewPositionMode getViewMode()
ViewPositionMode
applied to this view.
public void setViewPoint(Coord3d polar, boolean updateView)
public void setViewPoint(Coord3d polar)
public Coord3d getViewPoint()
public Coord3d getLastViewScaling()
public void setAxe(AxeBox ax)
public IAxe getAxe()
public boolean getSquared()
public void setSquared(boolean status)
public boolean isAxeBoxDisplayed()
public void setAxeBoxDisplayed(boolean axeBoxDisplayed)
public void setBackgroundColor(Color color)
public Color getBackgroundColor()
public void setBackgroundImage(java.awt.image.BufferedImage i)
public java.awt.image.BufferedImage getBackgroundImage()
public Camera getCamera()
public void setCameraMode(CameraMode mode)
public CameraMode getCameraMode()
public void getMaximized()
public void setMaximized(boolean status)
public java.awt.Rectangle getSceneViewportRectangle()
public void clearTooltips()
public void setTooltip(ITooltipRenderer tooltip)
public void addTooltip(ITooltipRenderer tooltip)
public void setTooltips(java.util.List<ITooltipRenderer> tooltip)
public void addTooltips(java.util.List<ITooltipRenderer> tooltip)
public java.util.List<ITooltipRenderer> getTooltips()
public void addRenderer2d(Renderer2d renderer)
public void removeRenderer2d(Renderer2d renderer)
public boolean addViewOnTopEventListener(IViewIsVerticalEventListener listener)
public boolean removeViewOnTopEventListener(IViewIsVerticalEventListener listener)
public boolean addViewPointChangedListener(IViewPointChangedListener listener)
public boolean removeViewPointChangedListener(IViewPointChangedListener listener)
public void setBoundMode(ViewBoundMode mode)
public void updateBounds()
public void setBoundManual(BoundingBox3d bounds)
public javax.media.opengl.GL getCurrentGL()
public static View current()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |