JavaView© v3.95.000

jv.project
Interface PvDisplayIf

All Superinterfaces:
java.util.EventListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, PsUpdateIf
All Known Implementing Classes:
PvDisplay

public interface PvDisplayIf
extends PsUpdateIf, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener

This interface must be implemented by all displays to be registered in JavaView, and which want to display any of the geometries implementing the interface PgGeometryIf. Each geometry instance may be registered in a set of displays. If a geometry is modified then it must notify the associated displays via a call display.update(geometry) to invoke a repaint(). In response to this update the display calls the geometries paint(PvGeometryIf cont) method in which a container is filled with the modified data of the geometry.

See Also:
PgGeometryIf, PgGeometryIf.paint(PvGeometryIf), PvDisplay

Field Summary
static int CAMERA_MODEL
          Deprecated. use corresponding instance of PvCameraIf
static java.lang.String[] CAMERA_NAME
          Deprecated. use PvCameraIf#CAMERA_NAME
static int CAMERA_ORTHO_XY
          Deprecated. use corresponding instance of PvCameraIf
static int CAMERA_ORTHO_XZ
          Deprecated. use corresponding instance of PvCameraIf
static int CAMERA_ORTHO_YZ
          Deprecated. use corresponding instance of PvCameraIf
static int CAMERA_PERSPECTIVE
          Deprecated. use corresponding instance of PvCameraIf
static int IMAGE_CENTER
          Determines that a background image is positioned in the center of a display.
static int IMAGE_FIT
          Determines that a background image is resized to fill the display.
static int IMAGE_RESIZE
          Determines that a background image is resized to fill the display.
static int IMAGE_TESSELATE
          Determines that a background image is duplicated to fill the display.
static int MATRIX_AMBIENT
          Type of geometry ambient modeling matrix used by cameras and display.
static int MATRIX_INV_AMBIENT
          Type of inverse geometry ambient modeling matrix used by cameras and display.
static int MATRIX_INV_MODEL
          Type of inverse geometry modeling matrix used by cameras and display.
static int MATRIX_INV_PROJECT
          Type of inverse projection matrix used by cameras and display.
static int MATRIX_INV_PROJECT_NON
          Type of inverse projection matrix used by cameras and display.
static int MATRIX_INV_PROJVIEW
          Type of inverse transformation matrix PV^-1 used by cameras and display.
static int MATRIX_INV_PROJVIEW_NON
          Type of inverse transformation matrix PV^-1 used by cameras and display.
static int MATRIX_INV_TRANS
          Type of inverse full transformation matrix PVM^-1 used by cameras and display.
static int MATRIX_INV_TRANS_NON
          Type of inverse full transformation matrix PVM^-1 used by cameras and display.
static int MATRIX_INV_VIEW
          Type of inverse camera viewing matrix used by cameras and display.
static int MATRIX_MODEL
          Type of geometry modeling matrix used by cameras and display.
static int MATRIX_PROJECT
          Type of projection matrix used by cameras and display.
static int MATRIX_PROJECT_NON
          Type of projection matrix used by cameras and display.
static int MATRIX_PROJVIEW
          Type of transformation matrix PV used by cameras and display.
static int MATRIX_PROJVIEW_NON
          Type of transformation matrix PV used by cameras and display.
static int MATRIX_TRANS
          Type of full transformation matrix PVM used by cameras and display.
static int MATRIX_TRANS_NON
          Type of full transformation matrix PVM used by cameras and display.
static int MATRIX_VIEW
          Type of camera viewing matrix used by cameras and display.
static int MODE_ADD
          Major mode in display to add new points of geometries.
static int MODE_ADD_ELEMENT
          Major mode in display to add new elements to geometry.
static int MODE_DELETE
          Major mode in display to delete items or geometries.
static int MODE_DISPLAY_PICK
          Major mode in display to select initial points in display without picking geometries.
static int MODE_DUPLICATE
          Major mode in display to duplicate geometries.
static int MODE_HIGHLIGHT
          Major mode in display to highlight items on geometries if they receive focus.
static int MODE_INITIAL_PICK
          Major mode in display to select initial points on geometries.
static int MODE_MARK
          Major mode in display to mark a set of points on geometries.
static int MODE_MARK_ELEMENTS
          Major mode in display to mark a set of elements on geometries.
static int MODE_ORBIT
          Major mode in display to rotate geometry.
static int MODE_PICK
          Major mode in display to pick and modify vertices.
static int MODE_SCALE
          Major mode in display to scale geometry by zooming.
static int MODE_SCALE_RECT
          Major mode in display to scale geometry by zooming into a specified rectangle.
static int MODE_TRANS
          Major mode in display to (x,y)-translate geometry.
static int MODE_TRANS_Z
          Major mode in display to z-translate geometry.
static int MODE_UNMARK
          Major mode in display to unmark a set of points on surfaces.
static int MODE_UNMARK_ELEMENTS
          Major mode in display to mark a set of elements on geometries.
static int MODE_VERTICAL
          Major mode in display to rotate geometry either around z-axis of scene or around x-axis of display canvas, depending on larger mouse increment.
static int PAINT_ALL
          Enable drawing in display canvas, default enabled, otherwise no repaint of the display happens, and nothing is visible nor changes.
static int PAINT_ANTIALIAS
          Enable antialiasing of display.
static int PAINT_AXES
          Enable drawing of a coordinate axes around scene in the display.
static int PAINT_BACKGROUND
          Enable drawing of colored background.
static int PAINT_BACKGROUND_IMAGE
          Enable drawing of background image.
static int PAINT_BACKIMAGE
          Deprecated. use PAINT_BACKGROUND_IMAGE
static int PAINT_BNDBOX
          Enable drawing of bounding box of current geometry.
static int PAINT_BORDER
          Enable drawing of sunk border around display canvas.
static int PAINT_CENTER
          Enable drawing of center of active geometry.
static int PAINT_CLEAR_SCREEN
          Enable clearing of screen after each repaint.
static int PAINT_CROSS
          Enable drawing of cross at current cursor position.
static int PAINT_FOREGROUND_IMAGE
          Enable drawing of foreground image.
static int PAINT_FRAME
          Enable drawing of a small coordinate frame in the lower left corner of the display.
static int PAINT_INFO
          Enable drawing of additional information close to cursor in overlay window.
static int PAINT_MAGNET
          Attach cursor to vertices of nearby.
static int PAINT_SINGLE
          Restrict drawing to a single geometry at the same time.
static int PAINT_ZOOM
          Scale transformation matrix to simulate floating point accuracy in pixel integers.
static int TRANSFORM_AMBIENT
          Viewing transformations affect the ambient modeling matrix of geometry.
static int TRANSFORM_CAMERA
          Viewing transformations affect the camera viewing matrix.
static int TRANSFORM_MODEL
          Viewing transformations affect the modeling matrix of geometry.
 
Method Summary
 void addCameraListener(PvCameraListenerIf listener)
          Add camera listener to receive camera events PvCameraEvent.
 boolean addGeometry(PgGeometryIf anObject)
          Register geometry in display.
 void addGeometryListener(PvGeometryListenerIf listener)
          Add geometry listener to receive geometry events.
 void addKeyListener(java.awt.event.KeyListener listener)
          Register a keyListener to receive keyboard events of JavaView.
 boolean addLight(PvLightIf light)
          Add a light to the current scene.
 void addPickListener(PvPickListenerIf listener)
          Add pick listener to receive pick events PvPickEvent.
 void center()
          Scale camera such that current geometries are centered in the display.
 boolean containsGeometry(PgGeometryIf anObject)
          Check whether geometry is registered in display.
 void enableClip(boolean aFlag)
          Deprecated. use #setEnabledClip
 boolean fit()
          Scale camera such that current geometries fit into display.
 java.awt.Color getBackgroundColor()
          Get color of background of display.
 java.awt.Image getBackgroundImage()
          Get background image of display canvas.
 java.lang.String getBackgroundImageFile()
          Get background image filename of display canvas.
 int getBackgroundImageFit()
          Get the mode determining how a background image is scaled w.r.t. the display canvas.
 java.awt.Color getBndBoxColor()
          Get color of bounding box.
 double getBndBoxSize()
          Get thickness of edges of bounding box.
 PdVector getBoxRatio()
          Get individual scaling factors of coordinate axes.
 PvCameraIf getCamera()
          Get current camera.
 PvCameraIf getCamera(int type)
          Get a camera object of given type if registered in display.
 PsPanel getCameraPanel()
          Get info panel of current camera.
 PvCameraIf[] getCameras()
          Get set of registered cameras.
 double[] getClipBounds(int ind)
          Get minimum and maximum in one dimension of the clipping box.
 int getClipBoundsType()
          Get index of axis which is selected when scene clip bounds is active of becomes active.
 double getFarClip()
          Get far clip distance of current camera.
 java.awt.Color getForegroundColor()
          Get foreground color.
 java.awt.Image getForegroundImage()
          Get foreground image of display canvas.
 java.lang.String getForegroundImageFile()
          Get foreground image filename of display canvas.
 int getForegroundImageFit()
          Get the mode determining how a foreground image is scaled w.r.t. the display canvas.
 java.awt.Frame getFrame()
          Get reference to container frame of display, e.g. to allow display to hide/show frame.
 PgGeometryIf[] getGeometries()
          Get all registered geometry in display.
 java.awt.Graphics getGraphics()
          General AWT getGraphics(Graphics) method included in interface to allow invocation from outside the display.
 java.awt.Image getImage()
          Get the rendered image of the scene.
 int getImageFitMode()
          Deprecated. use getBackgroundImageFit()
 PsPanel getInfoPanel()
          Get info panel of display.
 PvLightIf getLight()
          Get current light object.
 int getLightingModel()
          Get currently active lighting model.
 PsPanel getLightPanel()
          Get info panel of current camera.
 PvLightIf[] getLights()
          Get registered lights as enumeration.
 int getMajorMode()
          Get the current interaction mode.
 java.lang.String getName()
          Get name of dispay, e.g. used as title in info panel and hashtable of PvViewer.
 double getNearClip()
          Get near clip distance of current camera.
 int getNumGeometries()
          Get number of all registered geometry in display.
 int getNumLights()
          Get number of light objects.
 java.lang.String getSceneTitle()
          Get title of scene.
 PgGeometryIf getSelectedGeometry()
          Get selected geometry in display.
 PvLightIf getSelectedLight()
          Select light from the list of registered lights in this scene.
 java.awt.Dimension getSize()
          Get dimension with height and width of drawing canvas.
 int getTransformationMode()
          Check whether transformation of current model is active, i.e. of model matrix.
 PdMatrix getTransMatrix(int type)
          Get 4*4 transformation matrix or components from current camera and display.
 PvViewerIf getViewer()
          Get the viewer manager of display, which manages multiple displays and is key listener.
 PgGeometryIf[] getVisibleGeometries()
          Get all visible registered geometry in display.
 boolean hasCamera(int type)
          Determine whether a camera object of given type is registered in display.
 boolean hasCameraListener(PvCameraListenerIf listener)
          Check for a registered camera listener.
 boolean hasGeometryListener(PvGeometryListenerIf listener)
          Check for a registered geometry listener.
 boolean hasLight(PvLightIf light)
          Determine whether a light is registered in display.
 boolean hasPaintTag(long flags)
          Check whether either of the bits in argument flags has been set.
 boolean hasPickListener(PvPickListenerIf listener)
          Check for a registered pick listener.
 boolean incrementAutoRotation()
          Do an increment of the auto-rotation animation.
 void init()
          Initialize and reset dispay.
 boolean isClip()
          Deprecated. use #isEnabledClip
 boolean isEnabled3DLook()
          Check whether thick vertices and edges are drawn as 3d shapes in z-buffer mode.
 boolean isEnabledAdaptiveSize()
          Check whether adaptive thickness of vertices and edges is enabled.
 boolean isEnabledAnimation()
          Check whether auto-rotation is enabled.
 boolean isEnabledAntiAlias()
          Check if antialiased drawing is enabled.
 boolean isEnabledBoxRatio()
          Check whether individual scaling factors of coordinate axes is enabled.
 boolean isEnabledClip()
          Check whether clipping with front and back plane is enabled.
 boolean isEnabledClipAutoBounds()
          Check whether automatic recalculation of clip range is enabled when clipRange is switched on.
 boolean isEnabledClipBounds()
          Check whether clipping along coordinate axes is enabled.
 boolean isEnabledDirectSelect()
          Check whether selecting is enabled during mouse pick.
 boolean isEnabledDoubleBuffer()
          Check if double buffered drawing is enabled.
 boolean isEnabledFillDisplay()
          Check if scaling of scene to fill display is enabled.
 boolean isEnabledIntegerPick()
          Check whether picking is constrained to an integer grid.
 boolean isEnabledLocalTransform()
          Get flag whether local coordinate system is used in camera transformations.
 boolean isEnabledPainters()
          Check whether painter's algorithm during drawing is enabled.
 boolean isEnabledRepaint()
          Determine whether painting is enabled.
 boolean isEnabledUpdate()
          Determine whether update mechanism is enabled.
 boolean isEnabledZBuffer()
          Check whether z-buffered drawing is enabled.
 boolean isShowingAxes()
          Check whether axes of active geometry is currently showing.
 boolean isShowingBackgroundImage()
          Check drawing of background image of display window.
 boolean isShowingBackImage()
          Check drawing of background image of display window. // * @deprecated use showBackgroundImage(boolean)
 boolean isShowingBndBox()
          Check whether bounding box of active geometry is currently showing.
 boolean isShowingCopyright()
          Check drawing of copyright information in the display window.
 boolean isShowingDepthcue()
          Check if depthcued drawing is enabled.
 boolean isShowingEdgeAura()
          Check flag of drawing of edges by one or both elements adjacent to an edge.
 boolean isShowingEdgesOnce()
          Check flag of drawing of edges by one or both elements adjacent to an edge.
 boolean isShowingForegroundImage()
          Check drawing of foreground image of display window.
 boolean isShowingFrame()
          Check whether coordinate frame is currently showing.
 boolean isShowingGrid()
          Check whether grid is currently showing.
 boolean isShowingMagnet()
          Check whether cursor attached to vertices if nearby.
 boolean isShowingTitle()
          Check drawing of title north in the display window.
 void releasePickFocus()
          Release pick focus, i.e. to be the unique listener who receives pick events.
 boolean removeCamera(int type)
          Remove camera from the list of installed camera to be current camera in the display.
 boolean removeCameraListener(PvCameraListenerIf listener)
          Remove a registered camera listener from list of registered listeners.
 void removeGeometries()
          Remove all geometries from display and remove any registered pick listener.
 boolean removeGeometry(PgGeometryIf anObject)
          Remove geometry from display.
 boolean removeGeometryListener(PvGeometryListenerIf listener)
          Remove a registered geometry listener from list of registered listeners.
 void removeKeyListener(java.awt.event.KeyListener listener)
          Remove a keyListener to receive keyboard events of JavaView.
 boolean removeLight(PvLightIf light)
          Remove light from list of registered lights in this scene.
 void removeLights()
          Remove all lights from list of registered lights in this scene.
 boolean removePickListener(PvPickListenerIf listener)
          Remove a registered pick listener from list of registered listeners.
 void requestPickFocus(PvPickListenerIf listener)
          Request pick focus, i.e. to be the unique listener who receives pick events.
 boolean selectCamera(int type)
          Select camera from the list of installed camera to be current camera in the display.
 boolean selectGeometry(PgGeometryIf anObject)
          Select geometry in display to receive pick events.
 boolean selectLight(PvLightIf light)
          Select light from the list of registered lights in this scene.
 void setAutoCenter(boolean flag)
          Set flag which determines whether camera will automatically center on geometry.
 void setAutoRotation(PdVector axis, double angle)
          Set axis and angle for auto-rotation.
 void setBackgroundColor(java.awt.Color aColor)
          Set color of background of display.
 void setBackgroundImage(java.awt.Image image)
          Set background image of display canvas.
 void setBackgroundImageFile(java.lang.String fileName)
          Set filename of background image of display canvas.
 void setBackgroundImageFit(int mode)
          Set the mode determining how a background image is scaled w.r.t. the display canvas.
 void setBndBoxColor(java.awt.Color color)
          Set color of bounding box.
 void setBndBoxSize(double size)
          Set thickness of edges of bounding box.
 void setBoxRatio(PdVector ratio)
          Set individual scaling factors of coordinate axes.
 void setClipBounds(int ind, double[] range)
          Set minimum and maximum in one dimension of the clipping box.
 void setClipBoundsType(int type)
          Set index of axis which is selected when scene clip bounds is active of becomes active.
 void setDrawingOrder(int order, PgGeometryIf geom)
          Choose z-order of geometry when drawn in display.
 void setEnabled3DLook(boolean flag)
          Enable drawing of thick vertices and edges as 3d shapes in z-buffer mode.
 void setEnabledAdaptiveSize(boolean flag)
          Enabled adaptive thickness of vertices and edges.
 void setEnabledAnimation(boolean aFlag)
          Enable and disable auto-rotation of scene.
 void setEnabledAntiAlias(boolean flag)
          Enable antialiased drawing.
 void setEnabledBoxRatio(boolean aFlag)
          Enable and disable individual scaling factors of coordinate axes.
 void setEnabledClip(boolean aFlag)
          Enable and disable clipping with front and back plane.
 void setEnabledClipAutoBounds(boolean aFlag)
          Enable automatic recalculation of clip range when clipRange is switched on.
 void setEnabledClipBounds(boolean aFlag)
          Enable and disable clipping along coordinate axes.
 void setEnabledDirectSelect(boolean flag)
          Enable and disable clipping with front and back plane.
 void setEnabledDoubleBuffer(boolean flag)
          Enable double buffered drawing.
 void setEnabledFillDisplay(boolean flag)
          Determine if scaling of scene to fill display is enabled.
 void setEnabledIntegerPick(boolean flag)
          Restrict picking to an integer grid.
 void setEnabledLocalTransform(boolean flag)
          Set flag whether local coordinate system is used in camera transformations.
 void setEnabledPainters(boolean aFlag)
          Enable and disable painter's algorithm during drawing.
 void setEnabledRepaint(boolean flag)
          Set flag which determines whether painting is enabled.
 void setEnabledUpdate(boolean flag)
          Set flag which determines whether update mechanism is enabled.
 void setEnabledZBuffer(boolean flag)
          Enable and disable z-buffered drawing of scene.
 void setFarClip(double dist)
          Set far clip distance of current camera, works even if clipping is disabled.
 void setForegroundColor(java.awt.Color aColor)
          Set foreground color.
 void setForegroundImage(java.awt.Image image)
          Set foreground image of display canvas.
 void setForegroundImageFile(java.lang.String fileName)
          Set foreground image of display canvas.
 void setForegroundImageFit(int mode)
          Set the mode determining how a background image is scaled w.r.t. the display canvas.
 void setFrame(java.awt.Frame frame)
          Set reference to container frame of display, e.g. to allow display to hide/show frame.
 void setImageFitMode(int mode)
          Deprecated. use setBackgroundImageFit(int)
 void setLightingModel(int model)
          Set current lighting model.
 void setMajorMode(int aMode)
          Switch between interaction modes like rotating or scaling, usually done interactively.
 void setName(java.lang.String name)
          Set name of dispay, e.g. used as title in info panel and hashtable of PvViewer.
 void setNearClip(double dist)
          Set near clip distance of current camera, works even if clipping is disabled.
 void setPaintTag(long flags, boolean val)
          Set and clear all bits in argument flags determining painting aspects in the display.
 void setSceneTitle(java.lang.String title)
          Set title of scene.
 void setSizeWithinFrame(int width, int height)
          Set height and width of drawing canvas if canvas is inside a frame.
 void setTransformationMode(int mode)
          Enable transformation of modeling matrix M of single geometry rather than transforming the whole scene by modifying project P and view V matrices.
 void setTransMatrix(int type, PdMatrix mat)
          Set transformation matrix or components in current camera and display.
 void setViewer(PvViewerIf viewer)
          Set the viewer manager of display, which manages multiple displays and is key listener.
 void showAxes(boolean aFlag)
          Set visibility of axes active geometry, and create axes if not available.
 void showBackgroundImage(boolean aFlag)
          Enable and disable drawing of background image of display window.
 void showBndBox(boolean aFlag)
          Set visibility of bounding box active geometry, and create bounding box if not available.
 void showCopyright(boolean aFlag)
          Enable and disable drawing of copyright information in the display window.
 void showDepthcue(boolean aFlag)
          Enable and disable depthcue drawing.
 void showEdgeAura(boolean aFlag)
          Enable and disable drawing of edges by one or both elements adjacent to an edge.
 void showEdgesOnce(boolean aFlag)
          Enable and disable drawing of edges by one or both elements adjacent to an edge.
 void showForegroundImage(boolean aFlag)
          Enable and disable drawing of foreground image of display window.
 void showFrame(boolean aFlag)
          Set visibility of coordinate frame is shown, and create frame if not available.
 void showGrid(boolean aFlag)
          Set visibility of grid, and create grid if not available.
 void showMagnet(boolean aFlag)
          Attach cursor to vertices if nearby.
 void showTitle(boolean aFlag)
          Enable and disable drawing of title north in the display window.
 void start()
          Start auto-rotation in viewer where a matrix is constantly multiplied to transformation matrix.
 void stop()
          Stop auto-rotation in viewer.
 boolean update(java.lang.Object event)
          Update mechanism of JavaView.
 
Methods inherited from interface jv.object.PsUpdateIf
getFather, setParent
 
Methods inherited from interface java.awt.event.KeyListener
keyPressed, keyReleased, keyTyped
 
Methods inherited from interface java.awt.event.MouseListener
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased
 
Methods inherited from interface java.awt.event.MouseMotionListener
mouseDragged, mouseMoved
 

Field Detail

MODE_ORBIT

public static final int MODE_ORBIT
Major mode in display to rotate geometry.

See Also:
Constant Field Values

MODE_SCALE

public static final int MODE_SCALE
Major mode in display to scale geometry by zooming.

See Also:
Constant Field Values

MODE_SCALE_RECT

public static final int MODE_SCALE_RECT
Major mode in display to scale geometry by zooming into a specified rectangle.

See Also:
Constant Field Values

MODE_TRANS

public static final int MODE_TRANS
Major mode in display to (x,y)-translate geometry.

See Also:
Constant Field Values

MODE_TRANS_Z

public static final int MODE_TRANS_Z
Major mode in display to z-translate geometry.

See Also:
Constant Field Values

MODE_PICK

public static final int MODE_PICK
Major mode in display to pick and modify vertices.

See Also:
Constant Field Values

MODE_INITIAL_PICK

public static final int MODE_INITIAL_PICK
Major mode in display to select initial points on geometries.

See Also:
Constant Field Values

MODE_HIGHLIGHT

public static final int MODE_HIGHLIGHT
Major mode in display to highlight items on geometries if they receive focus.

See Also:
Constant Field Values

MODE_DISPLAY_PICK

public static final int MODE_DISPLAY_PICK
Major mode in display to select initial points in display without picking geometries.

See Also:
Constant Field Values

MODE_MARK

public static final int MODE_MARK
Major mode in display to mark a set of points on geometries.

See Also:
Constant Field Values

MODE_MARK_ELEMENTS

public static final int MODE_MARK_ELEMENTS
Major mode in display to mark a set of elements on geometries.

See Also:
Constant Field Values

MODE_UNMARK_ELEMENTS

public static final int MODE_UNMARK_ELEMENTS
Major mode in display to mark a set of elements on geometries.

See Also:
Constant Field Values

MODE_UNMARK

public static final int MODE_UNMARK
Major mode in display to unmark a set of points on surfaces.

See Also:
Constant Field Values

MODE_ADD

public static final int MODE_ADD
Major mode in display to add new points of geometries.

See Also:
Constant Field Values

MODE_DELETE

public static final int MODE_DELETE
Major mode in display to delete items or geometries.

See Also:
Constant Field Values

MODE_DUPLICATE

public static final int MODE_DUPLICATE
Major mode in display to duplicate geometries.

See Also:
Constant Field Values

MODE_ADD_ELEMENT

public static final int MODE_ADD_ELEMENT
Major mode in display to add new elements to geometry.

See Also:
Constant Field Values

MODE_VERTICAL

public static final int MODE_VERTICAL
Major mode in display to rotate geometry either around z-axis of scene or around x-axis of display canvas, depending on larger mouse increment.

See Also:
Constant Field Values

CAMERA_PERSPECTIVE

public static final int CAMERA_PERSPECTIVE
Deprecated. use corresponding instance of PvCameraIf

Camera type and projection mode allowing to arbitrary rotate camera.

See Also:
Constant Field Values

CAMERA_ORTHO_XY

public static final int CAMERA_ORTHO_XY
Deprecated. use corresponding instance of PvCameraIf

Camera type and projection mode projecting orthogonally onto xy-plane.

See Also:
Constant Field Values

CAMERA_ORTHO_XZ

public static final int CAMERA_ORTHO_XZ
Deprecated. use corresponding instance of PvCameraIf

Camera type and projection mode projecting orthogonally onto xz-plane.

See Also:
Constant Field Values

CAMERA_ORTHO_YZ

public static final int CAMERA_ORTHO_YZ
Deprecated. use corresponding instance of PvCameraIf

Camera type and projection mode projecting orthogonally onto yz-plane.

See Also:
Constant Field Values

CAMERA_MODEL

public static final int CAMERA_MODEL
Deprecated. use corresponding instance of PvCameraIf

Misused camera type in display, simulates transformation of modeling matrix of geometry.

See Also:
Constant Field Values

CAMERA_NAME

public static final java.lang.String[] CAMERA_NAME
Deprecated. use PvCameraIf#CAMERA_NAME

Array of camera names. Position of names must match the integer id's of PvDisplayIf.CAMERA_PERSPECTIVE etc.


TRANSFORM_CAMERA

public static final int TRANSFORM_CAMERA
Viewing transformations affect the camera viewing matrix.

See Also:
Constant Field Values

TRANSFORM_MODEL

public static final int TRANSFORM_MODEL
Viewing transformations affect the modeling matrix of geometry.

See Also:
Constant Field Values

TRANSFORM_AMBIENT

public static final int TRANSFORM_AMBIENT
Viewing transformations affect the ambient modeling matrix of geometry.

See Also:
Constant Field Values

IMAGE_CENTER

public static final int IMAGE_CENTER
Determines that a background image is positioned in the center of a display.

See Also:
Constant Field Values

IMAGE_FIT

public static final int IMAGE_FIT
Determines that a background image is resized to fill the display.

See Also:
Constant Field Values

IMAGE_RESIZE

public static final int IMAGE_RESIZE
Determines that a background image is resized to fill the display.

See Also:
Constant Field Values

IMAGE_TESSELATE

public static final int IMAGE_TESSELATE
Determines that a background image is duplicated to fill the display.

See Also:
Constant Field Values

MATRIX_TRANS

public static final int MATRIX_TRANS
Type of full transformation matrix PVM used by cameras and display.

See Also:
Constant Field Values

MATRIX_PROJVIEW

public static final int MATRIX_PROJVIEW
Type of transformation matrix PV used by cameras and display.

See Also:
Constant Field Values

MATRIX_PROJECT

public static final int MATRIX_PROJECT
Type of projection matrix used by cameras and display.

See Also:
Constant Field Values

MATRIX_VIEW

public static final int MATRIX_VIEW
Type of camera viewing matrix used by cameras and display.

See Also:
Constant Field Values

MATRIX_MODEL

public static final int MATRIX_MODEL
Type of geometry modeling matrix used by cameras and display.

See Also:
Constant Field Values

MATRIX_INV_TRANS

public static final int MATRIX_INV_TRANS
Type of inverse full transformation matrix PVM^-1 used by cameras and display.

See Also:
Constant Field Values

MATRIX_INV_PROJVIEW

public static final int MATRIX_INV_PROJVIEW
Type of inverse transformation matrix PV^-1 used by cameras and display.

See Also:
Constant Field Values

MATRIX_INV_PROJECT

public static final int MATRIX_INV_PROJECT
Type of inverse projection matrix used by cameras and display.

See Also:
Constant Field Values

MATRIX_INV_VIEW

public static final int MATRIX_INV_VIEW
Type of inverse camera viewing matrix used by cameras and display.

See Also:
Constant Field Values

MATRIX_INV_MODEL

public static final int MATRIX_INV_MODEL
Type of inverse geometry modeling matrix used by cameras and display.

See Also:
Constant Field Values

MATRIX_AMBIENT

public static final int MATRIX_AMBIENT
Type of geometry ambient modeling matrix used by cameras and display.

See Also:
Constant Field Values

MATRIX_INV_AMBIENT

public static final int MATRIX_INV_AMBIENT
Type of inverse geometry ambient modeling matrix used by cameras and display.

See Also:
Constant Field Values

MATRIX_TRANS_NON

public static final int MATRIX_TRANS_NON
Type of full transformation matrix PVM used by cameras and display.

See Also:
Constant Field Values

MATRIX_PROJVIEW_NON

public static final int MATRIX_PROJVIEW_NON
Type of transformation matrix PV used by cameras and display.

See Also:
Constant Field Values

MATRIX_PROJECT_NON

public static final int MATRIX_PROJECT_NON
Type of projection matrix used by cameras and display.

See Also:
Constant Field Values

MATRIX_INV_TRANS_NON

public static final int MATRIX_INV_TRANS_NON
Type of inverse full transformation matrix PVM^-1 used by cameras and display.

See Also:
Constant Field Values

MATRIX_INV_PROJVIEW_NON

public static final int MATRIX_INV_PROJVIEW_NON
Type of inverse transformation matrix PV^-1 used by cameras and display.

See Also:
Constant Field Values

MATRIX_INV_PROJECT_NON

public static final int MATRIX_INV_PROJECT_NON
Type of inverse projection matrix used by cameras and display.

See Also:
Constant Field Values

PAINT_ALL

public static final int PAINT_ALL
Enable drawing in display canvas, default enabled, otherwise no repaint of the display happens, and nothing is visible nor changes. Clear this flag to prevent repainting of the display if a number of geometries must be updated at the same time. Further, when setting the tag again, then the display issues a repaint() command. Therefore, if the tag is set after the last of a sequence of geometry updates then the display repaints automatically.

See Also:
Constant Field Values

PAINT_BACKGROUND

public static final int PAINT_BACKGROUND
Enable drawing of colored background. If disabled background is white.

See Also:
Constant Field Values

PAINT_BORDER

public static final int PAINT_BORDER
Enable drawing of sunk border around display canvas.

See Also:
Constant Field Values

PAINT_ZOOM

public static final int PAINT_ZOOM
Scale transformation matrix to simulate floating point accuracy in pixel integers. Required for PostScript printing to increase pixel accurracy.

HACK: This PostScript Driver temporarily scales all integer valued quantities during display by a factor of 1000 to increase accuracy. The variable PvThickGraphics.ZOOM is set to allow to adjust all 'thickness' sizes as well. The thickness sizes are not scaled by PostScript, so we must do it in PvThickGraphics by hand. This procedure is very error proneous.

See Also:
Constant Field Values

PAINT_CROSS

public static final int PAINT_CROSS
Enable drawing of cross at current cursor position.

See Also:
Constant Field Values

PAINT_BACKIMAGE

public static final int PAINT_BACKIMAGE
Deprecated. use PAINT_BACKGROUND_IMAGE

Enable drawing of background image.

See Also:
Constant Field Values

PAINT_BACKGROUND_IMAGE

public static final int PAINT_BACKGROUND_IMAGE
Enable drawing of background image.

See Also:
Constant Field Values

PAINT_FOREGROUND_IMAGE

public static final int PAINT_FOREGROUND_IMAGE
Enable drawing of foreground image.

See Also:
Constant Field Values

PAINT_ANTIALIAS

public static final int PAINT_ANTIALIAS
Enable antialiasing of display.

See Also:
Constant Field Values

PAINT_BNDBOX

public static final int PAINT_BNDBOX
Enable drawing of bounding box of current geometry.

See Also:
Constant Field Values

PAINT_INFO

public static final int PAINT_INFO
Enable drawing of additional information close to cursor in overlay window.

Note, drawing of additional information can cause the display refreshrate to slow down since after each mouse movement a complex pick event is generated by intersecting all geometries with a ray.

See Also:
Constant Field Values

PAINT_FRAME

public static final int PAINT_FRAME
Enable drawing of a small coordinate frame in the lower left corner of the display.

See Also:
Constant Field Values

PAINT_AXES

public static final int PAINT_AXES
Enable drawing of a coordinate axes around scene in the display.

See Also:
Constant Field Values

PAINT_SINGLE

public static final int PAINT_SINGLE
Restrict drawing to a single geometry at the same time. Unsetting the flag allows multiple geometries to be visible at the same time, which is the default.

This flag only determines the number of visible geometries. Independent of this flag there may only be a single geometry active.

See Also:
Constant Field Values

PAINT_MAGNET

public static final int PAINT_MAGNET
Attach cursor to vertices of nearby.

See Also:
Constant Field Values

PAINT_CLEAR_SCREEN

public static final int PAINT_CLEAR_SCREEN
Enable clearing of screen after each repaint.

See Also:
Constant Field Values

PAINT_CENTER

public static final int PAINT_CENTER
Enable drawing of center of active geometry.

See Also:
Constant Field Values
Method Detail

getSceneTitle

public java.lang.String getSceneTitle()
Get title of scene.


setSceneTitle

public void setSceneTitle(java.lang.String title)
Set title of scene.


getName

public java.lang.String getName()
Get name of dispay, e.g. used as title in info panel and hashtable of PvViewer.

Specified by:
getName in interface PsUpdateIf

setName

public void setName(java.lang.String name)
Set name of dispay, e.g. used as title in info panel and hashtable of PvViewer.


init

public void init()
Initialize and reset dispay.


update

public boolean update(java.lang.Object event)
Update mechanism of JavaView. Method included since JAX had problems.

Specified by:
update in interface PsUpdateIf
Parameters:
event - carries a lot of information
Returns:
true if event has been handled, otherwise false
See Also:
PsObject, PsUpdateIf.getFather(), PsUpdateIf.setParent(PsUpdateIf)

isEnabledUpdate

public boolean isEnabledUpdate()
Determine whether update mechanism is enabled.


setEnabledUpdate

public void setEnabledUpdate(boolean flag)
Set flag which determines whether update mechanism is enabled.


isEnabledRepaint

public boolean isEnabledRepaint()
Determine whether painting is enabled.

Since:
JavaView 3.62.000

setEnabledRepaint

public void setEnabledRepaint(boolean flag)
Set flag which determines whether painting is enabled. Switch off repaint when updating a larger number of geometries at the same time.

Since:
JavaView 3.62.000

setAutoCenter

public void setAutoCenter(boolean flag)
Set flag which determines whether camera will automatically center on geometry.


getGraphics

public java.awt.Graphics getGraphics()
General AWT getGraphics(Graphics) method included in interface to allow invocation from outside the display.


addGeometry

public boolean addGeometry(PgGeometryIf anObject)
Register geometry in display.


containsGeometry

public boolean containsGeometry(PgGeometryIf anObject)
Check whether geometry is registered in display.


removeGeometry

public boolean removeGeometry(PgGeometryIf anObject)
Remove geometry from display.


removeGeometries

public void removeGeometries()
Remove all geometries from display and remove any registered pick listener.


selectGeometry

public boolean selectGeometry(PgGeometryIf anObject)
Select geometry in display to receive pick events.


getSelectedGeometry

public PgGeometryIf getSelectedGeometry()
Get selected geometry in display.


getNumGeometries

public int getNumGeometries()
Get number of all registered geometry in display. Method does not return any special geometries like bounding box, coordinate frames etc.


getGeometries

public PgGeometryIf[] getGeometries()
Get all registered geometry in display. Method does not return any special geometries like bounding box, coordinate frames etc.


getVisibleGeometries

public PgGeometryIf[] getVisibleGeometries()
Get all visible registered geometry in display. Method does not return any special geometries like bounding box, coordinate frames etc.


center

public void center()
Scale camera such that current geometries are centered in the display.


fit

public boolean fit()
Scale camera such that current geometries fit into display.

Returns:
true if fitting was successful.

getTransMatrix

public PdMatrix getTransMatrix(int type)
Get 4*4 transformation matrix or components from current camera and display. Allows to transform world coordinates into screen coordinates [0,0]*[width-1,height-1] of display.

Parameters:
type - Any matrix type jv.project.PvDisplayIf#MATRIX_...

setTransMatrix

public void setTransMatrix(int type,
                           PdMatrix mat)
Set transformation matrix or components in current camera and display. Allows to transform world coordinates into screen coordinates [0,0]*[width-1,height-1] of display.

Parameters:
type - Any matrix type jv.project.PvDisplayIf#MATRIX_...

setDrawingOrder

public void setDrawingOrder(int order,
                            PgGeometryIf geom)
Choose z-order of geometry when drawn in display. For possible values see PvGeometryIf#DRAW_ORDER_*.

See Also:
PvGeometryIf

isEnabledLocalTransform

public boolean isEnabledLocalTransform()
Get flag whether local coordinate system is used in camera transformations.

Since:
JavaView 2.48.007

setEnabledLocalTransform

public void setEnabledLocalTransform(boolean flag)
Set flag whether local coordinate system is used in camera transformations.

Since:
JavaView 2.48.007

isEnabledDirectSelect

public boolean isEnabledDirectSelect()
Check whether selecting is enabled during mouse pick.

Since:
JavaView 2.48.007

setEnabledDirectSelect

public void setEnabledDirectSelect(boolean flag)
Enable and disable clipping with front and back plane.

Since:
JavaView 2.48.007

getTransformationMode

public int getTransformationMode()
Check whether transformation of current model is active, i.e. of model matrix. Otherwise, whole scene is transformed, i.e. project and view matrix.

Since:
JavaView 2.48.007

setTransformationMode

public void setTransformationMode(int mode)
Enable transformation of modeling matrix M of single geometry rather than transforming the whole scene by modifying project P and view V matrices.

Since:
JavaView 2.48.007

addCameraListener

public void addCameraListener(PvCameraListenerIf listener)
Add camera listener to receive camera events PvCameraEvent.

Parameters:
listener - which is added
See Also:
hasCameraListener(PvCameraListenerIf), removeCameraListener(PvCameraListenerIf)

hasCameraListener

public boolean hasCameraListener(PvCameraListenerIf listener)
Check for a registered camera listener.

Parameters:
listener - which is queried
Returns:
true if registered listener found.
See Also:
addCameraListener(PvCameraListenerIf), removeCameraListener(PvCameraListenerIf)

removeCameraListener

public boolean removeCameraListener(PvCameraListenerIf listener)
Remove a registered camera listener from list of registered listeners.

Parameters:
listener - which is removed
Returns:
false if listener does not exists.
See Also:
addCameraListener(PvCameraListenerIf), hasCameraListener(PvCameraListenerIf)

addGeometryListener

public void addGeometryListener(PvGeometryListenerIf listener)
Add geometry listener to receive geometry events.

Parameters:
listener - which is added
Since:
JavaView 2.48
See Also:
hasGeometryListener(PvGeometryListenerIf), removeGeometryListener(PvGeometryListenerIf)

hasGeometryListener

public boolean hasGeometryListener(PvGeometryListenerIf listener)
Check for a registered geometry listener.

Parameters:
listener - which is queried
Returns:
true if registered listener found.
Since:
JavaView 2.48
See Also:
addGeometryListener(PvGeometryListenerIf), removeGeometryListener(PvGeometryListenerIf)

removeGeometryListener

public boolean removeGeometryListener(PvGeometryListenerIf listener)
Remove a registered geometry listener from list of registered listeners.

Parameters:
listener - which is removed
Returns:
false if listener does not exists.
Since:
JavaView 2.48
See Also:
addGeometryListener(PvGeometryListenerIf), hasGeometryListener(PvGeometryListenerIf)

addPickListener

public void addPickListener(PvPickListenerIf listener)
Add pick listener to receive pick events PvPickEvent.

See Also:
hasPickListener(PvPickListenerIf), removePickListener(PvPickListenerIf)

hasPickListener

public boolean hasPickListener(PvPickListenerIf listener)
Check for a registered pick listener.

Returns:
true if registered listener found.
See Also:
addPickListener(PvPickListenerIf), removePickListener(PvPickListenerIf)

removePickListener

public boolean removePickListener(PvPickListenerIf listener)
Remove a registered pick listener from list of registered listeners.

Parameters:
listener - which is removed
Returns:
false if listener does not exists.
See Also:
addPickListener(PvPickListenerIf), hasPickListener(PvPickListenerIf)

requestPickFocus

public void requestPickFocus(PvPickListenerIf listener)
Request pick focus, i.e. to be the unique listener who receives pick events. The focus should only be requested temporarily, and must be released after use.

Parameters:
listener - which will receives pick events
See Also:
releasePickFocus()

releasePickFocus

public void releasePickFocus()
Release pick focus, i.e. to be the unique listener who receives pick events. The focus should only be requested temporarily, and must be released after use.

See Also:
requestPickFocus(PvPickListenerIf)

setMajorMode

public void setMajorMode(int aMode)
Switch between interaction modes like rotating or scaling, usually done interactively. Modes may be changed either interactively using a keyboard shortcuts, or via the display panel or using via method. Modes are available in in jv.project.PvDisplayIf, for example, PvDisplayIf.MODE_SCALE

Parameters:
aMode - any of the modes available in PvDisplayIf.
See Also:
getMajorMode()

getMajorMode

public int getMajorMode()
Get the current interaction mode. Modes may be changed either interactively using a keyboard shortcuts, or via the display panel or using via method. Modes are available in in jv.project.PvDisplayIf, for example, PvDisplayIf.MODE_SCALE

Returns:
aMode any of the modes available in PvDisplayIf.
See Also:
setMajorMode(int)

addKeyListener

public void addKeyListener(java.awt.event.KeyListener listener)
Register a keyListener to receive keyboard events of JavaView.


removeKeyListener

public void removeKeyListener(java.awt.event.KeyListener listener)
Remove a keyListener to receive keyboard events of JavaView.


hasPaintTag

public boolean hasPaintTag(long flags)
Check whether either of the bits in argument flags has been set. Possible arguments are all tags PvDisplayIf#PAINT_... If available then preferrably use individual isShowing...() methods.


setPaintTag

public void setPaintTag(long flags,
                        boolean val)
Set and clear all bits in argument flags determining painting aspects in the display. Possible arguments are all tags PvDisplayIf#PAINT_... If available then preferrably use individual show...(boolean) methods.


setAutoRotation

public void setAutoRotation(PdVector axis,
                            double angle)
Set axis and angle for auto-rotation. This data is valid until the user starts interacting with the display. The main use of this method is to specify an initial axis for an animation when the display opens.


incrementAutoRotation

public boolean incrementAutoRotation()
Do an increment of the auto-rotation animation.


start

public void start()
Start auto-rotation in viewer where a matrix is constantly multiplied to transformation matrix. Use #setAutoRotation to specify a rotation axis. Auto-rotation spawns a new thread.


stop

public void stop()
Stop auto-rotation in viewer. Use start() to continue the animation.


getImageFitMode

public int getImageFitMode()
Deprecated. use getBackgroundImageFit()

Get the mode determining how a background image is scaled w.r.t. the display canvas.


setImageFitMode

public void setImageFitMode(int mode)
Deprecated. use setBackgroundImageFit(int)

Set the mode determining how a background image is scaled w.r.t. the display canvas.


getBackgroundImageFit

public int getBackgroundImageFit()
Get the mode determining how a background image is scaled w.r.t. the display canvas.

Since:
JavaView 2.36

setBackgroundImageFit

public void setBackgroundImageFit(int mode)
Set the mode determining how a background image is scaled w.r.t. the display canvas.

Since:
JavaView 2.36

getForegroundImageFit

public int getForegroundImageFit()
Get the mode determining how a foreground image is scaled w.r.t. the display canvas.

Since:
JavaView 2.36

setForegroundImageFit

public void setForegroundImageFit(int mode)
Set the mode determining how a background image is scaled w.r.t. the display canvas.

Since:
JavaView 2.36

isEnabled3DLook

public boolean isEnabled3DLook()
Check whether thick vertices and edges are drawn as 3d shapes in z-buffer mode.

Since:
JavaView 3.20.004

setEnabled3DLook

public void setEnabled3DLook(boolean flag)
Enable drawing of thick vertices and edges as 3d shapes in z-buffer mode.

Since:
JavaView 3.20.004

isEnabledAdaptiveSize

public boolean isEnabledAdaptiveSize()
Check whether adaptive thickness of vertices and edges is enabled.

Since:
JavaView 3.22.000

setEnabledAdaptiveSize

public void setEnabledAdaptiveSize(boolean flag)
Enabled adaptive thickness of vertices and edges.

Since:
JavaView 3.22.000

isEnabledAnimation

public boolean isEnabledAnimation()
Check whether auto-rotation is enabled.


setEnabledAnimation

public void setEnabledAnimation(boolean aFlag)
Enable and disable auto-rotation of scene.


isEnabledAntiAlias

public boolean isEnabledAntiAlias()
Check if antialiased drawing is enabled.


setEnabledAntiAlias

public void setEnabledAntiAlias(boolean flag)
Enable antialiased drawing.


isShowingAxes

public boolean isShowingAxes()
Check whether axes of active geometry is currently showing.


showAxes

public void showAxes(boolean aFlag)
Set visibility of axes active geometry, and create axes if not available.


isShowingBackImage

public boolean isShowingBackImage()
Check drawing of background image of display window. // * @deprecated use showBackgroundImage(boolean)


isShowingBackgroundImage

public boolean isShowingBackgroundImage()
Check drawing of background image of display window.

Since:
JavaView 2.31

showBackgroundImage

public void showBackgroundImage(boolean aFlag)
Enable and disable drawing of background image of display window.

Since:
JavaView 2.31

isShowingForegroundImage

public boolean isShowingForegroundImage()
Check drawing of foreground image of display window.

Since:
JavaView 2.31

showForegroundImage

public void showForegroundImage(boolean aFlag)
Enable and disable drawing of foreground image of display window.

Since:
JavaView 2.31

isShowingBndBox

public boolean isShowingBndBox()
Check whether bounding box of active geometry is currently showing.


showBndBox

public void showBndBox(boolean aFlag)
Set visibility of bounding box active geometry, and create bounding box if not available.


isEnabledClip

public boolean isEnabledClip()
Check whether clipping with front and back plane is enabled.


setEnabledClip

public void setEnabledClip(boolean aFlag)
Enable and disable clipping with front and back plane.


isEnabledClipAutoBounds

public boolean isEnabledClipAutoBounds()
Check whether automatic recalculation of clip range is enabled when clipRange is switched on.


setEnabledClipAutoBounds

public void setEnabledClipAutoBounds(boolean aFlag)
Enable automatic recalculation of clip range when clipRange is switched on.


isEnabledClipBounds

public boolean isEnabledClipBounds()
Check whether clipping along coordinate axes is enabled.


setEnabledClipBounds

public void setEnabledClipBounds(boolean aFlag)
Enable and disable clipping along coordinate axes.


isShowingCopyright

public boolean isShowingCopyright()
Check drawing of copyright information in the display window.


showCopyright

public void showCopyright(boolean aFlag)
Enable and disable drawing of copyright information in the display window.


isShowingDepthcue

public boolean isShowingDepthcue()
Check if depthcued drawing is enabled.


showDepthcue

public void showDepthcue(boolean aFlag)
Enable and disable depthcue drawing.


isEnabledDoubleBuffer

public boolean isEnabledDoubleBuffer()
Check if double buffered drawing is enabled.


setEnabledDoubleBuffer

public void setEnabledDoubleBuffer(boolean flag)
Enable double buffered drawing.


isShowingEdgeAura

public boolean isShowingEdgeAura()
Check flag of drawing of edges by one or both elements adjacent to an edge.


showEdgeAura

public void showEdgeAura(boolean aFlag)
Enable and disable drawing of edges by one or both elements adjacent to an edge.


isShowingEdgesOnce

public boolean isShowingEdgesOnce()
Check flag of drawing of edges by one or both elements adjacent to an edge.


showEdgesOnce

public void showEdgesOnce(boolean aFlag)
Enable and disable drawing of edges by one or both elements adjacent to an edge.


isEnabledFillDisplay

public boolean isEnabledFillDisplay()
Check if scaling of scene to fill display is enabled.

Since:
JavaView v3.94.003.

setEnabledFillDisplay

public void setEnabledFillDisplay(boolean flag)
Determine if scaling of scene to fill display is enabled.

Since:
JavaView v3.94.003.

isShowingFrame

public boolean isShowingFrame()
Check whether coordinate frame is currently showing.


showFrame

public void showFrame(boolean aFlag)
Set visibility of coordinate frame is shown, and create frame if not available.


isShowingGrid

public boolean isShowingGrid()
Check whether grid is currently showing.


showGrid

public void showGrid(boolean aFlag)
Set visibility of grid, and create grid if not available.


isEnabledIntegerPick

public boolean isEnabledIntegerPick()
Check whether picking is constrained to an integer grid.

Since:
JavaView 3.63.002

setEnabledIntegerPick

public void setEnabledIntegerPick(boolean flag)
Restrict picking to an integer grid.

Since:
JavaView 3.63.002

isShowingMagnet

public boolean isShowingMagnet()
Check whether cursor attached to vertices if nearby.


showMagnet

public void showMagnet(boolean aFlag)
Attach cursor to vertices if nearby.


isEnabledPainters

public boolean isEnabledPainters()
Check whether painter's algorithm during drawing is enabled.


setEnabledPainters

public void setEnabledPainters(boolean aFlag)
Enable and disable painter's algorithm during drawing.


isShowingTitle

public boolean isShowingTitle()
Check drawing of title north in the display window.

Since:
JavaView 2.49.004

showTitle

public void showTitle(boolean aFlag)
Enable and disable drawing of title north in the display window.

Since:
JavaView 2.49.004

isEnabledZBuffer

public boolean isEnabledZBuffer()
Check whether z-buffered drawing is enabled.


setEnabledZBuffer

public void setEnabledZBuffer(boolean flag)
Enable and disable z-buffered drawing of scene.


getBndBoxColor

public java.awt.Color getBndBoxColor()
Get color of bounding box.

Returns:
color of bounding box
Since:
JavaView 2.49.005

setBndBoxColor

public void setBndBoxColor(java.awt.Color color)
Set color of bounding box.

Parameters:
color - color of bounding box
Since:
JavaView 2.49.005

getBndBoxSize

public double getBndBoxSize()
Get thickness of edges of bounding box.

Returns:
thickness of edges bounding box
Since:
JavaView 2.49.005

setBndBoxSize

public void setBndBoxSize(double size)
Set thickness of edges of bounding box.

Parameters:
size - thickness of edges bounding box
Since:
JavaView 2.49.005

getBoxRatio

public PdVector getBoxRatio()
Get individual scaling factors of coordinate axes.

Returns:
scaling factors of coordinate axes
Since:
JavaView 2.60.002

setBoxRatio

public void setBoxRatio(PdVector ratio)
Set individual scaling factors of coordinate axes.

Parameters:
ratio - scaling factors of coordinate axes
Since:
JavaView 2.60.002

isEnabledBoxRatio

public boolean isEnabledBoxRatio()
Check whether individual scaling factors of coordinate axes is enabled.


setEnabledBoxRatio

public void setEnabledBoxRatio(boolean aFlag)
Enable and disable individual scaling factors of coordinate axes.


isClip

public boolean isClip()
Deprecated. use #isEnabledClip

Check whether clipping with front and back plane is enabled.


enableClip

public void enableClip(boolean aFlag)
Deprecated. use #setEnabledClip

Enable and disable clipping with front and back plane.


getNearClip

public double getNearClip()
Get near clip distance of current camera. Returns a value even if clipping is disabled.


setNearClip

public void setNearClip(double dist)
Set near clip distance of current camera, works even if clipping is disabled.


getFarClip

public double getFarClip()
Get far clip distance of current camera. Returns a value even if clipping is disabled.


setFarClip

public void setFarClip(double dist)
Set far clip distance of current camera, works even if clipping is disabled.


getClipBoundsType

public int getClipBoundsType()
Get index of axis which is selected when scene clip bounds is active of becomes active.

Since:
JavaView 2.99.012

setClipBoundsType

public void setClipBoundsType(int type)
Set index of axis which is selected when scene clip bounds is active of becomes active.

Since:
JavaView 2.99.012

getClipBounds

public double[] getClipBounds(int ind)
Get minimum and maximum in one dimension of the clipping box.

Parameters:
ind - index of ruler of axes in which direction is clipped
Returns:
range minimum and maximum of visible range in axis direction
Since:
JavaView 2.49.005

setClipBounds

public void setClipBounds(int ind,
                          double[] range)
Set minimum and maximum in one dimension of the clipping box.

Parameters:
ind - index of ruler of axes in which direction is clipped
range - minimum and maximum of visible range in axis direction
Since:
JavaView 2.49.005

getBackgroundColor

public java.awt.Color getBackgroundColor()
Get color of background of display. If background image is set, then color is visible in transparent regions of the image.


setBackgroundColor

public void setBackgroundColor(java.awt.Color aColor)
Set color of background of display. If background image is set, then color is visible in transparent regions of the image.


getForegroundColor

public java.awt.Color getForegroundColor()
Get foreground color. Currently neither defined nor used.


setForegroundColor

public void setForegroundColor(java.awt.Color aColor)
Set foreground color. Currently neither defined nor used.


getBackgroundImage

public java.awt.Image getBackgroundImage()
Get background image of display canvas.


setBackgroundImage

public void setBackgroundImage(java.awt.Image image)
Set background image of display canvas.


getBackgroundImageFile

public java.lang.String getBackgroundImageFile()
Get background image filename of display canvas.

Returns:
file name of background image
Since:
JavaView 2.31

setBackgroundImageFile

public void setBackgroundImageFile(java.lang.String fileName)
Set filename of background image of display canvas. Method tries to load file immediately.

Parameters:
fileName - relative file name of image.
Since:
JavaView 2.31

getForegroundImage

public java.awt.Image getForegroundImage()
Get foreground image of display canvas.

Since:
JavaView 2.31

setForegroundImage

public void setForegroundImage(java.awt.Image image)
Set foreground image of display canvas.

Since:
JavaView 2.31

getForegroundImageFile

public java.lang.String getForegroundImageFile()
Get foreground image filename of display canvas.

Returns:
file name of foreground image
Since:
JavaView 2.31

setForegroundImageFile

public void setForegroundImageFile(java.lang.String fileName)
Set foreground image of display canvas.

Parameters:
fileName - relative file name of image.
Since:
JavaView 2.31

getCamera

public PvCameraIf getCamera()
Get current camera.


getCameras

public PvCameraIf[] getCameras()
Get set of registered cameras.


getCamera

public PvCameraIf getCamera(int type)
Get a camera object of given type if registered in display. Type is among PvCameraIf#CAMERA_PERSPECTIVE, PvCameraIf#CAMERA_ORTHO_XY, PvCameraIf#CAMERA_ORTHO_XZ, PvCameraIf#CAMERA_ORTHO_YZ, For a list of possible types see PvDisplayIf.


hasCamera

public boolean hasCamera(int type)
Determine whether a camera object of given type is registered in display. Type is among PvCameraIf#CAMERA_PERSPECTIVE, PvCameraIf#CAMERA_ORTHO_XY, PvCameraIf#CAMERA_ORTHO_XZ, PvCameraIf#CAMERA_ORTHO_YZ, For a list of possible types see PvDisplayIf.


selectCamera

public boolean selectCamera(int type)
Select camera from the list of installed camera to be current camera in the display. Type is among PvCameraIf#CAMERA_PERSPECTIVE, PvCameraIf#CAMERA_ORTHO_XY, PvCameraIf#CAMERA_ORTHO_XZ, PvCameraIf#CAMERA_ORTHO_YZ, For a list of possible types see PvDisplayIf.


removeCamera

public boolean removeCamera(int type)
Remove camera from the list of installed camera to be current camera in the display. Type is among PvCameraIf#CAMERA_PERSPECTIVE, PvCameraIf#CAMERA_ORTHO_XY, PvCameraIf#CAMERA_ORTHO_XZ, PvCameraIf#CAMERA_ORTHO_YZ, For a list of possible types see PvDisplayIf.


getLightingModel

public int getLightingModel()
Get currently active lighting model.


setLightingModel

public void setLightingModel(int model)
Set current lighting model.


addLight

public boolean addLight(PvLightIf light)
Add a light to the current scene. Light is registered using its name.

Parameters:
light - new light added to scene

getNumLights

public int getNumLights()
Get number of light objects.

Returns:
number of light objects

getLight

public PvLightIf getLight()
Get current light object.

Returns:
current light object

getLights

public PvLightIf[] getLights()
Get registered lights as enumeration.

Returns:
array of registered lights

hasLight

public boolean hasLight(PvLightIf light)
Determine whether a light is registered in display.

Parameters:
light - a light object
Returns:
true if light is registered.

removeLights

public void removeLights()
Remove all lights from list of registered lights in this scene.


removeLight

public boolean removeLight(PvLightIf light)
Remove light from list of registered lights in this scene.

Parameters:
light - a light object
Returns:
true if light was found and successfully removed.

getSelectedLight

public PvLightIf getSelectedLight()
Select light from the list of registered lights in this scene.

Returns:
true if light was found and successfully selected.

selectLight

public boolean selectLight(PvLightIf light)
Select light from the list of registered lights in this scene.

Parameters:
light - a light object
Returns:
true if light was found and successfully selected.

getCameraPanel

public PsPanel getCameraPanel()
Get info panel of current camera. Camera allocates panel if it does not exist.


getInfoPanel

public PsPanel getInfoPanel()
Get info panel of display. Display allocates panel if it does not exist.


getLightPanel

public PsPanel getLightPanel()
Get info panel of current camera. Camera allocates panel if it does not exist.


getFrame

public java.awt.Frame getFrame()
Get reference to container frame of display, e.g. to allow display to hide/show frame.


setFrame

public void setFrame(java.awt.Frame frame)
Set reference to container frame of display, e.g. to allow display to hide/show frame.


getViewer

public PvViewerIf getViewer()
Get the viewer manager of display, which manages multiple displays and is key listener.

Since:
JavaView 2.30

setViewer

public void setViewer(PvViewerIf viewer)
Set the viewer manager of display, which manages multiple displays and is key listener.

Since:
JavaView 2.30

getImage

public java.awt.Image getImage()
Get the rendered image of the scene.


getSize

public java.awt.Dimension getSize()
Get dimension with height and width of drawing canvas.


setSizeWithinFrame

public void setSizeWithinFrame(int width,
                               int height)
Set height and width of drawing canvas if canvas is inside a frame.


JavaView© v3.95.000

The software JavaView© is copyright protected. All Rights Reserved.