JavaView® v2.00.008

jv.loader
Class PvDisplayOption

java.lang.Object
  |
  +--jv.vecmath.P_Vector
        |
        +--jv.loader.PvDisplayOption
All Implemented Interfaces:
java.io.Serializable

public class PvDisplayOption
extends P_Vector

Store settings of a JavaView display. This class may be initialized by reading display settings from a file and initialize a display, or by extracting the information of a current display.

Class is in development.

Version:
31.01.01, 1.21 revised (ur) Removed two useless methods.
05.11.00, 1.20 revised (kp) Moved from jv.loader to jv.project.
03.11.00, 1.10 revised (kp) Continuing development.
06.10.00, 1.00 created (kp)
Author:
Konrad Polthier
See Also:
PvDisplayLoader, Serialized Form

Field Summary
static int LIGHT_BULB
          Physical light which has a position, possible direction, and color.
static int LIGHT_HUE
          Virtual light which colors a direction with rainbow colors.
static int LIGHT_RGB_CUBE
          Virtual light which colors a cube by mapping it onto the rgb cube.
static int LIGHT_SPOT
          Virtual light which colors a direction with rainbow colors.
static int LIGHT_SUN
          Virtual light which colors a direction with rainbow colors.
protected  java.lang.String m_abstract
          Verbal description of these display settings.
protected  java.awt.Color m_ambientLight
          Color of ambient light
protected  PiVector m_axesEdge
          Axes on edges of bounding box
protected  java.lang.String[] m_axesLabel
          Labels for all axes
protected  java.awt.Color m_backgroundColor
          Color of background.
protected  java.lang.String m_backgroundImage
          URL of background image.
protected  java.lang.String m_backgroundImageRepeat
          Repeat type of background image.
protected  int[] m_cameraAmbient
          Ambient space of camera.
protected  double[] m_cameraAngle
          Field of view of camera lens.
protected  boolean[] m_cameraEnableClip
          Flag whether clipping is enabled in this camera.
protected  boolean[] m_cameraEnableTransform
          Flag whether camera allows transformation of selected model.
protected  double[] m_cameraFarClip
          Distance of far clipping plane.
protected  PdVector[] m_cameraInterest
          Camera interest in world coordinates, i.e. the point at which the camera is pointing.
protected  double[] m_cameraNearClip
          Distance of near clipping plane.
protected  int[] m_cameraPerspective
          Perspective algorithm used by camera to project from higher dimensional spaces.
protected  PdVector[] m_cameraPosition
          Position of the camera in world coordinates.
protected  int[] m_cameraProjection
          Projection algorithm used by camera to project from higher dimensional spaces.
protected  double[] m_cameraRoll
          Roll of camera around its viewing direction in angles.
protected  int m_currentCamera
          Index of currently active camera.
protected  int m_dim
          Dimension of geometries
protected  java.awt.Color m_foregroundColor
          Color of foreground.
protected  java.lang.String m_foregroundImage
          URL of foreground image.
protected  java.lang.String m_foregroundImageRepeat
          Repeat type of foreground image.
protected  java.awt.Color[] m_lightColor
          Colors of light sources
protected  PdVector[] m_lightInterest
          Point of interest of light sources or extension of color cube resp. hue.
protected  PdVector[] m_lightPosition
          Position of light sources in euclidean space.
protected  int[] m_lightType
          Type of light sources.
protected  int m_numCameras
          Number of currently allocated cameras.
protected  int m_numLights
          Number of currently allocated lights.
protected  java.lang.String m_title
          Title of display, length up to one line.
protected  java.lang.String m_version
          Version number of the data of this display.
protected  java.lang.String m_versionType
          Type of version of the data of this display in {"dump","beta","final"}.
protected  PdVector m_viewCenter
          Center of viewer, relative to bounding box
protected  java.awt.Point m_windowPosition
          Position of display window.
protected  java.awt.Dimension m_windowSize
          Dimension of display window.
static int SHOW_ANTIALIAS
          Enable antialiasing of display.
static int SHOW_AUTOROTATE
          Enable auto rotation in display.
static int SHOW_AXES
          Enable drawing of a coordinate axes around scene in the display.
static int SHOW_AXES_LABEL
          Enable drawing of labels of coordinate axes.
static int SHOW_BACKGROUND_IMAGE
          Enable drawing of image in the background.
static int SHOW_BORDER
          Enable drawing of sunk border around display canvas.
static int SHOW_BOUNDING_BOX
          Enable drawing of bounding box around scene.
static int SHOW_CROSS
          Enable drawing of cross at current cursor position.
static int SHOW_DEPTHCUE
          Enable drawing of sunk border around display canvas.
static int SHOW_DRAWING
          Enable drawing in display canvas, default enabled.
static int SHOW_EDGE_AURA
          Enable drawing of aura in background color around each edge.
static int SHOW_FOREGROUND_IMAGE
          Enable drawing of image in the foreground.
static int SHOW_FRAME
          Enable drawing of a small coordinate frame in the lower left corner of the display.
static int SHOW_INFO
          Enable drawing of additional information close to cursor in overlay window.
static int SHOW_LIGHTING
          Enable drawing of sunk border around display canvas.
static int SHOW_MAGNET
          Attach cursor to vertices of nearby.
static int SHOW_SINGLE
          Restrict drawing to a single geometry at the same time.
static int SHOW_SORTING
          Enable sorting of geometry items according to Painter's algorithm.
static int SHOW_VISIBLE
          Enable visibility of display.
static int SHOW_XY_GRID
          Enable drawing of coordinate grid in xy plane.
static int SHOW_XZ_GRID
          Enable drawing of coordinate grid in xz plane.
static int SHOW_YZ_GRID
          Enable drawing of coordinate grid in yz plane.
static int SHOW_ZBUFFER
          Enable drawing in z-buffer mode.
 
Fields inherited from class jv.vecmath.P_Vector
BITS, m_bits, m_constraint, m_name, MASK, NUM_BITS
 
Constructor Summary
PvDisplayOption()
          Constructor sets all values to defaults.
 
Method Summary
 void configure(PvDisplayIf disp)
          Configure a display with data from a given option class.
 java.lang.String getAbstract()
           
 java.awt.Color getAmbientLight()
           
 PiVector getAxesEdge()
           
 java.lang.String[] getAxesLabel()
           
 java.awt.Color getBackgroundColor()
           
 java.lang.String getBackgroundImage()
           
 java.lang.String getBackgroundImageRepeat()
           
 int getCameraAmbient(int ind)
           
 double getCameraAngle(int ind)
           
 double getCameraFarClip(int ind)
           
 PdVector getCameraInterest(int ind)
           
 double getCameraNearClip(int ind)
           
 int getCameraPerspective(int ind)
           
 PdVector getCameraPosition(int ind)
           
 int getCameraProjection(int ind)
           
 double getCameraRoll(int ind)
           
 int getCurrentCamera()
           
 java.awt.Color getForegroundColor()
           
 java.lang.String getForegroundImage()
           
 java.lang.String getForegroundImageRepeat()
           
 java.awt.Color getLightColor(int ind)
           
 PdVector getLightInterest(int ind)
           
 PdVector getLightPosition(int ind)
           
 int getLightType(int ind)
           
 int getNumCameras()
           
 int getNumLights()
           
protected  boolean getOption(int flag)
          Check whether either of the bits in parameter has been set.
 java.lang.String getTitle()
           
 java.lang.String getVersion()
           
 java.lang.String getVersionType()
           
 java.awt.Point getWindowPosition()
           
 java.awt.Dimension getWindowSize()
           
 boolean isEnabledCameraClip(int ind)
           
 boolean isEnabledCameraTransform(int ind)
           
 void setAbstract(java.lang.String abstr)
           
 void setAmbientLight(java.awt.Color color)
           
 void setAxesEdge(PiVector edges)
           
 void setAxesLabel(java.lang.String[] labels)
           
 void setBackgroundColor(java.awt.Color color)
           
 void setBackgroundImage(java.lang.String image)
           
 void setBackgroundImageRepeat(java.lang.String repeat)
           
 void setCameraAmbient(int ind, int ambient)
           
 void setCameraAngle(int ind, double angle)
           
 void setCameraFarClip(int ind, double dist)
           
 void setCameraInterest(int ind, PdVector interest)
           
 void setCameraNearClip(int ind, double dist)
           
 void setCameraPerspective(int ind, int perspective)
           
 void setCameraPosition(int ind, PdVector position)
           
 void setCameraProjection(int ind, int projection)
           
 void setCameraRoll(int ind, double roll)
           
 void setCurrentCamera(int type)
           
 void setEnabledCameraClip(int ind, boolean v)
           
 void setEnabledCameraTransform(int ind, boolean v)
           
 void setForegroundColor(java.awt.Color color)
           
 void setForegroundImage(java.lang.String image)
           
 void setForegroundImageRepeat(java.lang.String repeat)
           
 void setLightColor(int ind, java.awt.Color color)
           
 void setLightInterest(int ind, PdVector direction)
           
 void setLightPosition(int ind, PdVector position)
           
 void setLightType(int ind, int type)
           
 void setNumCameras(int num)
           
 void setNumLights(int num)
           
protected  void setOption(int flag, boolean val)
          Set all bits which are set in parameter.
 void setOptions(PvDisplayIf disp)
          Set this option class with data extracted from a display.
 void setTitle(java.lang.String title)
           
 void setVersion(java.lang.String version)
           
 void setVersionType(java.lang.String versionType)
           
 void setWindowPosition(int x, int y)
           
 void setWindowSize(int width, int height)
           
 
Methods inherited from class jv.vecmath.P_Vector
clearTag, clone, clone, copy, getBits, getName, hasTag, setName, setTag, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SHOW_ANTIALIAS

public static final int SHOW_ANTIALIAS
Enable antialiasing of display. Currently not supported.

SHOW_AUTOROTATE

public static final int SHOW_AUTOROTATE
Enable auto rotation in display.

SHOW_AXES

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

SHOW_AXES_LABEL

public static final int SHOW_AXES_LABEL
Enable drawing of labels of coordinate axes.

SHOW_BACKGROUND_IMAGE

public static final int SHOW_BACKGROUND_IMAGE
Enable drawing of image in the background. If disabled background color is used.

SHOW_BORDER

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

SHOW_BOUNDING_BOX

public static final int SHOW_BOUNDING_BOX
Enable drawing of bounding box around scene.

SHOW_CROSS

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

SHOW_DEPTHCUE

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

SHOW_DRAWING

public static final int SHOW_DRAWING
Enable drawing in display canvas, default enabled.

SHOW_EDGE_AURA

public static final int SHOW_EDGE_AURA
Enable drawing of aura in background color around each edge.

SHOW_FOREGROUND_IMAGE

public static final int SHOW_FOREGROUND_IMAGE
Enable drawing of image in the foreground. If disabled foreground color is used.

SHOW_FRAME

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

SHOW_INFO

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

SHOW_LIGHTING

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

SHOW_MAGNET

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

SHOW_SINGLE

public static final int SHOW_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.


SHOW_SORTING

public static final int SHOW_SORTING
Enable sorting of geometry items according to Painter's algorithm.

SHOW_VISIBLE

public static final int SHOW_VISIBLE
Enable visibility of display.

SHOW_XY_GRID

public static final int SHOW_XY_GRID
Enable drawing of coordinate grid in xy plane.

SHOW_XZ_GRID

public static final int SHOW_XZ_GRID
Enable drawing of coordinate grid in xz plane.

SHOW_YZ_GRID

public static final int SHOW_YZ_GRID
Enable drawing of coordinate grid in yz plane.

SHOW_ZBUFFER

public static final int SHOW_ZBUFFER
Enable drawing in z-buffer mode.

LIGHT_BULB

public static final int LIGHT_BULB
Physical light which has a position, possible direction, and color.

LIGHT_RGB_CUBE

public static final int LIGHT_RGB_CUBE
Virtual light which colors a cube by mapping it onto the rgb cube.

LIGHT_HUE

public static final int LIGHT_HUE
Virtual light which colors a direction with rainbow colors.

LIGHT_SPOT

public static final int LIGHT_SPOT
Virtual light which colors a direction with rainbow colors.

LIGHT_SUN

public static final int LIGHT_SUN
Virtual light which colors a direction with rainbow colors.

m_version

protected java.lang.String m_version
Version number of the data of this display.

m_versionType

protected java.lang.String m_versionType
Type of version of the data of this display in {"dump","beta","final"}.

m_title

protected java.lang.String m_title
Title of display, length up to one line.

m_abstract

protected java.lang.String m_abstract
Verbal description of these display settings.

m_dim

protected int m_dim
Dimension of geometries

m_axesLabel

protected java.lang.String[] m_axesLabel
Labels for all axes

m_numCameras

protected int m_numCameras
Number of currently allocated cameras.

m_currentCamera

protected int m_currentCamera
Index of currently active camera.

m_cameraProjection

protected int[] m_cameraProjection
Projection algorithm used by camera to project from higher dimensional spaces.

m_cameraPosition

protected PdVector[] m_cameraPosition
Position of the camera in world coordinates.

m_cameraInterest

protected PdVector[] m_cameraInterest
Camera interest in world coordinates, i.e. the point at which the camera is pointing.

m_cameraRoll

protected double[] m_cameraRoll
Roll of camera around its viewing direction in angles.

m_cameraAngle

protected double[] m_cameraAngle
Field of view of camera lens.

m_cameraEnableTransform

protected boolean[] m_cameraEnableTransform
Flag whether camera allows transformation of selected model.

m_cameraAmbient

protected int[] m_cameraAmbient
Ambient space of camera.

m_cameraPerspective

protected int[] m_cameraPerspective
Perspective algorithm used by camera to project from higher dimensional spaces.

m_cameraEnableClip

protected boolean[] m_cameraEnableClip
Flag whether clipping is enabled in this camera.

m_cameraNearClip

protected double[] m_cameraNearClip
Distance of near clipping plane.

m_cameraFarClip

protected double[] m_cameraFarClip
Distance of far clipping plane.

m_numLights

protected int m_numLights
Number of currently allocated lights.

m_ambientLight

protected java.awt.Color m_ambientLight
Color of ambient light

m_lightType

protected int[] m_lightType
Type of light sources.

m_lightPosition

protected PdVector[] m_lightPosition
Position of light sources in euclidean space.

m_lightInterest

protected PdVector[] m_lightInterest
Point of interest of light sources or extension of color cube resp. hue.

m_lightColor

protected java.awt.Color[] m_lightColor
Colors of light sources

m_backgroundColor

protected java.awt.Color m_backgroundColor
Color of background.

m_backgroundImageRepeat

protected java.lang.String m_backgroundImageRepeat
Repeat type of background image.

m_backgroundImage

protected java.lang.String m_backgroundImage
URL of background image.

m_foregroundColor

protected java.awt.Color m_foregroundColor
Color of foreground.

m_foregroundImageRepeat

protected java.lang.String m_foregroundImageRepeat
Repeat type of foreground image.

m_foregroundImage

protected java.lang.String m_foregroundImage
URL of foreground image.

m_windowPosition

protected java.awt.Point m_windowPosition
Position of display window.

m_windowSize

protected java.awt.Dimension m_windowSize
Dimension of display window.

m_viewCenter

protected PdVector m_viewCenter
Center of viewer, relative to bounding box

m_axesEdge

protected PiVector m_axesEdge
Axes on edges of bounding box
Constructor Detail

PvDisplayOption

public PvDisplayOption()
Constructor sets all values to defaults.
Method Detail

getOption

protected boolean getOption(int flag)
Check whether either of the bits in parameter has been set.
See Also:
setOption(int, boolean)

setOption

protected void setOption(int flag,
                         boolean val)
Set all bits which are set in parameter. See jv.project.PvDisplayIf for a list of possible flags.
See Also:
getOption(int)

getVersion

public java.lang.String getVersion()

getVersionType

public java.lang.String getVersionType()

getTitle

public java.lang.String getTitle()

getAbstract

public java.lang.String getAbstract()

setVersion

public void setVersion(java.lang.String version)

setVersionType

public void setVersionType(java.lang.String versionType)

setTitle

public void setTitle(java.lang.String title)

setAbstract

public void setAbstract(java.lang.String abstr)

getCurrentCamera

public int getCurrentCamera()

setCurrentCamera

public void setCurrentCamera(int type)

getCameraProjection

public int getCameraProjection(int ind)

setCameraProjection

public void setCameraProjection(int ind,
                                int projection)

getCameraPosition

public PdVector getCameraPosition(int ind)

setCameraPosition

public void setCameraPosition(int ind,
                              PdVector position)

getCameraInterest

public PdVector getCameraInterest(int ind)

setCameraInterest

public void setCameraInterest(int ind,
                              PdVector interest)

getCameraAngle

public double getCameraAngle(int ind)

setCameraAngle

public void setCameraAngle(int ind,
                           double angle)

getCameraRoll

public double getCameraRoll(int ind)

setCameraRoll

public void setCameraRoll(int ind,
                          double roll)

isEnabledCameraTransform

public boolean isEnabledCameraTransform(int ind)

setEnabledCameraTransform

public void setEnabledCameraTransform(int ind,
                                      boolean v)

getCameraAmbient

public int getCameraAmbient(int ind)

setCameraAmbient

public void setCameraAmbient(int ind,
                             int ambient)

getCameraPerspective

public int getCameraPerspective(int ind)

setCameraPerspective

public void setCameraPerspective(int ind,
                                 int perspective)

isEnabledCameraClip

public boolean isEnabledCameraClip(int ind)

setEnabledCameraClip

public void setEnabledCameraClip(int ind,
                                 boolean v)

getCameraNearClip

public double getCameraNearClip(int ind)

setCameraNearClip

public void setCameraNearClip(int ind,
                              double dist)

getCameraFarClip

public double getCameraFarClip(int ind)

setCameraFarClip

public void setCameraFarClip(int ind,
                             double dist)

getNumCameras

public int getNumCameras()

setNumCameras

public void setNumCameras(int num)

getAmbientLight

public java.awt.Color getAmbientLight()

setAmbientLight

public void setAmbientLight(java.awt.Color color)

getLightType

public int getLightType(int ind)

setLightType

public void setLightType(int ind,
                         int type)

getLightPosition

public PdVector getLightPosition(int ind)

setLightPosition

public void setLightPosition(int ind,
                             PdVector position)

getLightInterest

public PdVector getLightInterest(int ind)

setLightInterest

public void setLightInterest(int ind,
                             PdVector direction)

getLightColor

public java.awt.Color getLightColor(int ind)

setLightColor

public void setLightColor(int ind,
                          java.awt.Color color)

getNumLights

public int getNumLights()

setNumLights

public void setNumLights(int num)

getBackgroundColor

public java.awt.Color getBackgroundColor()

setBackgroundColor

public void setBackgroundColor(java.awt.Color color)

getBackgroundImageRepeat

public java.lang.String getBackgroundImageRepeat()

setBackgroundImageRepeat

public void setBackgroundImageRepeat(java.lang.String repeat)

getBackgroundImage

public java.lang.String getBackgroundImage()

setBackgroundImage

public void setBackgroundImage(java.lang.String image)

getForegroundColor

public java.awt.Color getForegroundColor()

setForegroundColor

public void setForegroundColor(java.awt.Color color)

getForegroundImageRepeat

public java.lang.String getForegroundImageRepeat()

setForegroundImageRepeat

public void setForegroundImageRepeat(java.lang.String repeat)

getForegroundImage

public java.lang.String getForegroundImage()

setForegroundImage

public void setForegroundImage(java.lang.String image)

getWindowPosition

public java.awt.Point getWindowPosition()

setWindowPosition

public void setWindowPosition(int x,
                              int y)

getWindowSize

public java.awt.Dimension getWindowSize()

setWindowSize

public void setWindowSize(int width,
                          int height)

getAxesLabel

public java.lang.String[] getAxesLabel()

setAxesLabel

public void setAxesLabel(java.lang.String[] labels)

getAxesEdge

public PiVector getAxesEdge()

setAxesEdge

public void setAxesEdge(PiVector edges)

configure

public void configure(PvDisplayIf disp)
Configure a display with data from a given option class. This method does not repaint or update the display.

setOptions

public void setOptions(PvDisplayIf disp)
Set this option class with data extracted from a display.

JavaView® v2.00.008

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