Package org.jzy3d.plot3d.rendering.view
Class View
java.lang.Object
org.jzy3d.plot3d.rendering.view.View
- Direct Known Subclasses:
ChartView,SelectableView
A
s whose
implementation can define Java2d calls to render on top on OpenGL2.
Last, the
View holds a Scene, a LightSet, an ICanvas to render into. It
is the responsability to layout a set of concrete AbstractViewportManagers such as the
rendering the scene or an AWTImageViewport 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
invalid @link
Renderer2d
View offers the ability to get an AxisBox for embedding the
Scene and getting values along axes.- Author:
- Martin Pernollet
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Sceneprotected IAxisprotected booleanstatic final floatstatic final floatstatic final floatstatic final floatprotected Colorprotected ViewBoundModeprotected Cameraprotected CameraModeprotected floatprotected ICanvasprotected Coord3dprotected Chartprotected booleanprotected booleandisplay a magenta parallelepiped around the "whole bounds" of the axis (box + labels) for debugging purpose.static final floatstatic final floatstatic final floatstatic final floatprotected floatApplies a factor to the default camera distance which is set to the radius of the scene bounds.protected booleanprotected booleanprotected HiDPIprotected booleanstatic floatstatic floatprotected static booleanprotected IViewportLayoutprotected static org.apache.logging.log4j.Loggerprotected booleanforce to have all object maintained in screen, meaning axebox won't always keep the same size.protected IPainterstatic final floatstatic final floatprotected Coord2dprotected Qualityprotected Coord3dprotected Sceneprotected booleanA slave view won't clear its color and depth buffer before renderingprotected SpaceTransformerprotected booleanstatic final Coord3dstatic final Coord3dstatic final Coord3dprotected Coord3dprotected View2DLayoutSettings for the layout of a 2D chartprotected View2DProcessingprotected BoundingBox3dprotected booleancan be set to true by the Renderer3d so that the View knows it is rendering due to a canvas size changeprotected List<IViewEventListener>protected List<IViewLifecycleEventListener>protected ViewPositionModeprotected IViewOverlayprotected Coord3dstatic final Coord3dA viewpoint where two corners of the axis box touch top and bottom lines of the canvas.static final Coord3dA nice viewpoint to start the chartstatic final Coord3dA nice viewpoint to start the chartstatic final Coord3dA viewpoint allowing to have min X and Y values near viewer, growing toward horizon.protected List<IViewPointChangedListener>protected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddViewEventListener(IViewEventListener listener) booleanbooleanvoidclear()Clear the color and depth buffer.protected voidcomputeCamera2D_RenderingSquare(Camera cam, ViewportConfiguration viewport, BoundingBox3d bounds) Camera clipping planes configuration for a rendering plane (2D)protected voidcomputeCamera3D_RenderingSphere(Camera cam, ViewportConfiguration viewport, BoundingBox3d bounds) Camera clipping planes configuration for a rendering sphere (3D) Assume that axis labels are positioned accordingly (invalid @link
AxisLabelProcessor#axisLabelPosition_3D()protected Coord3dcomputeCameraEye(Coord3d target) protected Coord3dcomputeCameraEye(Coord3d target, ViewPositionMode viewmode, Coord3d viewpoint) Compute the camera's eye position in cartesian coordinates based on viewmode, target, and a viewpoint given in polar coordinates around the targetprotected Coord3dcomputeCameraEyeFree(Coord3d viewpoint, Coord3d target) protected Coord3dcomputeCameraEyeProfile(Coord3d viewpoint, Coord3d target) protected Coord3dcomputeCameraEyeXY(Coord3d viewpoint, Coord3d target) protected Coord3dcomputeCameraEyeXZ(Coord3d viewpoint, Coord3d target) protected Coord3dcomputeCameraEyeYZ(Coord3d viewpoint, Coord3d target) protected voidcomputeCameraRenderingVolume(Camera cam, ViewportConfiguration viewport, BoundingBox3d bounds) Configure the camera so that it will capture a given volume in the scene.protected Coord3dprotected Coord3dcomputeCameraTarget(Coord3d center, Coord3d scaling) protected Coord3dcomputeCameraUp(Coord3d viewpoint) Compute the direction of the top of the camera relative to its center.computeSceneScaling(Scene scene, boolean squared, ViewBoundMode boundmode, BoundingBox3d manualViewBounds, SpaceTransformer spaceTransformer) floatcomputeViewpointDistance(BoundingBox3d bounds, float factorViewPointDistance) protected voidconfigureHiDPIListener(ICanvas canvas) Upon pixel scale change, either at startup or during execution of the program, the listener will reconfigure the default font according to current HiDPI settings.voiddispose()protected voidprotected voidprotected voidprotected voidprotected voidfireViewOnTopEvent(boolean isOnTop) protected voidReturn the configuration of a 2D layoutReturn the result of processing a 2D layout using the layout configured with the instance returned byget2DLayout()getAxis()Get theAxisBox'sBoundingBox3dGet the projection of this view, either CameraMode.ORTHOGONAL or CameraMode.PERSPECTIVE.floatReturn the central point of the view scene, that is the last bounding box center set bylookToBox(org.jzy3d.maths.BoundingBox3d)getChart()floatgetHiDPI()Return HiDPI status as ACTUALLY possible by the ICanvas on the current screen and computer, regardless of the}.invalid @link
{@link Quality#setHiDPIEnabled(true)Return the last used view scaling that was set according to thesetSquared(boolean)status.Return a copy of the currently known pixel scale as notified by the canvas.getScale()Return the stretch ratio applied to the viewgetScene()protected BoundingBox3dgetSceneGraphBounds(Scene scene) booleanReturn theViewPositionModeapplied to this view.Get the viewpoint.voidinit()The initialization function: specifies general GL settings that impact the rendering quality and performance (computation speed).protected voidvoidinitInstance(IChartFactory factory, Scene scene, ICanvas canvas, Quality quality) Initialize a view object.voidvoidinitLights(Scene scene) voidvoidbooleanis2D()booleanis2D_XY()booleanis2D_XZ()booleanis2D_YZ()booleanis3D()booleanbooleanbooleanbooleanbooleanbooleanisSlave()voidlookToBox(BoundingBox3d box) voidMight be invoked by aIScreenCanvasto indicate that dimension changed and that elements should be reprocessed at next rendering, e.g. 2d projections.voidproject()Perform the 2d projection of allSelectableobjects of the scene.projectMouse(int x, int y) Perform the 3d projection of a 2d coordinate.projectMouse(Coord2d mouse) projectMouse(Coord3d screen) Perform the 3d projection of a 2d coordinate.projectMouse(IntegerCoord2d mouse) booleanbooleanbooleanvoidrender()Trigger layout rendering which in turns invoke thisrenderView()voidrenderAnnotations(Camera camera) protected voidprotected voidrenderAxeBox(IAxis axe, Scene scene, Camera camera, Coord3d scaling, boolean axeBoxDisplayed) voidrenderBackground(float left, float right) To be implemented (see AWTView)voidrenderBackground(ViewportConfiguration backgroundViewPort) To be implemented (see AWTView)voidvoidrenderOverlay(ViewportConfiguration viewportConfiguration) voidvoidrenderScene(float left, float right) voidrenderScene(ViewportConfiguration viewport) voidvoidrenderSceneGraph(boolean light) voidrenderSceneGraph(boolean light, Camera camera, Scene scene, Coord3d scaling) voidDefault view render implementation.voidGENERAL DISPLAY CONTROLSvoidvoidvoidsetAxisDisplayed(boolean axisDisplayed) voidsetBackgroundColor(Color color) voidsetBoundManual(BoundingBox3d bounds) Deprecated.voidsetBoundMode(ViewBoundMode mode) Select between an automatic bounding (that allows fitting the entire scene graph), or a custom bounding.voidsetBoundsManual(BoundingBox3d bounds) Set bounds and immediately refresh the viewvoidsetBoundsManual(BoundingBox3d bounds, boolean updateView) Set a manual bounding box and switch the bounding mode to {ViewBoundMode.MANUAL}, meaning that any call toupdateBounds()will update view bounds to the current bounds.voidsetCameraMode(CameraMode mode) Set the projection of this view, either Camera.ORTHOGONAL or Camera.PERSPECTIVE.voidsetCameraRenderingSphereRadiusFactor(float cameraRenderingSphereRadiusFactor) This allows zooming the 3d scene by editing the camera rendering sphere.voidvoidsetDisplayAxisWholeBounds(boolean displayAxisWholeBounds) voidsetFactorViewPointDistance(float factorViewPointDistance) voidsetLayout(IViewportLayout layout) voidsetMaintainAllObjectsInView(boolean maintainAllObjectsInView) voidsetMaximized(boolean status) voidZ scale.voidZ scale.voidvoidvoidvoidvoidvoidvoidsetSlave(boolean slave) voidsetSpaceTransformer(SpaceTransformer transformer) voidsetSquared(boolean status) voidsetSquarifier(ISquarifier squarifier) voidsetUpVector(Coord3d upVector) voidsetUpVector(Axis axis) voidsetViewPoint(double azimuth, double elevation) voidsetViewPoint(double azimuth, double elevation, boolean updateView) Set the viewpoint using polar coordinates relative to the target (i.e. the center of the scene).voidsetViewPoint(Coord3d polar) Set the viewpoint and query a view update.voidsetViewPoint(Coord3d polar, boolean updateView) Set the viewpoint using polar coordinates relative to the target (i.e. the center of the scene).voidSet theViewPositionModeapplied to this view.voidshift(float factor) voidshift(float factor, boolean updateView) voidshoot()Current view selection into the mother Scene, and call to target canvas rendering.protected Coord3dsquarify()protected Coord3dsquarify(Scene scene, ViewBoundMode boundmode, BoundingBox3d manualViewBounds, SpaceTransformer spaceTransformer) Return a 3d scaling factor that allows scaling the scene into a square box, according to the current ViewBoundMode.protected Coord3dprotected voidtriggerCameraUpEvents(Coord3d viewpoint) voidSet the bounds of the view according to the currentViewBoundMode, and orders a}.invalid @link
{@link Camera.shoot()voidupdateBoundsForceUpdate(boolean refresh) Update the bounds according to the scene graph whatever is the currentViewBoundMode, and orders a}invalid @link
{@link Camera.shoot()voidupdateCamera(ViewportConfiguration viewport, BoundingBox3d boundsScaled) voidupdateCamera(ViewportConfiguration viewport, BoundingBox3d bounds, ViewPositionMode viewmode, Coord3d viewpoint, Camera cam, CameraMode cameraMode, float factorViewPointDistance, Coord3d center, Coord3d scaling) voidupdateCameraWithoutShooting(ViewportConfiguration viewport, BoundingBox3d bounds, ViewPositionMode viewmode, Coord3d viewpoint, Camera cam, float factorViewPointDistance, Coord3d center, Coord3d scaling) Update the camera configuration without triggering theCamera.shoot(IPainter, CameraMode)method.voidDeprecated.voidzoom(float factor) voidzoom(float factor, boolean updateView) voidzoomX(float factor) voidzoomX(float factor, boolean updateView) voidzoomY(float factor) voidzoomY(float factor, boolean updateView) voidzoomZ(float factor) voidzoomZ(float factor, boolean updateView)
-
Field Details
-
LOGGER
protected static org.apache.logging.log4j.Logger LOGGER -
cameraMode
-
viewMode
-
boundsMode
-
backgroundColor
-
axisDisplayed
protected boolean axisDisplayed -
squared
protected boolean squared -
view2DLayout
Settings for the layout of a 2D chart -
view2DProcessing
-
cameraRenderingSphereRadiusFactor
protected float cameraRenderingSphereRadiusFactor -
maintainAllObjectsInView
protected boolean maintainAllObjectsInViewforce to have all object maintained in screen, meaning axebox won't always keep the same size. -
displayAxisWholeBounds
protected boolean displayAxisWholeBoundsdisplay a magenta parallelepiped around the "whole bounds" of the axis (box + labels) for debugging purpose. -
cam
-
axis
-
quality
-
scene
-
canvas
-
painter
-
annotations
-
viewpoint
-
center
-
scaling
-
upVector
-
hasViewpointLimits
protected boolean hasViewpointLimits -
viewBounds
-
chart
-
layout
-
viewPointChangedListeners
-
viewLifecycleListeners
-
viewEventListeners
-
wasOnTopAtLastRendering
protected boolean wasOnTopAtLastRendering -
first
protected boolean first -
hidpi
-
pixelScale
-
initialized
protected boolean initialized -
PI
public static final float PI- See Also:
-
PI_div2
public static final float PI_div2- See Also:
-
DISTANCE_DEFAULT
public static final float DISTANCE_DEFAULT- See Also:
-
AZIMUTH_FACING_X_DECREASING
public static final float AZIMUTH_FACING_X_DECREASING- See Also:
-
AZIMUTH_FACING_X_INCREASING
public static final float AZIMUTH_FACING_X_INCREASING- See Also:
-
AZIMUTH_FACING_Y_DECREASING
public static final float AZIMUTH_FACING_Y_DECREASING- See Also:
-
AZIMUTH_FACING_Y_INCREASING
public static final float AZIMUTH_FACING_Y_INCREASING- See Also:
-
ELEVATION_ON_TOP
public static final float ELEVATION_ON_TOP- See Also:
-
ELEVATION_0
public static final float ELEVATION_0- See Also:
-
ELEVATION_ON_BOTTOM
public static final float ELEVATION_ON_BOTTOM- See Also:
-
UP_VECTOR_X
-
UP_VECTOR_Y
-
UP_VECTOR_Z
-
VIEWPOINT_X_Y_MIN_NEAR_VIEWER
A viewpoint allowing to have min X and Y values near viewer, growing toward horizon. -
VIEWPOINT_AXIS_CORNER_TOUCH_BORDER
A viewpoint where two corners of the axis box touch top and bottom lines of the canvas. -
VIEWPOINT_DEFAULT
A nice viewpoint to start the chart -
VIEWPOINT_DEFAULT_OLD
A nice viewpoint to start the chart -
dimensionDirty
protected boolean dimensionDirty -
viewDirty
protected boolean viewDirtycan be set to true by the Renderer3d so that the View knows it is rendering due to a canvas size change -
factorViewPointDistance
protected float factorViewPointDistanceApplies a factor to the default camera distance which is set to the radius of the scene bounds. Changing this value also change the camera clipping planes. -
slave
protected boolean slaveA slave view won't clear its color and depth buffer before rendering -
spaceTransformer
-
viewOverlay
-
JGL_CORRECT_YZ
public static float JGL_CORRECT_YZ -
JGL_CORRECT_XZ
public static float JGL_CORRECT_XZ -
JGL_INVERSE_MATRIX_WORKAROUND
protected static boolean JGL_INVERSE_MATRIX_WORKAROUND
-
-
Constructor Details
-
View
Create a view attached to a Scene, with its own Camera and Axe. The initial view point is set at. Theinvalid @link
View.DEFAULT_VIEWQualityallows setting the rendering capabilities that are set one time by the init() method. -
View
protected View()An empty constructor to allow creating spied mocks
-
-
Method Details
-
initInstance
Initialize a view object. Invoked by constructor Method name is made clear to avoid confusion withinit()which initialize open GL context.- Parameters:
factory-scene-canvas-quality-
-
configureHiDPIListener
Upon pixel scale change, either at startup or during execution of the program, the listener will reconfigure the default font according to current HiDPI settings. This will reconfigure anything that draws based onAxisLayout.getFont(), hence:- the font of the axis text renderer
- the font of the colorbar
-
dispose
public void dispose() -
shoot
public void shoot()Current view selection into the mother Scene, and call to target canvas rendering. -
project
public void project()Perform the 2d projection of allSelectableobjects of the scene. The result of the projection can be retrieved on the objects's instances. -
projectMouse
Perform the 3d projection of a 2d coordinate. -
projectMouse
Perform the 3d projection of a 2d coordinate. The z component of the screen coordinate should be between 0 and 1, representing the position in the depth range -
projectMouse
-
projectMouse
-
markDimensionDirty
public void markDimensionDirty()Might be invoked by aIScreenCanvasto indicate that dimension changed and that elements should be reprocessed at next rendering, e.g. 2d projections. -
rotate
GENERAL DISPLAY CONTROLS -
rotate
-
shift
public void shift(float factor) -
shift
public void shift(float factor, boolean updateView) -
zoom
public void zoom(float factor) -
zoom
public void zoom(float factor, boolean updateView) -
zoomX
public void zoomX(float factor) -
zoomX
public void zoomX(float factor, boolean updateView) -
zoomY
public void zoomY(float factor) -
zoomY
public void zoomY(float factor, boolean updateView) -
zoomZ
public void zoomZ(float factor) -
zoomZ
public void zoomZ(float factor, boolean updateView) -
setScale
Z scale. -
setScale
Z scale. -
setScaleX
-
setScaleX
-
setScaleY
-
setScaleY
-
setScaleZ
-
setScaleZ
-
getScale
-
lookToBox
-
setBoundMode
Select between an automatic bounding (that allows fitting the entire scene graph), or a custom bounding. -
updateBounds
public void updateBounds()Set the bounds of the view according to the currentViewBoundMode, and orders a}.invalid @link
{@link Camera.shoot() -
getSceneGraphBounds
-
getSceneGraphBounds
-
updateBoundsForceUpdate
public void updateBoundsForceUpdate(boolean refresh) Update the bounds according to the scene graph whatever is the currentViewBoundMode, and orders a}invalid @link
{@link Camera.shoot() -
setBoundsManual
Set a manual bounding box and switch the bounding mode to {ViewBoundMode.MANUAL}, meaning that any call toupdateBounds()will update view bounds to the current bounds. -
setBoundsManual
Set bounds and immediately refresh the view -
setBoundManual
Deprecated. -
init
public void init()The initialization function:- specifies general GL settings that impact the rendering quality and performance (computation speed).
- enable light management
- load all required texture resources
- fix the current view bounds to the whole scene graph bounds
Qualitygiven in the constructor parameters. -
initBounds
protected void initBounds() -
initQuality
public void initQuality() -
initLights
public void initLights() -
initLights
-
initResources
public void initResources() -
clear
public void clear()Clear the color and depth buffer. -
render
public void render()Trigger layout rendering which in turns invoke thisrenderView() -
renderView
public void renderView()Default view render implementation. Triggering View rendering is performerIViewportLayout. The layout implementation may either call renderView() or Render background, scene and overlay Mark dimension dirty false Trigger view events -
renderBackground
public void renderBackground(float left, float right) To be implemented (see AWTView) -
renderBackground
To be implemented (see AWTView) -
renderScene
public void renderScene() -
renderScene
public void renderScene(float left, float right) -
renderScene
-
updateQuality
Deprecated.Not called anymore as alpha and blending setting are not supposed to change during lifetime of a chart. If this should change, then the entireinitQuality()method should be invoked -
squarify
-
squarify
protected Coord3d squarify(Scene scene, ViewBoundMode boundmode, BoundingBox3d manualViewBounds, SpaceTransformer spaceTransformer) Return a 3d scaling factor that allows scaling the scene into a square box, according to the current ViewBoundMode. If the scene bounds are Infinite, NaN or zero, for a given dimension, the scaler will be set to 1 on the given dimension.- Returns:
- a scaling factor for each dimension.
-
squarifyComputeBoundsRanges
-
computeScaledViewBounds
-
computeSceneScaling
-
computeSceneScaling
public Coord3d computeSceneScaling(Scene scene, boolean squared, ViewBoundMode boundmode, BoundingBox3d manualViewBounds, SpaceTransformer spaceTransformer) -
updateCamera
-
updateCamera
public void updateCamera(ViewportConfiguration viewport, BoundingBox3d bounds, ViewPositionMode viewmode, Coord3d viewpoint, Camera cam, CameraMode cameraMode, float factorViewPointDistance, Coord3d center, Coord3d scaling) -
updateCameraWithoutShooting
public void updateCameraWithoutShooting(ViewportConfiguration viewport, BoundingBox3d bounds, ViewPositionMode viewmode, Coord3d viewpoint, Camera cam, float factorViewPointDistance, Coord3d center, Coord3d scaling) Update the camera configuration without triggering theCamera.shoot(IPainter, CameraMode)method. This is useful in rare case where one need to manually invoke only a subset of OpenGL methods that are invoked by shoot method. -
computeViewpointDistance
-
computeCameraTarget
-
computeCameraTarget
-
computeCameraEye
-
computeCameraEye
Compute the camera's eye position in cartesian coordinates based on viewmode, target, and a viewpoint given in polar coordinates around the target -
computeCameraEyeFree
-
computeCameraEyeProfile
- Parameters:
viewpoint-target-
-
computeCameraEyeXY
-
computeCameraEyeYZ
-
computeCameraEyeXZ
-
computeCameraUp
Compute the direction of the top of the camera relative to its center. Coord3d(0, 0, 1) means a vector parallel to Z axis, so camera is looking horizontally Coord3d(0, 1, 0) means a vector parallel to Y axis, so camera is looking vertically -
triggerCameraUpEvents
-
computeCameraRenderingVolume
protected void computeCameraRenderingVolume(Camera cam, ViewportConfiguration viewport, BoundingBox3d bounds) Configure the camera so that it will capture a given volume in the scene. Rendering in 3D requires capturing a sphere defined by the bounding box radius. Rendering in 2D requires capturing a square defined by the bounding box with additional white space for labels and margins. -
computeCamera3D_RenderingSphere
protected void computeCamera3D_RenderingSphere(Camera cam, ViewportConfiguration viewport, BoundingBox3d bounds) Camera clipping planes configuration for a rendering sphere (3D) Assume that axis labels are positioned accordingly (invalid @link
AxisLabelProcessor#axisLabelPosition_3D() -
computeCamera2D_RenderingSquare
protected void computeCamera2D_RenderingSquare(Camera cam, ViewportConfiguration viewport, BoundingBox3d bounds) Camera clipping planes configuration for a rendering plane (2D) -
renderAxeBox
protected void renderAxeBox() -
renderAxeBox
-
renderSceneGraph
public void renderSceneGraph() -
renderSceneGraph
public void renderSceneGraph(boolean light) -
renderSceneGraph
-
renderOverlay
public void renderOverlay() -
renderOverlay
-
renderAnnotations
-
getPixelScale
Return a copy of the currently known pixel scale as notified by the canvas. If the View received no pixel scale change event, the pixel scale will be 0. -
getHiDPI
Return HiDPI status as ACTUALLY possible by the ICanvas on the current screen and computer, regardless of the}. Will always returninvalid @link
{@link Quality#setHiDPIEnabled(true)is chart is set toinvalid @link
HiDPI.OFF} as this forces the canvas to NOT make use of HiDPI.invalid @link
{@link Quality#setHiDPIEnabled(false)- Returns:
-
get2DLayout
Return the configuration of a 2D layout -
get2DProcessing
Return the result of processing a 2D layout using the layout configured with the instance returned byget2DLayout() -
getPainter
-
getChart
-
setChart
-
isSlave
public boolean isSlave() -
setSlave
public void setSlave(boolean slave) -
getSpaceTransformer
-
setSpaceTransformer
-
setSquarifier
-
getSquarifier
-
isInitialized
public boolean isInitialized() -
getLayout
-
setLayout
-
getCenter
Return the central point of the view scene, that is the last bounding box center set bylookToBox(org.jzy3d.maths.BoundingBox3d) -
getBounds
Get theAxisBox'sBoundingBox3d -
getBoundsMode
-
setViewPositionMode
Set theViewPositionModeapplied to this view. -
getViewMode
Return theViewPositionModeapplied to this view. -
is2D
public boolean is2D() -
is2D_XY
public boolean is2D_XY() -
is2D_XZ
public boolean is2D_XZ() -
is2D_YZ
public boolean is2D_YZ() -
is3D
public boolean is3D() -
getScaling
Return the stretch ratio applied to the view -
setViewPoint
Set the viewpoint using polar coordinates relative to the target (i.e. the center of the scene). Only X and Y dimensions are required, as the distance to center will be computed automatically by. The input coordinate is polar and considersinvalid @link
updateCamera()- x is azimuth in [0;2xPI]
- y is elevation in [-PI/2;+PI/2]. Will be clamped if out of bounds
- z is range (distance to center) but ignored there as it is processed automatically
-
setViewPoint
Set the viewpoint and query a view update. -
setViewPoint
public void setViewPoint(double azimuth, double elevation, boolean updateView) Set the viewpoint using polar coordinates relative to the target (i.e. the center of the scene). Only X and Y dimensions are required, as the distance to center will be computed automatically by. The input coordinate is polar and considersinvalid @link
updateCamera()- azimuth in [0;2xPI]
- elevation in [-PI/2;+PI/2]. Will be clamped if out of bounds
-
setViewPoint
public void setViewPoint(double azimuth, double elevation) -
getViewPoint
Get the viewpoint. The Z dimension is the one defined by, which depends on the view scaling.invalid @link
updateCamera() -
getLastViewScaling
Return the last used view scaling that was set according to thesetSquared(boolean)status. -
setAxis
-
getAxis
-
getAxisLayout
-
getSquared
public boolean getSquared() -
setSquared
public void setSquared(boolean status) -
isAxisDisplayed
public boolean isAxisDisplayed() -
setAxisDisplayed
public void setAxisDisplayed(boolean axisDisplayed) -
setBackgroundColor
-
getBackgroundColor
-
getCamera
-
setCameraMode
Set the projection of this view, either Camera.ORTHOGONAL or Camera.PERSPECTIVE. -
getCameraMode
Get the projection of this view, either CameraMode.ORTHOGONAL or CameraMode.PERSPECTIVE. -
setMaximized
public void setMaximized(boolean status) -
isMaximized
public boolean isMaximized() -
getUpVector
-
setUpVector
-
setUpVector
-
getCameraRenderingSphereRadiusFactor
public float getCameraRenderingSphereRadiusFactor()- See Also:
-
-
invalid @see
setter
-
-
setCameraRenderingSphereRadiusFactor
public void setCameraRenderingSphereRadiusFactor(float cameraRenderingSphereRadiusFactor) This allows zooming the 3d scene by editing the camera rendering sphere.- A value of 1 allows having an AxisBox with corners touching the top/bottom part of the canvas.
- A value greater than 1 makes the rendering sphere bigger, hence the AxisBox appears smaller.
-
isMaintainAllObjectsInView
public boolean isMaintainAllObjectsInView() -
getFactorViewPointDistance
public float getFactorViewPointDistance() -
setFactorViewPointDistance
public void setFactorViewPointDistance(float factorViewPointDistance) -
setMaintainAllObjectsInView
public void setMaintainAllObjectsInView(boolean maintainAllObjectsInView) -
isDisplayAxisWholeBounds
public boolean isDisplayAxisWholeBounds() -
setDisplayAxisWholeBounds
public void setDisplayAxisWholeBounds(boolean displayAxisWholeBounds) -
getScene
-
getSceneViewportRectangle
-
getCanvas
-
getAnnotations
-
addViewEventListener
-
removeViewOnTopEventListener
-
fireViewOnTopEvent
protected void fireViewOnTopEvent(boolean isOnTop) -
fireViewFirstRenderStarts
protected void fireViewFirstRenderStarts() -
addViewPointChangedListener
-
removeViewPointChangedListener
-
fireViewPointChangedEvent
-
addViewLifecycleChangedListener
-
removeViewLifecycleChangedListener
-
fireViewLifecycleHasInit
-
fireViewLifecycleWillRender
-
fireViewLifecycleHasRendered
-