Class PvDisplayOption
- java.lang.Object
-
- jv.vecmath.P_Vector
-
- jv.loader.PvDisplayOption
-
- All Implemented Interfaces:
- java.io.Serializable
public final 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.Since v1.90 of PvDisplayOption, different constructors are available to use strong consistency with default settings of jv-disp.dtd, or to enable modified configurations of the JavaView display. Note, loading a model with JVD settings from file will enforce settings of the JVD file, while loading a model without JVD settings may use the current modified settings of JavaView.
For example, zBuffer has recently been enabled by default in the display and thus is active in TYPE_DISP, while its default value is still disabled in TYPE_DTD.
- See Also:
PvDisplayLoader, Serialized Form- Author:
- Konrad Polthier
- Version:
- 07.06.15, 1.90 revised (kp) Provide different constructors to change default settings.
27.03.15, 1.80 revised (kp) Enabled by default: copyright, sceneGraph and zBuffer.
12.02.14, 1.71 revised (kp) Scenegraph added.
23.08.06, 1.70 revised (ur) Preview image added.
11.08.03, 1.60 revised (kp) Author information added.
11.06.03, 1.50 revised (ur) Size and position in an array of displays added.
15.11.02, 1.40 revised (kp) Handling of images for back/foreground added.
23.09.01, 1.30 revised (kp) Get/set camera transformation matrix implemented.
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)
-
-
Field Summary
Fields Modifier and Type Field and Description static intSHOW_3DLOOKEnable 3D look of lines and points.static intSHOW_ADAPTIVE_SIZEEnable adaptive size of lines and points.static intSHOW_ANTIALIASEnable antialiasing of display.static intSHOW_AUTOCENTEREnable auto rotation in display.static intSHOW_AUTOFITEnable auto rotation in display.static intSHOW_AUTOROTATEEnable auto rotation in display.static intSHOW_AXESEnable drawing of a coordinate axes around scene in the display.static intSHOW_AXES_AUTO_BOUNDSFlag specifies whether axes is in auto-bounds mode.static intSHOW_AXES_AUTO_CONFIGUREDeprecated.since JavaView 3.62.001, use SHOW_AXES_AUTO_HASHING.static intSHOW_AXES_AUTO_HASHINGFlag specifies whether axes is in auto-hashing mode.static intSHOW_AXES_AUTO_LAYOUTFlag specifies whether axes is in auto-layout mode.static intSHOW_AXES_LABELDeprecated.used SHOW_AXES_NUMBERSstatic intSHOW_AXES_NAMEEnable drawing of name of coordinate axes.static intSHOW_AXES_NUMBERSEnable drawing of numbers of coordinate axes.static intSHOW_AXES_TITLEDeprecated.use SHOW_AXES_NAMEstatic intSHOW_BACKGROUND_IMAGEEnable drawing of image in the background.static intSHOW_BORDEREnable drawing of sunk border around display canvas.static intSHOW_BOUNDING_BOXEnable drawing of bounding box around scene.static intSHOW_BOX_RATIOEnable usage of different scaling of axis.static intSHOW_CENTEREnable drawing of center of geometries.static intSHOW_CLEAR_SCREENEnable reduction of number of edge drawings, each face edge is drawn only once.static intSHOW_CLIP_AUTO_BOUNDSFlag specifies whether clipRange is in auto-bounds mode.static intSHOW_CLIP_BOUNDSEnable clipping of coordinate axes.static intSHOW_COPYRIGHTEnable drawing of copyright information.static intSHOW_CROSSEnable drawing of cross at current cursor position.static intSHOW_DEPTHCUEEnable drawing of sunk border around display canvas.static intSHOW_DIRECT_SELECTEnable selection of geometries by simple pick with mouse.static intSHOW_DOUBLEBUFFEREnable drawing of a double buffered image in display canvas, default enabled.static intSHOW_DRAWINGEnable drawing in display canvas, default enabled.static intSHOW_EDGE_AURAEnable drawing of aura in background color around each edge.static intSHOW_EDGES_ONCEEnable reduction of number of edge drawings, each face edge is drawn only once.static intSHOW_FILL_DISPLAYDetermines if filling of display is enabled.static intSHOW_FOREGROUND_IMAGEEnable drawing of image in the foreground.static intSHOW_FRAMEEnable drawing of a small coordinate frame in the lower left corner of the display.static intSHOW_INFOEnable drawing of additional information close to cursor in overlay window.static intSHOW_INTEGER_PICKEnable picking constraint to an integer grid.static intSHOW_LIGHTINGEnable drawing of sunk border around display canvas.static intSHOW_LOCAL_TRANSFORMUse local coordinate system of geometry to calculate transformations.static intSHOW_MAGNETAttach cursor to vertices of nearby.static intSHOW_SCENEGRAPHEnable showing of scene graph navigation in display.static intSHOW_SINGLERestrict drawing to a single geometry at the same time.static intSHOW_SORTINGEnable sorting of geometry items according to Painter's algorithm.static intSHOW_TITLEEnable showing of title of display north in the display.static intSHOW_VISIBLEEnable visibility of display.static intSHOW_XY_GRIDEnable drawing of coordinate grid in xy plane.static intSHOW_XZ_GRIDEnable drawing of coordinate grid in xz plane.static intSHOW_YZ_GRIDEnable drawing of coordinate grid in yz plane.static intSHOW_ZBUFFEREnable drawing in z-buffer mode.static intTYPE_DISPOptions are equal to default settings of display of current JavaView version (DEFAULT).static intTYPE_DTDOptions are equal to default settings of jv-disp.dtd.
-
Constructor Summary
Constructors Constructor and Description PvDisplayOption()Default constructor sets all values to defaults.PvDisplayOption(int type)Constructor sets all values to according to given display type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidconfigure(PvDisplayIf disp)Configure the given display with data from this option class.java.lang.StringgetAbstract()java.awt.ColorgetAmbientLight()intgetArrayPosition()Get position of display within an array of displays.java.awt.DimensiongetArraySize()Get dimension of array of displays.PsAuthorInfogetAuthorInfo()PgAxesgetAxes()intgetAxesCoordSystem()Get coordinate system in which axes are shown.PiVectorgetAxesEdge()Currently unused except in PgMathLoader.boolean[]getAxesHash()java.lang.String[]getAxesLabel()intgetAxesType()Get type of coordinate axes, see PgAxes.AXES_xxx.java.awt.ColorgetBackgroundColor()Get color of background of display.java.awt.ImagegetBackgroundImage()Get background image of display canvas.java.lang.StringgetBackgroundImageFile()Get background image filename of display canvas.intgetBackgroundImageFit()Get the mode determining how a background image is scaled w.r.t. the display canvas.java.awt.ColorgetBndBoxColor()Get color of bounding box.doublegetBndBoxSize()Get thickness of edges of bounding box.PdVectorgetBoxRatio()Get scaling factors of edges of the bounding box.doublegetCameraAngle(int ind)deprecated use getCameraFieldOfView(int)doublegetCameraFarClip(int ind)doublegetCameraFieldOfView(int ind)Get opening angle of camera in degrees in [0,180].PdVectorgetCameraInterest(int ind)PdMatrixgetCameraMatrix(int ind)Get the 4*4 camera transformation matrix.java.lang.StringgetCameraName(int ind)doublegetCameraNearClip(int ind)PdVectorgetCameraPosition(int ind)intgetCameraProjection(int ind)doublegetCameraRoll(int ind)double[]getClipBounds(int ind)Get minimum and maximum in one dimension of the clipping box.intgetClipBoundsType()Get index of axis which is selected when scene clip bounds is active or becomes active.intgetCurrentCamera()intgetDimAxes()java.awt.ColorgetForegroundColor()Get foreground color.java.awt.ImagegetForegroundImage()Get foreground image of display canvas.java.lang.StringgetForegroundImageFile()Get foreground image filename of display canvas.intgetForegroundImageFit()Get the mode determining how a foreground image is scaled w.r.t. the display canvas.doublegetLightAngle(int ind)java.awt.ColorgetLightColor(int ind)doublegetLightCorona(int ind)doublegetLightExponent(int ind)doublegetLightFalloff(int ind)intgetLightingModel()doublegetLightIntensity(int ind)PdVectorgetLightInterest(int ind)java.lang.StringgetLightName(int ind)PdVectorgetLightPosition(int ind)intgetLightReference(int ind)intgetLightShading(int ind)intgetLightType(int ind)intgetMajorMode()Get major transformation mode of display used with left-mouse.intgetNumCameras()intgetNumLights()Get number of available lights.intgetNumRulers()booleangetOption(int flag)Check whether either of the bits in parameter has been set.java.awt.ImagegetPreviewImage()Get dimension of array of displays.java.awt.ColorgetRulerColor(int ind)Get polygon color of axis with given index.doublegetRulerMajorHashUnit(int ind)Get distance between two adjacent major hashings, used in PgRuler.HASH_FIXED mode.doublegetRulerMaxValue(int ind)Get maximum ruler value.doublegetRulerMinorHashUnit(int ind)Get distance between two adjacent minor hashings, used in PgRuler.HASH_FIXED mode.doublegetRulerMinValue(int ind)Get minimum ruler value.intgetRulerMode(int ind)java.lang.StringgetRulerName(int ind)intgetRulerNumMajorHashings(int ind)Get number of major hashings, used in PgRuler.HASH_PARTITIONED mode..intgetRulerNumMinorHashings(int ind)Get number of minor hashings, used in PgRuler.HASH_PARTITIONED mode..doublegetRulerSize(int ind)Get polygon size of axis with given index.java.lang.String[]getSearchPaths()Get image search paths.intgetSelectedLight()java.lang.StringgetTitle()intgetTransformMode()Get transformation of display, i.e. if scene, model or ambient transformation is active.java.lang.StringgetVersion()java.lang.StringgetVersionType()java.awt.PointgetWindowPosition()Get upper left corner of frame containing the display.java.awt.DimensiongetWindowSize()Get size of display within its frame.booleanisEnabledCameraClip(int ind)booleanisEnabledCameraSceneRatio(int ind)booleanisLightHighlight(int ind)booleanisLightSwitchedOn(int ind)booleanisLightVisible(int ind)booleanisShowingRuler(int ind)booleanisShowingRulerArrow(int ind)Check if arrow at positive end of ruler is shown.booleanisShowingRulerHashingsNormal(int ind)booleanisShowingRulerHashingsUp(int ind)booleanisShowingRulerName(int ind)Check if name of ruler is shown at positive end of ruler.booleanisShowingRulerNumbers(int ind)booleanisShowingRulerTicksMajor(int ind)booleanisShowingRulerTicksMinor(int ind)voidsetAbstract(java.lang.String abstr)voidsetAmbientLight(java.awt.Color ambient)voidsetArrayPosition(int pos)Set position of display within an array of displays.voidsetArraySize(java.awt.Dimension dim)Set dimension of array of displays.voidsetAuthorInfo(PsAuthorInfo authors)voidsetAxes(PgAxes axes)voidsetAxesCoordSystem(int coordSystem)Set coordinate system in which axes are shown.voidsetAxesEdge(PiVector edges)Currently unused except in PgMathLoader.voidsetAxesHash(boolean[] flag)voidsetAxesLabel(java.lang.String[] labels)voidsetAxesType(int type)Set type of coordinate axes, see PgAxes.AXES_xxx.voidsetBackgroundColor(java.awt.Color color)Set color of background of display.voidsetBackgroundImage(java.awt.Image image)Set background image of display canvas.voidsetBackgroundImageFile(java.lang.String fileName)Set filename of background image of display canvas.voidsetBackgroundImageFit(int repeat)Set the mode determining how a background image is scaled w.r.t. the display canvas.voidsetBndBoxColor(java.awt.Color col)Set color of bounding box.voidsetBndBoxSize(double size)Set thickness of edges of bounding box.voidsetBoxRatio(PdVector ratio)Set scaling factors of edges of the bounding box.voidsetCameraAngle(int ind, double angle)deprecated use setCameraFieldOfView(int, double)voidsetCameraFarClip(int ind, double dist)voidsetCameraFieldOfView(int ind, double angle)Set opening angle of camera in degrees in [0,180].voidsetCameraInterest(int ind, PdVector interest)voidsetCameraMatrix(int ind, PdMatrix trans)Set the 4*4 camera transformation matrix.voidsetCameraName(int ind, java.lang.String name)voidsetCameraNearClip(int ind, double dist)voidsetCameraPosition(int ind, PdVector position)voidsetCameraProjection(int ind, int projection)voidsetCameraRoll(int ind, double roll)voidsetClipBounds(int ind, double[] range)Set minimum and maximum in one dimension of the clipping box.voidsetClipBoundsType(int type)Set index of axis which is selected when scene clip bounds is active of becomes active.voidsetCurrentCamera(int type)voidsetEnabledCameraClip(int ind, boolean v)voidsetEnabledCameraSceneRatio(int ind, boolean v)voidsetForegroundColor(java.awt.Color color)Set foreground color.voidsetForegroundImage(java.awt.Image image)Set foreground image of display canvas.voidsetForegroundImageFile(java.lang.String fileName)Set foreground image of display canvas.voidsetForegroundImageFit(int repeat)Set the mode determining how a background image is scaled w.r.t. the display canvas.voidsetLightAngle(int ind, double angle)voidsetLightColor(int ind, java.awt.Color color)voidsetLightCorona(int ind, double corona)voidsetLightExponent(int ind, double exp)voidsetLightFalloff(int ind, double falloff)voidsetLightHighlight(int ind, boolean flag)voidsetLightingModel(int ind)voidsetLightIntensity(int ind, double intensity)voidsetLightInterest(int ind, PdVector direction)voidsetLightName(int ind, java.lang.String name)voidsetLightPosition(int ind, PdVector position)voidsetLightReference(int ind, int reference)voidsetLightShading(int ind, int shading)voidsetLightSwitchedOn(int ind, boolean flag)voidsetLightType(int ind, int type)voidsetLightVisible(int ind, boolean flag)voidsetMajorMode(int mode)Set major transformation mode of display used with left-mouse.voidsetNumCameras(int num)voidsetNumLights(int num)Allocate given number of lights.voidsetNumRulers(int num)voidsetOption(int flag, boolean val)Set all bits which are set in parameter.voidsetOptions(PvDisplayIf disp)Initialize this option class with data extracted from the given display.voidsetPreviewImage(java.awt.Image image)Set preview image.voidsetRulerColor(int ind, java.awt.Color col)Set polygon color of axis with given index.voidsetRulerMajorHashUnit(int ind, double size)Set distance between two adjacent major hashings, used in PgRuler.HASH_FIXED mode.voidsetRulerMaxValue(int ind, double size)Set maximum ruler value.voidsetRulerMinorHashUnit(int ind, double size)Set distance between two adjacent minor hashings, used in PgRuler.HASH_FIXED mode.voidsetRulerMinValue(int ind, double size)Set minimum ruler value.voidsetRulerMode(int ind, int mode)voidsetRulerName(int ind, java.lang.String name)voidsetRulerNumMajorHashings(int ind, int num)Set number of major hashings, used in PgRuler.HASH_PARTITIONED mode..voidsetRulerNumMinorHashings(int ind, int num)Set number of minor hashings, used in PgRuler.HASH_PARTITIONED mode..voidsetRulerSize(int ind, double size)Set polygon size of axis with given index.voidsetSearchPaths(java.lang.String[] searchPath)Set image search paths.voidsetSelectedLight(int ind)voidsetTitle(java.lang.String title)voidsetTransformMode(int mode)Set transformation of display, i.e. if scene, model or ambient transformation is active.voidsetVersion(java.lang.String version)voidsetVersionType(java.lang.String versionType)voidsetWindowPosition(int x, int y)deprecated use setWindowPosition(Point)voidsetWindowPosition(java.awt.Point pos)Set upper left corner of frame containing the display.voidsetWindowSize(java.awt.Dimension dim)Set size of display within its frame.voidsetWindowSize(int x, int y)deprecated use setWindowSize(Dimension)voidshowRuler(int ind, boolean flag)voidshowRulerArrow(int ind, boolean flag)Determine if arrow at positive end of ruler is shown.voidshowRulerHashingsNormal(int ind, boolean flag)voidshowRulerHashingsUp(int ind, boolean flag)voidshowRulerName(int ind, boolean flag)Determine if name of ruler is shown at positive end of ruler.voidshowRulerNumbers(int ind, boolean flag)voidshowRulerTicksMajor(int ind, boolean flag)voidshowRulerTicksMinor(int ind, boolean flag)
-
-
-
Field Detail
-
TYPE_DISP
public static final int TYPE_DISP
Options are equal to default settings of display of current JavaView version (DEFAULT). Default setup of the JavaView display may change over time, thus loaders not relying on the setting of a JavaView JVD file will update when changes to the default settings of JavaView happen. Thus, rendering of OBJ, WRL, etc. models might slightly change over time.- See Also:
- Constant Field Values
-
TYPE_DTD
public static final int TYPE_DTD
Options are equal to default settings of jv-disp.dtd. Since the default values given in jv-disp.dtd will never change, JVD-files are assured to be always parsed exactly, for a long time. Thus, rendering of models with JVD settings loaded will remain the same over time.- See Also:
- Constant Field Values
-
SHOW_ANTIALIAS
public static final int SHOW_ANTIALIAS
Enable antialiasing of display. Currently not supported.- See Also:
- Constant Field Values
-
SHOW_AUTOCENTER
public static final int SHOW_AUTOCENTER
Enable auto rotation in display.- See Also:
- Constant Field Values
-
SHOW_AUTOFIT
public static final int SHOW_AUTOFIT
Enable auto rotation in display.- See Also:
- Constant Field Values
-
SHOW_AUTOROTATE
public static final int SHOW_AUTOROTATE
Enable auto rotation in display.- See Also:
- Constant Field Values
-
SHOW_AXES
public static final int SHOW_AXES
Enable drawing of a coordinate axes around scene in the display.- See Also:
- Constant Field Values
-
SHOW_AXES_AUTO_BOUNDS
public static final int SHOW_AXES_AUTO_BOUNDS
Flag specifies whether axes is in auto-bounds mode.- See Also:
- Constant Field Values
-
SHOW_AXES_AUTO_CONFIGURE
public static final int SHOW_AXES_AUTO_CONFIGURE
Deprecated. since JavaView 3.62.001, use SHOW_AXES_AUTO_HASHING.Flag specifies whether axes is in auto-configure mode.- See Also:
- Constant Field Values
-
SHOW_AXES_AUTO_HASHING
public static final int SHOW_AXES_AUTO_HASHING
Flag specifies whether axes is in auto-hashing mode.- See Also:
- Constant Field Values
-
SHOW_AXES_AUTO_LAYOUT
public static final int SHOW_AXES_AUTO_LAYOUT
Flag specifies whether axes is in auto-layout mode.- See Also:
- Constant Field Values
-
SHOW_AXES_NAME
public static final int SHOW_AXES_NAME
Enable drawing of name of coordinate axes.- See Also:
- Constant Field Values
-
SHOW_AXES_NUMBERS
public static final int SHOW_AXES_NUMBERS
Enable drawing of numbers of coordinate axes.- See Also:
- Constant Field Values
-
SHOW_AXES_LABEL
public static final int SHOW_AXES_LABEL
Deprecated. used SHOW_AXES_NUMBERSEnable drawing of numbers of coordinate axes.- See Also:
- Constant Field Values
-
SHOW_AXES_TITLE
public static final int SHOW_AXES_TITLE
Deprecated. use SHOW_AXES_NAMEEnable drawing of title respectively name of coordinate axes.- See Also:
- Constant Field Values
-
SHOW_BACKGROUND_IMAGE
public static final int SHOW_BACKGROUND_IMAGE
Enable drawing of image in the background. If disabled background color is used.- See Also:
- Constant Field Values
-
SHOW_BORDER
public static final int SHOW_BORDER
Enable drawing of sunk border around display canvas.- See Also:
- Constant Field Values
-
SHOW_BOUNDING_BOX
public static final int SHOW_BOUNDING_BOX
Enable drawing of bounding box around scene.- See Also:
- Constant Field Values
-
SHOW_CENTER
public static final int SHOW_CENTER
Enable drawing of center of geometries.- See Also:
- Constant Field Values
-
SHOW_CROSS
public static final int SHOW_CROSS
Enable drawing of cross at current cursor position.- See Also:
- Constant Field Values
-
SHOW_DEPTHCUE
public static final int SHOW_DEPTHCUE
Enable drawing of sunk border around display canvas.- See Also:
- Constant Field Values
-
SHOW_DOUBLEBUFFER
public static final int SHOW_DOUBLEBUFFER
Enable drawing of a double buffered image in display canvas, default enabled.- See Also:
- Constant Field Values
-
SHOW_DRAWING
public static final int SHOW_DRAWING
Enable drawing in display canvas, default enabled.- See Also:
- Constant Field Values
-
SHOW_EDGE_AURA
public static final int SHOW_EDGE_AURA
Enable drawing of aura in background color around each edge.- See Also:
- Constant Field Values
-
SHOW_FOREGROUND_IMAGE
public static final int SHOW_FOREGROUND_IMAGE
Enable drawing of image in the foreground. If disabled foreground color is used.- See Also:
- Constant Field Values
-
SHOW_FRAME
public static final int SHOW_FRAME
Enable drawing of a small coordinate frame in the lower left corner of the display.- See Also:
- Constant Field Values
-
SHOW_INFO
public static final int SHOW_INFO
Enable drawing of additional information close to cursor in overlay window.- See Also:
- Constant Field Values
-
SHOW_LIGHTING
public static final int SHOW_LIGHTING
Enable drawing of sunk border around display canvas.- See Also:
- Constant Field Values
-
SHOW_MAGNET
public static final int SHOW_MAGNET
Attach cursor to vertices of nearby.- See Also:
- Constant Field Values
-
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.
- See Also:
- Constant Field Values
-
SHOW_SORTING
public static final int SHOW_SORTING
Enable sorting of geometry items according to Painter's algorithm.- See Also:
- Constant Field Values
-
SHOW_VISIBLE
public static final int SHOW_VISIBLE
Enable visibility of display.- See Also:
- Constant Field Values
-
SHOW_XY_GRID
public static final int SHOW_XY_GRID
Enable drawing of coordinate grid in xy plane.- See Also:
- Constant Field Values
-
SHOW_XZ_GRID
public static final int SHOW_XZ_GRID
Enable drawing of coordinate grid in xz plane.- See Also:
- Constant Field Values
-
SHOW_YZ_GRID
public static final int SHOW_YZ_GRID
Enable drawing of coordinate grid in yz plane.- See Also:
- Constant Field Values
-
SHOW_ZBUFFER
public static final int SHOW_ZBUFFER
Enable drawing in z-buffer mode.- See Also:
- Constant Field Values
-
SHOW_LOCAL_TRANSFORM
public static final int SHOW_LOCAL_TRANSFORM
Use local coordinate system of geometry to calculate transformations.- See Also:
- Constant Field Values
-
SHOW_DIRECT_SELECT
public static final int SHOW_DIRECT_SELECT
Enable selection of geometries by simple pick with mouse.- See Also:
- Constant Field Values
-
SHOW_TITLE
public static final int SHOW_TITLE
Enable showing of title of display north in the display.- See Also:
- Constant Field Values
-
SHOW_COPYRIGHT
public static final int SHOW_COPYRIGHT
Enable drawing of copyright information.- See Also:
- Constant Field Values
-
SHOW_BOX_RATIO
public static final int SHOW_BOX_RATIO
Enable usage of different scaling of axis.- See Also:
- Constant Field Values
-
SHOW_FILL_DISPLAY
public static final int SHOW_FILL_DISPLAY
Determines if filling of display is enabled.- See Also:
- Constant Field Values
-
SHOW_CLIP_BOUNDS
public static final int SHOW_CLIP_BOUNDS
Enable clipping of coordinate axes.- See Also:
- Constant Field Values
-
SHOW_CLIP_AUTO_BOUNDS
public static final int SHOW_CLIP_AUTO_BOUNDS
Flag specifies whether clipRange is in auto-bounds mode.- See Also:
- Constant Field Values
-
SHOW_3DLOOK
public static final int SHOW_3DLOOK
Enable 3D look of lines and points.- See Also:
- Constant Field Values
-
SHOW_ADAPTIVE_SIZE
public static final int SHOW_ADAPTIVE_SIZE
Enable adaptive size of lines and points.- See Also:
- Constant Field Values
-
SHOW_INTEGER_PICK
public static final int SHOW_INTEGER_PICK
Enable picking constraint to an integer grid.- See Also:
- Constant Field Values
-
SHOW_EDGES_ONCE
public static final int SHOW_EDGES_ONCE
Enable reduction of number of edge drawings, each face edge is drawn only once.- See Also:
- Constant Field Values
-
SHOW_CLEAR_SCREEN
public static final int SHOW_CLEAR_SCREEN
Enable reduction of number of edge drawings, each face edge is drawn only once.- See Also:
- Constant Field Values
-
SHOW_SCENEGRAPH
public static final int SHOW_SCENEGRAPH
Enable showing of scene graph navigation in display.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PvDisplayOption
public PvDisplayOption()
Default constructor sets all values to defaults.
-
PvDisplayOption
public PvDisplayOption(int type)
Constructor sets all values to according to given display type. Possible arguments are for example PvDisplayOption#TYPE_DISP or PvDisplayOption#TYPE_DTD.Typical uses are PvDisplayOption#TYPE_DTD aiming at always same look of applets, or PvDisplayOption#TYPE_DISP when aiming at up-to-date configurations of the JavaView display.
-
-
Method Detail
-
getOption
public boolean getOption(int flag)
Check whether either of the bits in parameter has been set.- See Also:
setOption(int, boolean)
-
setOption
public void setOption(int flag, boolean val)Set all bits which are set in parameter. Seejv.project.PvDisplayIffor a list of possible flags.- See Also:
getOption(int),PvDisplayIf- Version:
- 13.03.03, 1.10 revised (kp) Special setting of axis values.
-
getVersion
public java.lang.String getVersion()
-
getVersionType
public java.lang.String getVersionType()
-
getTitle
public java.lang.String getTitle()
-
getAbstract
public java.lang.String getAbstract()
-
getAuthorInfo
public PsAuthorInfo getAuthorInfo()
-
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)
-
setAuthorInfo
public void setAuthorInfo(PsAuthorInfo authors)
-
getMajorMode
public int getMajorMode()
Get major transformation mode of display used with left-mouse.
-
setMajorMode
public void setMajorMode(int mode)
Set major transformation mode of display used with left-mouse.- See Also:
PvDisplayIf.MODE_ORBIT,PvDisplayIf.MODE_SCALE
-
getTransformMode
public int getTransformMode()
Get transformation of display, i.e. if scene, model or ambient transformation is active.
-
setTransformMode
public void setTransformMode(int mode)
Set transformation of display, i.e. if scene, model or ambient transformation is active.
-
getDimAxes
public int getDimAxes()
-
getAxes
public PgAxes getAxes()
-
setAxes
public void setAxes(PgAxes axes)
-
getAxesHash
public boolean[] getAxesHash()
-
setAxesHash
public void setAxesHash(boolean[] flag)
-
getAxesLabel
public java.lang.String[] getAxesLabel()
-
setAxesLabel
public void setAxesLabel(java.lang.String[] labels)
-
getAxesType
public int getAxesType()
Get type of coordinate axes, see PgAxes.AXES_xxx.
-
setAxesType
public void setAxesType(int type)
Set type of coordinate axes, see PgAxes.AXES_xxx.
-
getAxesEdge
public PiVector getAxesEdge()
Currently unused except in PgMathLoader.
-
setAxesEdge
public void setAxesEdge(PiVector edges)
Currently unused except in PgMathLoader.
-
getAxesCoordSystem
public int getAxesCoordSystem()
Get coordinate system in which axes are shown.
-
setAxesCoordSystem
public void setAxesCoordSystem(int coordSystem)
Set coordinate system in which axes are shown.
-
getNumRulers
public int getNumRulers()
-
setNumRulers
public void setNumRulers(int num)
-
getRulerMode
public int getRulerMode(int ind)
-
setRulerMode
public void setRulerMode(int ind, int mode)
-
getRulerName
public java.lang.String getRulerName(int ind)
-
setRulerName
public void setRulerName(int ind, java.lang.String name)
-
isShowingRulerName
public boolean isShowingRulerName(int ind)
Check if name of ruler is shown at positive end of ruler.
-
showRulerName
public void showRulerName(int ind, boolean flag)Determine if name of ruler is shown at positive end of ruler.
-
isShowingRulerArrow
public boolean isShowingRulerArrow(int ind)
Check if arrow at positive end of ruler is shown.
-
showRulerArrow
public void showRulerArrow(int ind, boolean flag)Determine if arrow at positive end of ruler is shown.
-
isShowingRulerNumbers
public boolean isShowingRulerNumbers(int ind)
-
showRulerNumbers
public void showRulerNumbers(int ind, boolean flag)
-
isShowingRulerHashingsNormal
public boolean isShowingRulerHashingsNormal(int ind)
-
showRulerHashingsNormal
public void showRulerHashingsNormal(int ind, boolean flag)
-
isShowingRulerHashingsUp
public boolean isShowingRulerHashingsUp(int ind)
-
showRulerHashingsUp
public void showRulerHashingsUp(int ind, boolean flag)
-
isShowingRulerTicksMajor
public boolean isShowingRulerTicksMajor(int ind)
-
showRulerTicksMajor
public void showRulerTicksMajor(int ind, boolean flag)
-
isShowingRulerTicksMinor
public boolean isShowingRulerTicksMinor(int ind)
-
showRulerTicksMinor
public void showRulerTicksMinor(int ind, boolean flag)
-
isShowingRuler
public boolean isShowingRuler(int ind)
-
showRuler
public void showRuler(int ind, boolean flag)
-
getRulerColor
public java.awt.Color getRulerColor(int ind)
Get polygon color of axis with given index.
-
setRulerColor
public void setRulerColor(int ind, java.awt.Color col)Set polygon color of axis with given index.
-
getRulerSize
public double getRulerSize(int ind)
Get polygon size of axis with given index.
-
setRulerSize
public void setRulerSize(int ind, double size)Set polygon size of axis with given index.
-
getRulerMinValue
public double getRulerMinValue(int ind)
Get minimum ruler value.
-
setRulerMinValue
public void setRulerMinValue(int ind, double size)Set minimum ruler value.
-
getRulerMaxValue
public double getRulerMaxValue(int ind)
Get maximum ruler value.
-
setRulerMaxValue
public void setRulerMaxValue(int ind, double size)Set maximum ruler value.
-
getRulerMinorHashUnit
public double getRulerMinorHashUnit(int ind)
Get distance between two adjacent minor hashings, used in PgRuler.HASH_FIXED mode.
-
setRulerMinorHashUnit
public void setRulerMinorHashUnit(int ind, double size)Set distance between two adjacent minor hashings, used in PgRuler.HASH_FIXED mode.
-
getRulerMajorHashUnit
public double getRulerMajorHashUnit(int ind)
Get distance between two adjacent major hashings, used in PgRuler.HASH_FIXED mode.
-
setRulerMajorHashUnit
public void setRulerMajorHashUnit(int ind, double size)Set distance between two adjacent major hashings, used in PgRuler.HASH_FIXED mode.
-
getRulerNumMinorHashings
public int getRulerNumMinorHashings(int ind)
Get number of minor hashings, used in PgRuler.HASH_PARTITIONED mode..
-
setRulerNumMinorHashings
public void setRulerNumMinorHashings(int ind, int num)Set number of minor hashings, used in PgRuler.HASH_PARTITIONED mode..
-
getRulerNumMajorHashings
public int getRulerNumMajorHashings(int ind)
Get number of major hashings, used in PgRuler.HASH_PARTITIONED mode..
-
setRulerNumMajorHashings
public void setRulerNumMajorHashings(int ind, int num)Set number of major hashings, used in PgRuler.HASH_PARTITIONED mode..
-
getClipBoundsType
public int getClipBoundsType()
Get index of axis which is selected when scene clip bounds is active or becomes active.- Since:
- JavaView 2.99.012
- Version:
- 01.09.03, 1.00 created (kp)
-
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
- Version:
- 01.09.03, 1.00 created (kp)
-
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
- Version:
- 19.01.03, 1.00 created (kp)
-
setClipBounds
public void setClipBounds(int ind, double[] range)Set minimum and maximum in one dimension of the clipping box. If clipBound vectors are allocated then they are initialized with Double.NEGATIVE_INFINITY and Double.MAX_VALUE respectively.- Parameters:
ind- index of ruler of axes in which direction is clippedrange- minimum and maximum of visible range in axis direction- Since:
- JavaView 2.49.005
- Version:
- 19.01.03, 1.00 created (kp)
-
getCurrentCamera
public int getCurrentCamera()
-
setCurrentCamera
public void setCurrentCamera(int type)
-
getCameraName
public java.lang.String getCameraName(int ind)
-
setCameraName
public void setCameraName(int ind, java.lang.String name)
-
getCameraProjection
public int getCameraProjection(int ind)
-
setCameraProjection
public void setCameraProjection(int ind, int projection)
-
getCameraMatrix
public PdMatrix getCameraMatrix(int ind)
Get the 4*4 camera transformation matrix. This is a convenient method to get several camera parameters at once.- Parameters:
ind- index of camera- Returns:
- PdMatrix transformation matrix of this camera
-
setCameraMatrix
public void setCameraMatrix(int ind, PdMatrix trans)Set the 4*4 camera transformation matrix. This is a convenient method to set several camera parameters at once.- Parameters:
ind- index of cameratrans- transformation matrix of this camera
-
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)
-
getCameraFieldOfView
public double getCameraFieldOfView(int ind)
Get opening angle of camera in degrees in [0,180].- Parameters:
ind- index of camera- Returns:
- opening angle of camera in degrees in [0,180]
-
setCameraFieldOfView
public void setCameraFieldOfView(int ind, double angle)Set opening angle of camera in degrees in [0,180].- Parameters:
ind- index of cameraangle- angle of camera in degrees in [0,180]
-
getCameraAngle
public double getCameraAngle(int ind)
deprecated use getCameraFieldOfView(int)
-
setCameraAngle
public void setCameraAngle(int ind, double angle)deprecated use setCameraFieldOfView(int, double)
-
getCameraRoll
public double getCameraRoll(int ind)
-
setCameraRoll
public void setCameraRoll(int ind, double roll)
-
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)
-
isEnabledCameraSceneRatio
public boolean isEnabledCameraSceneRatio(int ind)
-
setEnabledCameraSceneRatio
public void setEnabledCameraSceneRatio(int ind, boolean v)
-
getNumCameras
public int getNumCameras()
-
setNumCameras
public void setNumCameras(int num)
-
getLightingModel
public int getLightingModel()
-
setLightingModel
public void setLightingModel(int ind)
-
getSelectedLight
public int getSelectedLight()
-
setSelectedLight
public void setSelectedLight(int ind)
-
getAmbientLight
public java.awt.Color getAmbientLight()
-
setAmbientLight
public void setAmbientLight(java.awt.Color ambient)
-
getLightName
public java.lang.String getLightName(int ind)
-
setLightName
public void setLightName(int ind, java.lang.String name)
-
getLightReference
public int getLightReference(int ind)
-
setLightReference
public void setLightReference(int ind, int reference)
-
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)
-
isLightSwitchedOn
public boolean isLightSwitchedOn(int ind)
-
setLightSwitchedOn
public void setLightSwitchedOn(int ind, boolean flag)
-
getLightShading
public int getLightShading(int ind)
-
setLightShading
public void setLightShading(int ind, int shading)
-
isLightVisible
public boolean isLightVisible(int ind)
-
setLightVisible
public void setLightVisible(int ind, boolean flag)
-
getLightIntensity
public double getLightIntensity(int ind)
-
setLightIntensity
public void setLightIntensity(int ind, double intensity)
-
isLightHighlight
public boolean isLightHighlight(int ind)
-
setLightHighlight
public void setLightHighlight(int ind, boolean flag)
-
getLightAngle
public double getLightAngle(int ind)
-
setLightAngle
public void setLightAngle(int ind, double angle)
-
getLightCorona
public double getLightCorona(int ind)
-
setLightCorona
public void setLightCorona(int ind, double corona)
-
getLightExponent
public double getLightExponent(int ind)
-
setLightExponent
public void setLightExponent(int ind, double exp)
-
getLightFalloff
public double getLightFalloff(int ind)
-
setLightFalloff
public void setLightFalloff(int ind, double falloff)
-
getNumLights
public int getNumLights()
Get number of available lights.
-
setNumLights
public void setNumLights(int num)
Allocate given number of lights. If new number is different from existing number of lights, then the existing lights are reused as long as it makes sense.- Parameters:
num- total number of lights
-
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 color)
Set color of background of display. If background image is set, then color is visible in transparent regions of the image.
-
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 repeat)
Set the mode determining how a background image is scaled w.r.t. the display canvas.- Since:
- JavaView 2.36
-
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
-
getSearchPaths
public java.lang.String[] getSearchPaths()
Get image search paths.- Returns:
- array of search paths
- Since:
- JavaView 3.61.003
- Version:
- 27.10.04, 1.00 created (kp)
-
setSearchPaths
public void setSearchPaths(java.lang.String[] searchPath)
Set image search paths.- Parameters:
searchPath- array of search paths- Since:
- JavaView 3.61.003
- Version:
- 27.10.04, 1.00 created (kp)
-
getForegroundColor
public java.awt.Color getForegroundColor()
Get foreground color. Currently neither defined nor used.
-
setForegroundColor
public void setForegroundColor(java.awt.Color color)
Set foreground color. Currently neither defined nor used.
-
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 repeat)
Set the mode determining how a background image is scaled w.r.t. the display canvas.- Since:
- JavaView 2.36
-
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
-
getBndBoxColor
public java.awt.Color getBndBoxColor()
Get color of bounding box.- Returns:
- color of bounding box
- Since:
- JavaView 2.49.005
- Version:
- 18.01.03, 1.00 created (kp)
-
setBndBoxColor
public void setBndBoxColor(java.awt.Color col)
Set color of bounding box.- Parameters:
col- color of bounding box- Since:
- JavaView 2.49.005
- Version:
- 18.01.03, 1.00 created (kp)
-
getBndBoxSize
public double getBndBoxSize()
Get thickness of edges of bounding box.- Returns:
- thickness of edges bounding box
- Since:
- JavaView 2.49.005
- Version:
- 18.01.03, 1.00 created (kp)
-
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
- Version:
- 18.01.03, 1.00 created (kp)
-
getBoxRatio
public PdVector getBoxRatio()
Get scaling factors of edges of the bounding box.- Returns:
- scaling factors of edges bounding box
- Since:
- JavaView 2.60.002
- Version:
- 15.03.03, 1.00 created (kp)
-
setBoxRatio
public void setBoxRatio(PdVector ratio)
Set scaling factors of edges of the bounding box.- Parameters:
ratio- scaling factors of edges bounding box- Since:
- JavaView 2.60.002
- Version:
- 15.03.03, 1.00 created (kp)
-
getWindowPosition
public java.awt.Point getWindowPosition()
Get upper left corner of frame containing the display. If the position is null then positioning of frame is not done during configuration of display.- See Also:
configure(PvDisplayIf)
-
setWindowPosition
public void setWindowPosition(java.awt.Point pos)
Set upper left corner of frame containing the display. If the position is null then positioning of frame is not done during configuration of display.- See Also:
configure(PvDisplayIf)- Version:
- 17.11.02, 1.00 created (kp) since JavaView 2.46
-
setWindowPosition
public void setWindowPosition(int x, int y)deprecated use setWindowPosition(Point)
-
getWindowSize
public java.awt.Dimension getWindowSize()
Get size of display within its frame. If the dimension is null then resizing of the frame is not done during configuration of display.- See Also:
configure(PvDisplayIf)- Version:
- 17.11.02, 1.00 created (kp) since JavaView 2.46
-
setWindowSize
public void setWindowSize(java.awt.Dimension dim)
Set size of display within its frame. If the dimension is null then resizing of the frame is not done during configuration of display.- See Also:
configure(PvDisplayIf)- Version:
- 17.11.02, 1.00 created (kp) since JavaView 2.46
-
setWindowSize
public void setWindowSize(int x, int y)deprecated use setWindowSize(Dimension)
-
setArrayPosition
public void setArrayPosition(int pos)
Set position of display within an array of displays. The position is an integer running through all rows of the array.- Version:
- 11.06.03, 1.00 created (ur) since JavaView 2.80
-
getArrayPosition
public int getArrayPosition()
Get position of display within an array of displays. The position is an integer running through all rows of the array.- Version:
- 11.06.03, 1.00 created (ur) since JavaView 2.80
-
setArraySize
public void setArraySize(java.awt.Dimension dim)
Set dimension of array of displays.- Version:
- 11.06.03, 1.00 created (ur) since JavaView 2.80
-
getArraySize
public java.awt.Dimension getArraySize()
Get dimension of array of displays.- Version:
- 11.06.03, 1.00 created (ur) since JavaView 2.80
-
setPreviewImage
public void setPreviewImage(java.awt.Image image)
Set preview image.- Version:
- 23.08.06, 1.00 created (ur) since JavaView 3.96
-
getPreviewImage
public java.awt.Image getPreviewImage()
Get dimension of array of displays.- Version:
- 23.08.06, 1.00 created (ur) since JavaView 3.96
-
configure
public void configure(PvDisplayIf disp)
Configure the given display with data from this option class. This method does not repaint or update the display.- Version:
- 17.07.03, 1.60 revised (kp) Reordering of enabling of bndbox and frame.
20.07.02, 1.50 revised (kp) Disable repaint of display during configuration.
-
setOptions
public void setOptions(PvDisplayIf disp)
Initialize this option class with data extracted from the given display.
-
-
"