Class SoPreferences

java.lang.Object
com.openinventor.inventor.SoPreferences

public class SoPreferences extends Object
Manages Open Inventor configuration parameters.
Open Inventor maintains a configuration database that stores information about the Open Inventor "environment". The Open Inventor environment contains configuration parameters and their values.

Setting configuration parameters
There are several ways that configuration parameter values are set into the Inventor configuration database:

Configuration files:
Open Inventor Java uses a resource file named com.openinventor.inventor.properties if it is located in your CLASSPATH. You can find this file (com.openinventor.inventor.properties) in the directory $OIVJHOME/properties and modify it to fit your needs. You can copy it to another location, provided that you set your CLASSPATH to point to it.
The configuration parameters specified in the configuration files are set into Open Inventor's configuration database.
The configuration file format is simple. You specify environment name-value pairs, one per line. Values are defined with a left part (the key) and a right part (the value affected), separated with the '=' character.
 # comment
 
 # NAME1 and NAME2 are defined and associated
 # with value1 and value2 respectively.
 NAME1=value1
 NAME2=value2
   
 
NOTE: Each property defined in this file overrides the environment variable of the same name during the execution of your program. For instance, if a property OIVJHOME is defined, it overrides the environment variable $OIVJHOME. On the other side, they are overridden by the System properties, ie when you use the -D option of the java command line.

Using SoPreferences methods:
setValue(String, String) sets a configuration parameter in the Open Inventor configuration database. As this value is set in memory, it is local to the application process and can only be retrieved using getValue(String).

Querying configuration parameters To query a specific configuration parameter, use the method getValue(String) which returns the value of the specified configuration parameter in the Open Inventor configuration database.
SoPreferences also provides convenience methods for querying specific data types and providing a default value, e.g.,
 
        int numFiles = SoPreferences.getInteger( "NUM_FILES", 1 );
 
requests the value of an integer-valued configuration parameter and returns the default value 1 if this parameter has not been specified.

Other
The SoPreferences configuration mechanism is not restricted to Open Inventor parameters. Applications are welcome to use it for their own parameters if appropriate.
  • Field Details

    • IV_ALLOW_LOCATE_HIGHLIGHT

      public static final String IV_ALLOW_LOCATE_HIGHLIGHT
      Affects SoLocateHighlight.
      If set, the default SoLocateHighlight mode is set to AUTO. If not set, the default mode is OFF.
      See Also:
    • IV_AUTO_CACHE_MIN_VALUE

      public static final String IV_AUTO_CACHE_MIN_VALUE
      These influence when automatic caching happens.
      See Also:
    • IV_AUTO_CACHE_MAX_VALUE

      public static final String IV_AUTO_CACHE_MAX_VALUE
      These influence when automatic caching happens.
      See Also:
    • IV_NO_TEXTURE_OBJECT

      public static final String IV_NO_TEXTURE_OBJECT
      Tells Open Inventor not to use OpenGL 1.1 texture objects. If some textures are missing or otherwise displayed incorrectly, try setting this variable.
      See Also:
    • IV_NO_VERTEX_ARRAY

      public static final String IV_NO_VERTEX_ARRAY
      Tells Open Inventor not to use OpenGL 1.1 vertex arrays. If some geometry is missing or misshapen, try setting this variable.
      See Also:
    • IV_OCTREE_MAX_DEPTH

      public static final String IV_OCTREE_MAX_DEPTH
      Affects SoOctreeOrdering.
      Specifies the maximum depth used during octree ordering. Default: 8
      See Also:
    • IV_SEPARATOR_MAX_CACHES

      @Deprecated public static final String IV_SEPARATOR_MAX_CACHES
      Deprecated.
      Use OIV_MAX_CACHES instead.
      See Also:
    • IVVR_40_COMPAT

      public static final String IVVR_40_COMPAT
      Forces VolumeViz 4.0 compatible behavior. For example, paging mode is the default, slices are not affected by scene graph lights, etc.
      See Also:
    • IVVR_CHECK_3DTEX_SIZE

      public static final String IVVR_CHECK_3DTEX_SIZE
      Set this config parameter to enable 3D texture size checking for VolumeViz. If the current volume cannot be loaded on the hardware as a 3D texture, a warning is posted and VolumeViz automatically switches to 2D textures to draw the picture.
      See Also:
    • IVVR_DEBUG

      public static final String IVVR_DEBUG
      Set to 1 to enable debug trace output for VolumeViz.
      See Also:
    • IVVR_DELAY_RENDER

      public static final String IVVR_DELAY_RENDER
      Sets the VolumeViz delayedRendering flag.
      When this flag is TRUE, VolumeViz drawing nodes (e.g. SoOrthoSlice) are considered "transparent" objects by Open Inventor. They may be delayed (until after all opaque objects) and/or sorted according to the current transparency type (see SoGLRenderAction). This may result in a more correct image if there is opaque geometry intersecting the volume. However delayed/sorted rendering may slightly decrease performance. For compatibility with earlier versions of VolumeViz the default is FALSE. This flag may also be set using
      invalid reference
      com.openinventor.volumeviz.SoVolumeViz#setDelayedRendering(boolean)
      .
      See Also:
    • IVVR_IRREGULAR_TRACE_NUM

      public static final String IVVR_IRREGULAR_TRACE_NUM
      Although in most cases the SEGY reader can automatically detect when the number of traces per line in a SEGY file is not uniform, in some cases it cannot. You can set this environment variable to request the use of a more sophisticated file parsing algorithm. However, be aware that the initialization for file reading will take longer when this environment variable is set.
      See Also:
    • IVVR_INCONSTANT_TRACE_LENGTH

      public static final String IVVR_INCONSTANT_TRACE_LENGTH
      Although in most cases the SEGY reader can automatically detect when the length of traces in a SEGY data file is not uniform, in some cases it cannot. You can set this environment variable to request the use of a more sophisticated file parsing algorithm. However, be aware that the initialization for file reading will take significantly longer when this environment variable is set.
      See Also:
    • IVVR_MAX_NUM_LOADERS

      public static final String IVVR_MAX_NUM_LOADERS
      Affects SoVolumeRender.
      Specifies the maximum number of loading threads to be used in VolumeViz LDM mode.
      See Also:
    • IVVR_NUM_LOADERS

      public static final String IVVR_NUM_LOADERS
      Affects SoVolumeRender.
      Specifies the initial number of loading threads to be used in VolumeViz LDM mode. Default is 4. This value can be set programmatically using
      invalid reference
      SoLDMGlobalResourceParameters#setNumIO(int)
      .
      See Also:
    • IVVR_OGL_CLIPPING

      public static final String IVVR_OGL_CLIPPING
      Affects SoVolumeGeometry.
      Starting with VolumeViz 6.0, SoVolumeGeometry nodes are clipped using software clipping rather than OpenGL clipping. If you need the version 5.0 behavior, set this environment variable to 1.
      See Also:
    • IVVR_SEGY_DUMP

      public static final String IVVR_SEGY_DUMP
      Requests that the file and trace headers be written to a file while processing the SEGY data file. The output file is named ivvrSegyDump.txt in the current working directory. This information may be helpful if the SEGY reader fails to read the file correctly.
      See Also:
    • IVVR_SEGY_FLOATISIEEE

      public static final String IVVR_SEGY_FLOATISIEEE
      Affects SEGY reader.
      If TRUE, indicates that floats are written in IEEE floating point format. Normally the SEGY reader is able to detect this, but if necessary you can set this environment variable.
      See Also:
    • IVVR_SEGY_SWAPBYTES

      public static final String IVVR_SEGY_SWAPBYTES
      Affects SEGY reader.
      Set to 1 to force byte swapping, 0 to force no byte swapping. Normally the SEGY reader is able to detect if byte swapping is needed, but if necessary you can set this environment variable.
      See Also:
    • IVVR_SHADERS_PATH

      public static final String IVVR_SHADERS_PATH
      Specifies the full path to VolumeViz predefined shaders.
      Nodes SoVolumeShader, SoVolumeIsosurface, and SoVolumeRenderingQuality search predefined shaders in the following directories in the following order: current directory, $IVVR_SHADERS_PATH, and $OIVHOME/data/volumeviz/shaders. On Windows, the directory containing the VolumeViz DLL is searched last.
      See Also:
    • IVVR_TF_TEX_UNIT

      public static final String IVVR_TF_TEX_UNIT
      Affects SoTransferFunction
      Allows you to specify the OpenGL texture unit to be used for storing VolumeViz transfer functions. The default is unit 0.
      See Also:
    • IVVR_USE_TEX3D

      public static final String IVVR_USE_TEX3D
      Controls when VolumeViz will use OpenGL 3D texturing.
      All boards that report OpenGL version 1.2 or higher are required to support 3D texturing and will render the correct image. However on some boards (e.g. GeForce2) this support is not hardware accelerated and may be very slow. By default VolumeViz tries to detect this situation and automatically disable use of 3D textures, but there are cases where it is desirable to use 3D textures even if they are slow. In these cases set IVVR_USE_TEX3D to 1. Valid values are: - 0 = Never : Do not use 3D textures (even when available) - 1 = Always : Use 3D textures if supported in hardware or software - -1 = WhenFast : Use 3D textures only if supported in hardware (DEFAULT) On some boards, e.g. ATI, WhenFast is the same as Always because we can't reliably detect how 3D textures are implemented.
      See Also:
    • OIV_3DDATA_CREASE_ANGLE

      public static final String OIV_3DDATA_CREASE_ANGLE
      Default value of the field
      invalid reference
      PoMesh#creaseAngle
      . Default is 0.0. Set the value to 0.8 for compatibility with MeshViz 5.0 and earlier.
      See Also:
    • OIV_3DDATA_CROSS_SECTION_METHOD

      public static final String OIV_3DDATA_CROSS_SECTION_METHOD
      Affects PoMeshCrossSection.
      Specifies the method used for computing a PoMeshCrossSection. - INTERSECTION - The cross section is computed like an isosurface. - ISOSURFACE - The cross section is computed by doing classic intersections. Use PoMeshCrossSection::setCrossSectionMethod to specify the cross section computation method programmatically.
      See Also:
    • OIV_3DDATA_USE_TRIANGLE_STRIP_SET

      public static final String OIV_3DDATA_USE_TRIANGLE_STRIP_SET
      Affects PoMeshLevelSurf, PoMeshCrossSection.
      Specifies the Open Inventor primitive used to draw an isosurface. - TRUE - a triangle strip set is used - FALSE - an indexed face set is used PoMeshCrossSection uses this variable only when the cross section method is ISOSURFACE (see @ref OIV_3DDATA_CROSS_SECTION_METHOD).
      See Also:
    • OIV_ALPHA_TEST

      public static final String OIV_ALPHA_TEST
      Affects SoGLRenderAction.
      Enables or disables the OpenGL alpha test for rendering. Default is 0 (alpha test is disabled).
      See Also:
    • OIV_AMBIENT_COLOR

      public static final String OIV_AMBIENT_COLOR
      Affects SoEnvironment.
      Specifies the default color of ambient lighting. The value is specified as three floats (0.0 to 1.0) representing the RGB values of the color. The value can be set programmatically using the SoEnvironment.ambientColor field.
      See Also:
    • OIV_AMBIENT_INTENSITY

      public static final String OIV_AMBIENT_INTENSITY
      Affects SoEnvironment.
      Specifies the default intensity of ambient lighting. The value can be set programmatically using the SoEnvironment.ambientIntensity field.
      See Also:
    • OIV_BACKGROUND_COLOR

      public static final String OIV_BACKGROUND_COLOR
      Affects SoMPEGRenderer, SoOffscreenRenderArea.
      Specifies the default background color. The value is specified as three floats (0.0 to 1.0) representing the RGB values of the color. The background color can be set programmatically using the setBackgroundColor method of the classes above.
      See Also:
    • OIV_BUFFER_REGION_ENABLE

      public static final String OIV_BUFFER_REGION_ENABLE
      Affects SoGLRenderAction.
      If not specified, the OpenGL extension bufferRegion is enabled and will be used if available on your graphics hardware. Set to zero to disable use of buffer regions.
      See Also:
    • OIV_CACHE_MODE

      public static final String OIV_CACHE_MODE
      If set to 1, Open Inventor 3.0 render caching behavior is used. This may be necessary to produce correct results with some graphics boards.
      See Also:
    • OIV_CG_FRAG_PROFILE

      public static final String OIV_CG_FRAG_PROFILE
      Specifies the Cg profile to be used for fragment programs. arbfp1 by default. See SoShaderObject for details.
      See Also:
    • OIV_CG_VTX_PROFILE

      public static final String OIV_CG_VTX_PROFILE
      Specifies the Cg profile to be used for vertex programs. arbvp1 by default. See SoShaderObject for details.
      See Also:
    • OIV_CGM_HARDCOPY_BUFSIZE

      public static final String OIV_CGM_HARDCOPY_BUFSIZE
      Affects SoVectorizeCGMAction.
      Specifies the buffer size in bytes for storing CGM calls before writing them to the disk. The default buffer size is 1048576 bytes (1 megabyte). If set to 1, no buffering is done.
      See Also:
    • OIV_CLIP_TEXT2

      public static final String OIV_CLIP_TEXT2
      When this variable is set, 2D text strings, which are rendered using bitmaps, will be correctly clipped when the string start point is outside the viewport (in previous releases the entire string disappeared).
      NOTE: When this variable is set, auto render caching is suppressed by SoText2 in all cases (by default it is not suppressed for single line strings with default LEFT justification). This is really only useful for applications rendering to multiple screens, for example using the MultiPipe extension.
      See Also:
    • OIV_COMPAT_30

      public static final String OIV_COMPAT_30
      If set to 1, the Open Inventor 3.0 code for handling 2- and 4-component texture images will be used. The 3.0 behavior could reduce performance or produce unexpected results for images that are actually opaque, so it is unlikely you will ever need to set this variable.
      See Also:
    • OIV_COMPAT_40

      public static final String OIV_COMPAT_40
      If set to 1, the Open Inventor 4.0 code for checking the OpenGL extensions will be used. The 4.0 behavior can detect some extensions even if they are not available on the current graphics hardware.
      See Also:
    • OIV_COMPAT_CGM_HARDCOPY_400

      public static final String OIV_COMPAT_CGM_HARDCOPY_400
      Affects SoVectorizeCGMAction.
      If set to 1, CGM writing onto disk is not buffered (the buffering is only done by stream data writing of the operating system). This value takes precedence over OIV_CGM_HARDCOPY_BUFSIZE.
      See Also:
    • OIV_COMPAT_HPGL_HARDCOPY_370

      public static final String OIV_COMPAT_HPGL_HARDCOPY_370
      Affects SoVectorizeHPGLAction.
      If set to 1, reproduces the (incorrect) HardCopy 3.7 line pattern printing behavior. It is unlikely you will ever need to set this variable.
      See Also:
    • OIV_COMPLEXITY

      public static final String OIV_COMPLEXITY
      Affects SoComplexity.
      Specifies the default complexity (0.0 to 1.0). The complexity can be set programmatically using the SoComplexity::value field.
      See Also:
    • OIV_COMPLEXITY_TYPE

      public static final String OIV_COMPLEXITY_TYPE
      Affects SoComplexity.
      Specifies the default complexity type. Valid values are OBJECT_SPACE, SCREEN_SPACE, BOUNDING_BOX. The complexity type can be set programmatically using the SoComplexity::type field.
      See Also:
    • OIV_CREASE_ANGLE_FIX

      public static final String OIV_CREASE_ANGLE_FIX
      When set, forces FLAT shaded rendering when creaseAngle = 0. Strictly speaking this is the correct behavior (see SoShapeHints), however it is incompatible with the historical behavior of Open Inventor and may change the appearance of geometry in existing applications. Applied only to SoIndexedTriangleStripSet and SoTriangleStripSet nodes.
      See Also:
    • OIV_DISABLE_DRAGGER_CTRL_KEY

      public static final String OIV_DISABLE_DRAGGER_CTRL_KEY
      Affects SoHandleBoxDragger, SoHandleBoxManip, SoTrackBallDragger, SoTrackBallManip, SoTransformerDragger, SoTransformerManip, SoDragPointDragger, SoDragPointManip.
      If set to 1, when the CTRL key is pressed over the dragger, nothing special happens. Otherwise, the CTRL key has its usual behavior, which varies from dragger to dragger.
      See Also:
    • OIV_DRAW_OCTREE

      public static final String OIV_DRAW_OCTREE
      Affects SoOctreeOrdering.
      If this environment variable is set and your application uses an SoOctreeOrdering node, an outline of the octree quadrants will be drawn. This is a debugging aid to allow you to see how your scene is distributed throughout the octree.
      See Also:
    • OIV_ENABLE_MESA_RENDERING

      public static final String OIV_ENABLE_MESA_RENDERING
      Must be set to true when using a computer without any GPU. This will force inventor to be rendered on CPU. Default is False.
      See Also:
    • OIV_ENABLE_PNG_BACKGROUND

      public static final String OIV_ENABLE_PNG_BACKGROUND
      Affects texture nodes that load PNG files.
      Enables the merge of the background into the displayed image. The background replaces transparent parts of the image.
      See Also:
    • OIV_ENVIRONMENT_ATTENUATION

      public static final String OIV_ENVIRONMENT_ATTENUATION
      Affects SoEnvironment.
      Specifies the default squared, linear, and constant light attenuation coefficients (in that order) with respect to distance of light from surface (for Phong lighting). The values are specified as three floats. The background color can be set programmatically using the SoEnvironment::attenuation field.
      See Also:
    • OIV_EXTRUSION_EPSILON

      public static final String OIV_EXTRUSION_EPSILON
      Affects SoExtrusion.
      If your extrusion appears to twist unexpectedly, try setting this value to a slightly smaller number. The default value is .996.
      See Also:
    • OIV_FACE_TYPE

      public static final String OIV_FACE_TYPE
      Affects SoShapeHints.
      Specifies the default face type. Valid values are UNKNOWN, CONVEX. The face type can be set programmatically using the SoShapeHints::faceType field.
      See Also:
    • OIV_FOG_COLOR

      public static final String OIV_FOG_COLOR
      Affects SoEnvironment.
      Specifies the default fog color. The value is specified as three floats (0.0 to 1.0) representing the RGB values of the color. The value can be set programmatically using the SoEnvironment::fogColor field.
      See Also:
    • OIV_FOG_TYPE

      public static final String OIV_FOG_TYPE
      Affects SoEnvironment.
      Specifies the default fog type. Valid values are: NONE, HAZE, FOG, SMOKE. The value can be set programmatically using the SoEnvironment::fogType field.
      See Also:
    • OIV_FOG_VISIBILITY

      public static final String OIV_FOG_VISIBILITY
      Affects SoEnvironment.
      Specifies the default distance at which fog totally obscures objects. The value can be set programmatically using the SoEnvironment::fogVisibility field.
      See Also:
    • OIV_FONT_NAME

      public static final String OIV_FONT_NAME
      Affects SoFont.
      Specifies the default font name. The value can be set programmatically using the SoFont::name field.
      See Also:
    • OIV_FONT_PATH

      public static final String OIV_FONT_PATH
      Contains a colon-separated or semicolon-separated list of directories to search for font definition files. NOTE: This item cannot be set via SoPreferences or a configuration file. It must be set in the environment (e.g., using setenv). See SoFont for more information.
      See Also:
    • OIV_FONT_SIZE

      public static final String OIV_FONT_SIZE
      Affects SoFont.
      Specifies the default font size. The value can be set programmatically using the SoFont::size field.
      See Also:
    • OIV_FONT_RENDERSTYLE

      public static final String OIV_FONT_RENDERSTYLE
      Affects SoFont.
      Specifies the default font render style. Valid values are POLYGON, TEXTURE, POLYGON_AND_OUTLINE. The value can be set programmatically using the SoFont::renderStyle field.
      See Also:
    • OIV_FORCE_GLU_NURBS

      public static final String OIV_FORCE_GLU_NURBS
      Affects SoNurbsSurface, SoIndexedNurbsSurface.
      If set to 1, then NURBS are tessellated and rendered using GLU.
      See Also:
    • OIV_FORCE_TEX_COORD_SENDING

      public static final String OIV_FORCE_TEX_COORD_SENDING
      Affects shapes derived from SoVertexShape, and only affects user-specified texture coordinates. If set to 1 (TRUE), forces the sending of texture coordinates to the OpenGL pipeline without having a texture bound to the corresponding texture unit. This is useful when working with programmable shaders. Default is 0 (FALSE). The value can be set programmatically using the SoTextureCoordinate2::forceSending field or the SoTextureCoordinate3::forceSending field.
      See Also:
    • OIV_FULL_SCENE_ANTIALIASING

      public static final String OIV_FULL_SCENE_ANTIALIASING
      Affects SoFullSceneAntialiasing.
      Specifies whether full scene antialiasing (if already enabled) will be applied to subsequent shapes (0=no, 1=yes). The value can be set programmatically using the SoFullSceneAntialiasing::on field. See SoFullSceneAntialiasing for information on enabling full scene antialiasing.
      See Also:
    • OIV_FULL_SCENE_ANTIALIASING_FILTER

      public static final String OIV_FULL_SCENE_ANTIALIASING_FILTER
      Affects SoFullSceneAntialiasing.
      Specifies which kinds of primitives should be antialiased when full scene antialiasing is enabled. Valid values are ALL or any combination of LINES, POINTS, POLYGONS, and TEXT. The value can be set programmatically using the SoFullSceneAntialiasing::filter field. See SoFullSceneAntialiasing for complete details.
      See Also:
    • OIV_GL_SMOOTHING

      public static final String OIV_GL_SMOOTHING
      Affects SoGLRenderAction.
      Specifies the default smoothing flag (0=no smooth, 1=smooth). The smoothing flag can be set programmatically using SoGLRenderAction::setSmoothing.
      See Also:
    • OIV_SET_RAY_PRECISION

      public static final String OIV_SET_RAY_PRECISION
      Affects SoRayPickAction when defining a ray using the setRay method
      Specify (in radius) the value of fovy angle defined by the ray. If not set, the default value is set to 0.0003F
      See Also:
    • OIV_GLSL_DEBUG

      public static final String OIV_GLSL_DEBUG
      Affects SoShaderObject (and derived classes).
      Enables display of output generated by the GLSL compiler of the graphics display driver. If not set, no trace output is generated.
      See Also:
    • OIV_INTERSECT_EPSILON

      public static final String OIV_INTERSECT_EPSILON
      Specifies the epsilon value against which the area of a triangle is checked to eliminate triangles with no area when picking. It allows you to pick objects that have very small coordinate values. Set the value to approximately 10 raised to three times the exponent of the object coordinates. Example: For objects with coordinates of approximately 10E-7, a value of 10E-21 would allow the objects to be picked.
      See Also:
    • OIV_LINE_WIDTH

      public static final String OIV_LINE_WIDTH
      If defined, forces Open Inventor to use line width 1. no matter what line width the program requests. (This was used to improve performance on a system that had notoriously slow wide lines.)
      See Also:
    • OIV_LOWRESHIGHPERCENT

      public static final String OIV_LOWRESHIGHPERCENT
      Affects Remote Rendering.
      This variable specifies the rendered image size as a percentage of the actual window size in the normal case. The default is 1.0 (full size).
      See Also:
    • OIV_LOWRESLOWPERCENT

      public static final String OIV_LOWRESLOWPERCENT
      Affects Remote Rendering.
      This variable specifies the rendered image size as a percentage of the actual window size when the Open Inventor viewer is in "Move as Low-Res" mode. The default is 0.7 (70 percent).
      See Also:
    • OIV_LOWRESRENDER

      public static final String OIV_LOWRESRENDER
      Affects Remote Rendering.
      If this variable is defined and the target display (local machine) supports OpenGL, then low resolution rendering is enabled. No change to the application is required.
      See Also:
    • OIV_MATERIALS_PATH

      public static final String OIV_MATERIALS_PATH
      Affects SoMaterialEditor.
      Specifies the path where the material palette will look for materials.
      See Also:
    • OIV_MAX_ANNO_RENDER2D_SIZE

      public static final String OIV_MAX_ANNO_RENDER2D_SIZE
      Affects SoAnnoText3.
      Specifies the maximum font size (in pixels) used in font size computed when SoAnnoText3::renderPrintType field is equal to RENDER2D_PRINT_RASTER. The default maximum value is 1000. If you notice a performance issue when rendering and zooming a scene graph containing many SoAnnoText3 nodes, setting this value to a smaller number, such as 64, may improve performance.
      See Also:
    • OIV_MAX_CACHES

      public static final String OIV_MAX_CACHES
      Specifies the maximum number of render caches for all nodes that create render caches, including display lists (e.g. SoSeparator) and texture objects (e.g. SoTexture2). To disable caching entirely, set it to 0. This can reduce memory requirements at the cost of degraded performance. For multi-pipe rendering, set it to the number of pipes that will be used. [Replaces IV_SEPARATOR_MAX_CACHES.]
      See Also:
    • OIV_MAX_FONT_CACHES

      public static final String OIV_MAX_FONT_CACHES
      Specifies the maximum number of caches that can be used during text computation. Default value is 20; See SoFont for details.
      See Also:
    • OIV_MAX_TEXTURED_FONT_RES

      public static final String OIV_MAX_TEXTURED_FONT_RES
      Specifies the maximum resolution used when generating textured glyph during text computation. (SoFont::renderStyle field must be set to TEXTURE.) The amount of memory used in textured text depends on this value. Default value is 600.
      See Also:
    • OIV_MIN_TEXTURED_FONT_RES

      public static final String OIV_MIN_TEXTURED_FONT_RES
      Specifies the minimum resolution used when generating textured glyph during text computation. (SoFont::renderStyle field must be set to TEXTURE.) The amount of memory used in textured text depends on this value. Default value is 300.
      See Also:
    • OIV_MULTITEXTURING

      public static final String OIV_MULTITEXTURING
      Enables/disables multitexturing support. - 0 multitexturing support disabled - 1 multitexturing support enabled If OIV_MULTITEXTURING is not defined, multitexturing support is enabled (if your graphics board supports it). Setting this variable to 0 is equivalent to maxTextureUnit equal 1. See SoTextureUnit for details.
      See Also:
    • OIV_NO_FBO

      public static final String OIV_NO_FBO
      Set to 1 to disallow use of OpenGL Frame Buffer Object. Default is 0.
      See Also:
    • OIV_NO_FLEXNET

      public static final String OIV_NO_FLEXNET
      Set to 1 to disallow FLEXnet licensing checking. Default is 0.
      See Also:
    • OIV_NO_OVERLAYS

      public static final String OIV_NO_OVERLAYS
      Disables Open Inventor's normal attempt to automatically use overlay planes on all platforms. This can be useful to suppress the warning message on UNIX platforms (when overlays are not available) or to avoid a problem with the overlay planes not being correctly transparent.
      See Also:
    • OIV_NORMGEN_COMPAT

      public static final String OIV_NORMGEN_COMPAT
      If set, Open Inventor will use the pre-version 3.1 algorithm for computing normals. This algorithm has very bad performance when the geometry bounding box is asymmetrical. It is not likely you will ever need to set this variable.
      See Also:
    • OIV_NORMGEN_TOLERANCE

      public static final String OIV_NORMGEN_TOLERANCE
      Sets the "tolerance factor" used to test for coincident vertices when computing vertex normal vectors for a geometric primitive. A larger value for OIV_NORMGEN_TOLERANCE results in fewer vertices being considered coincident. This can significantly reduce the time required to compute normal vectors for large geometry, for example MeshViz meshes. The default value is 10000. A value of 1000000 (1e6) can normally be used with MeshViz meshes.
      See Also:
    • OIV_NO_SHADER_LAYERS_BLEND

      public static final String OIV_NO_SHADER_LAYERS_BLEND
      Disable the use of fragment shaders when using transparency type
      invalid reference
      SoGLRenderAction#SORTED_PIXEL
      .
      See Also:
    • OIV_NO_TEX_TRIM_NURBS

      public static final String OIV_NO_TEX_TRIM_NURBS
      Affects SoNurbsSurface, SoIndexedNurbsSurface.
      Deprecated , use @ref OIV_FORCE_GLU_NURBS instead.
      See Also:
    • OIV_NO_VBO

      public static final String OIV_NO_VBO
      Affects SoShapeHints.
      VBOs may be used to speed up rendering of SoIndexedFaceSets and SoIndexedTriangleStripSets. If the rendering is not correct, try setting this variable.
      See Also:
    • OIV_NUM_RENDER_PASSES

      public static final String OIV_NUM_RENDER_PASSES
      Affects SoGLRenderAction.
      Specifies the default number of render passes. Must be an integer greater than 1. The number of passes can be set programmatically using SoGLRenderAction::numPasses.
      See Also:
    • OIV_NUM_SORTED_LAYERS_PASSES

      public static final String OIV_NUM_SORTED_LAYERS_PASSES
      Affects SoGLRenderAction.
      Specifies the default number of render passes used when
      invalid reference
      SoGLRenderAction#SORTED_PIXEL
      transparency is used. Must be an integer greater than 1. The value can be set programmatically using SoGLRenderAction::setSortedLayersNumPasses.
      See Also:
    • OIV_PBUFFER_DEBUG

      public static final String OIV_PBUFFER_DEBUG
      Affects SoPBuffer.
      Set to 1 to enable debug trace output for Pbuffers. See also OIV_PBUFFER_ENABLE.
      See Also:
    • OIV_PBUFFER_ENABLE

      public static final String OIV_PBUFFER_ENABLE
      Affects SoPBuffer. Set to zero to disallow use of Pbuffers. Note: If Pbuffers are disallowed, OpenGL does rendering in software. This gives low performance and OpenGL extensions will often not be available. In general the image may not match the on-screen image simply because a different renderer is being used. However, the lack of OpenGL extensions can cause the offscreen image to differ signficantly. Following are some of the features that depend on OpenGL extensions: Open Inventor correct transparency, VolumeViz 3D textures and bump mapping.
      See Also:
    • OIV_POLYGON_OFFSET

      public static final String OIV_POLYGON_OFFSET
      Affects SoPolygonOffset.
      Specifies if the polygon offset computation is on by default (0=no, 1=yes) The value can be set programmatically using the SoPolygonOffset::on field.
      See Also:
    • OIV_POLYGON_OFFSET_FACTOR

      public static final String OIV_POLYGON_OFFSET_FACTOR
      Affects SoPolygonOffset.
      Specifies the default polygon offset factor. The value can be set programmatically using the SoPolygonOffset::factor field.
      See Also:
    • OIV_POLYGON_OFFSET_STYLES

      public static final String OIV_POLYGON_OFFSET_STYLES
      Affects SoPolygonOffset.
      Specifies the default polygon offset styles. Valid values are FILLED, LINES, POINTS. The value can be set programmatically using the SoPolygonOffset::styles field.
      See Also:
    • OIV_POLYGON_OFFSET_UNITS

      public static final String OIV_POLYGON_OFFSET_UNITS
      Affects SoPolygonOffset.
      Specifies the default polygon offset units. The value can be set programmatically using the SoPolygonOffset::units field.
      See Also:
    • OIV_PRIORITIZE_CHILDREN_CACHING

      public static final String OIV_PRIORITIZE_CHILDREN_CACHING
      Specifies the default caching policy for children caching. Valid value is 0 (FALSE) or 1 (TRUE). Default is TRUE. The value can be set programmatically using the SoDB::prioritizeChildrenCaching() method.
      See Also:
    • OIV_PSFONT_PATH

      public static final String OIV_PSFONT_PATH
      Starting with Open Inventor 6.0, this environment variable is a synonym for OIV_FONT_PATH. Please see OIV_FONT_PATH for details.
      See Also:
    • OIV_REMOTE_ENABLE

      public static final String OIV_REMOTE_ENABLE
      Applies to ScaleViz.
      - ON - Enable connection of client to get application's viewer frame - OFF (default) - Disable connection of client to get application's viewer frame
      See Also:
    • OIV_REMOTE_PORT

      public static final String OIV_REMOTE_PORT
      Applies to ScaleViz.
      Specify the TCP port the application will use to listen for remote client connection. This port must be free (not used by any other daemon or services). Default is 0, meaning the value is dynamically allocated and printed to the console or remote dialog GUI.
      See Also:
    • OIV_REMOTE_TIMING

      public static final String OIV_REMOTE_TIMING
      Applies to ScaleViz.
      A value of 1 enables printing in the console of performance timing feedback about each step of the remote frame compression mechanism for ScaleViz remote rendering. Default is 0.
      See Also:
    • OIV_REMOTERENDER

      public static final String OIV_REMOTERENDER
      - ON - Always use remote rendering - OFF - Never use remote rendering - AUTO (default) - Use if remote display does not have GLX
      See Also:
    • OIV_REMOTERENDER_BUFFER

      public static final String OIV_REMOTERENDER_BUFFER
      - PBUFFER - Use an OpenGL Pbuffer for rendering (Default). Allows accelerated off-screen rendering. If not available, use a Pixmap. - PIXMAP - Use a Pixmap for rendering. (Was the default value prior to version 3.1) - SCREEN - Use an on-screen window for rendering. Generally provides best performance, but user must have exclusive use of screen to avoid the window being overlapped by other windows.
      See Also:
    • OIV_REMOTERENDER_DEBUG

      public static final String OIV_REMOTERENDER_DEBUG
      Debug info is enabled when set to "1".
      See Also:
    • OIV_REMOTERENDER_DISPLAY

      public static final String OIV_REMOTERENDER_DISPLAY
      Set this to the local X display string. The default is ":0.0". Set to ":0.1" to use the second pipe and so on (if any).
      See Also:
    • OIV_SHADER_CHECK_INTERVAL

      public static final String OIV_SHADER_CHECK_INTERVAL
      Affects SoShaderObject.
      Specifies how frequently the shader source file is checked for a change (in seconds). This allows you to edit a shader without needing to restart your application after each shader modification.
      See Also:
    • OIV_SHAPE_TYPE

      public static final String OIV_SHAPE_TYPE
      Affects SoShapeHints.
      Specifies the default shape type. Valid values are UNKNOWN, SOLID. The shape type can be set programmatically using the SoShapeHints::shapeType field.
      See Also:
    • OIV_SHARE_GEOM_MUTEX

      public static final String OIV_SHARE_GEOM_MUTEX
      By default in Open Inventor 3.1, all the geometry nodes of a particular class share a single class mutex. This reduces the number of mutexes needed and does not impose any penalty once the geometry is render cached. If geometry cannot be render cached, it may be better to use per-node mutexes by setting this variable to "0" (zero).
      See Also:
    • OIV_SHARE_LISTS

      public static final String OIV_SHARE_LISTS
      Specifies what kind of OpenGL display list sharing is allowed. - 0 Disable display list sharing (same behavior as v2.6 and older) - 1 Conservative sharing (not available on Unix)
      Only add context to a share group containing contexts with the same pixel format. This is the "official" limitation per the Microsoft documentation, but is very limiting. - 2 Aggressive sharing (default)
      Add context to the first share group that OpenGL says we can share with. This may allow us to share between contexts with different pixel formats, which is valuable for single vs. double buffered, stereo vs mono, etc.
      See Also:
    • OIV_STROKE_FONT_PATH

      public static final String OIV_STROKE_FONT_PATH
      Specifies the path of the directory containing the VSG stroke font data files. See SoFont for information on the stroke font files.
      See Also:
    • OIV_TEXTURE_BORDER_CLAMP_ENABLE

      public static final String OIV_TEXTURE_BORDER_CLAMP_ENABLE
      Affects SoShadowGroup.
      Some shadowing problems (performance issues or no computation of shadows) have been observed with some OpenGL drivers due to the Texture Border Clamp OpenGL extension. Set this environment variable to to 0 to disable use of this extension if necessary.
      See Also:
    • OIV_TEXTURE_QUALITY

      public static final String OIV_TEXTURE_QUALITY
      Affects SoComplexity.
      Specifies the default texture quality (0.0 to 1.0). The texture quality can be set programmatically using the SoComplexity::textureQuality field.
      See Also:
    • OIV_TEXTURED_TEXT_NO_MIPMAP

      public static final String OIV_TEXTURED_TEXT_NO_MIPMAP
      Affects text nodes when renderStyle is TEXTURED.
      Enables/Disables the use of mipmaps for textured text. By default, mipmaps are generated.
      See Also:
    • OIV_TRACKER_DIRECT_MODE

      public static final String OIV_TRACKER_DIRECT_MODE
      Affects SoDragger.
      Specifies the tracker direct mode. Valid values are: NONE, MOVE, ROTATE, FREE, DEFAULT. The tracker direct mode can be set programmatically using SoDragger::setTrackerDirectMode.
      See Also:
    • OIV_TRANSPARENCY_TYPE

      public static final String OIV_TRANSPARENCY_TYPE
      Affects SoGLRenderAction.
      Specifies the default transparency type. Valid values are:
      invalid reference
      SoGLRenderAction#NO_TRANSPARENCY
      ,
      invalid reference
      SoGLRenderAction#NO_SORT
      ,
      invalid reference
      SoGLRenderAction#OPAQUE_FIRST
      ,
      invalid reference
      SoGLRenderAction#SORTED_OBJECT
      ,
      invalid reference
      SoGLRenderAction#SORTED_PIXEL
      . The transparency type can be set programmatically using GLRenderAction::transparencyType.
      See Also:
    • OIV_UPDATE_AREA_COMPAT

      public static final String OIV_UPDATE_AREA_COMPAT
      Affects SoGLRenderAction.
      If not set (default), the update area is used for render culling and for limiting the rectangular area of the viewport region that will actually be rendered into. If set, Open Inventor will use the version 3.1.1 (and earlier) behavior of the update area. The specified update area is used for render culling, but not for limiting the rectangular area of the viewport region that will be rendered into.
      See Also:
    • OIV_USE_NPOT

      public static final String OIV_USE_NPOT
      Affects SoExtTexture2, SoTexture2, SoTextureCubeMap (and derived classes)
      By default, if your graphics board supports the OpenGL extension ARB_texture_non_power_of_two, Open Inventor will pass non-power-of-two textures directly to OpenGL. To disable this behavior, set this configuration parameter to 0. In this case the image will be scaled up or down to the next power of 2. Default is 1.
      See Also:
    • OIV_USE_VOLUMEPRO

      public static final String OIV_USE_VOLUMEPRO
      If this variable is set to "0" (zero), then Open Inventor, specifically VolumeViz, will not make any calls to the VolumePro interface library. This is rarely necessary but there have been cases where checking if the VolumePro board is installed, when there is no board, caused a crash.
      See Also:
    • OIV_VERTEX_ATTRIBS

      public static final String OIV_VERTEX_ATTRIBS
      Affects SoVertexShaderParameter and its derived classes. If set to 0, vertex shader attributes are ignored. Default is 1.
      See Also:
    • OIV_VERTEX_ORDERING

      public static final String OIV_VERTEX_ORDERING
      Affects SoShapeHints.
      Specifies the default vertex ordering. Valid values are UNKNOWN, CLOCKWISE, COUNTERCLOCKWISE. The vertex ordering can be set programmatically using the SoShapeHints::vertexOrdering field.
      See Also:
    • OIV_WINDING_TYPE

      public static final String OIV_WINDING_TYPE
      Affects SoShapeHints.
      Specifies the default winding type. Valid values are NONE, ODD, NON_ZERO, POSITIVE, NEGATIVE, ABS_GEQ_TWO. The winding type can be set programmatically using the SoShapeHints::windingType field.
      See Also:
    • OIV_ZERO_AREA_CHECK

      public static final String OIV_ZERO_AREA_CHECK
      Set this to a small positive float value.
      During decimation, a triangle with an area less than the specified value will be discarded. If you notice missing triangles in decimated output, try setting the value to a smaller number. Default: 1E-5.
      See Also:
    • SO_DRAGGER_DIR

      public static final String SO_DRAGGER_DIR
      Specifies the path to the directory containing dragger geometry files. By default, Open Inventor uses the dragger geometry files from $OIVHOME/data/draggerDefaults. See SoDragger.
      See Also:
    • SCALEVIZ_CLUSTERCOM

      public static final String SCALEVIZ_CLUSTERCOM
      Specifies which communication layer library to used by ScaleViz for Render Unit communication (OIRU). This value is a string that will specify:

      libClustercom-.so or ClusterCom-.dll

      as the library to use and

      launch-.sh or launch-.bat

      as the launcher script to use to spawn the process for this type of communication. Default is "base" which is the default supported implementation for a given OS. See ScaleViz text in User's Guide for more information.
      See Also:
    • SCALEVIZ_CONFIG_FILE

      public static final String SCALEVIZ_CONFIG_FILE
      Specifies the path of the ScaleViz configuration file.
      See Also:
    • SCALEVIZ_CONNECT_TIMEOUT

      public static final String SCALEVIZ_CONNECT_TIMEOUT
      Specifies the connection timeout in seconds used by application to connect to ScaleViz Daemon/Service. Default is 5 seconds.
      See Also:
    • SCALEVIZ_OIRU_DISPLAY

      public static final String SCALEVIZ_OIRU_DISPLAY
      Applies to ScaleViz compositing (depth compositing, tile compositing). - 1 Open Inventor Render Unit (OIRU) will display its rendered image on its own screen. Useful for debugging the configuration file or scene graph distribution. - 0 (default) (no display of rendered image on OIRU's screen)
      See Also:
    • SCALEVIZ_OIRU_PATH

      public static final String SCALEVIZ_OIRU_PATH
      Specifies the path to the Open Inventor Render Unit (OIRU). The OIRU is a small executable that runs on the "slave" nodes in a ScaleViz render cluster. By default the OIRU is in %OIVHOME%/program/oiru.exe on Windows, and $OIVHOME/bin/oiru on UNIX or Linux.
      See Also:
    • SCALEVIZD_RESOURCES_FILE

      public static final String SCALEVIZD_RESOURCES_FILE
      Specifies the path to the file describing the resources available in the cluster.
      See Also:
    • MESHVIZ_POLYGON_OFFSET

      public static final String MESHVIZ_POLYGON_OFFSET
      Affects MoMeshRepresentation, specifies if surface representations must be automatically offset with a SoPolygonOffset node, to allow line representations on top without artifacts.

      However SoPolygonOffset can introduce other artifacts on surfaces when the two-sided lighting mode is active.
      The default value is true (1).

      See Also:
    • MESHVIZ_OCTREE_CACHE_CELLBBOX

      public static final String MESHVIZ_OCTREE_CACHE_CELLBBOX
      Affects MeshViz, specifies if the cell boundingboxes must be cached when building the octree associated to a mesh.

      This speeds up the search for cells in the octree when using MoMeshPointProbe, MoMeshGridPlaneSlice and MoMeshStreamline nodes, or pointprobes, gridplaneslice and streamline extractors for all kind of meshes (MiPointProbeUnstructured, MiGridPlaneSliceExtractUnstructured, MiStreamlineExtractUnstructured) except regular and rectilinear that do not use octrees.
      The default value is false (0, not cached).

      See Also:
    • MESHVIZ_OCTREE_MAX_DEPTH

      public static final String MESHVIZ_OCTREE_MAX_DEPTH
      Affects MeshViz, specifies the maximum depth allowed to build the octree associated to a mesh.

      Octree is built when using MoMeshPointProbe, MoMeshGridPlaneSlice and MoMeshStreamline nodes, or pointprobes, gridplaneslice and streamline extractors for all kind of meshes (MiPointProbeUnstructured, MiGridPlaneSliceExtractUnstructured, MiStreamlineExtractUnstructured) except regular and rectilinear that do not use octrees.
      The default value is 6.

      See Also:
    • MESHVIZ_OCTREE_MAX_CELL_PER_TILE

      public static final String MESHVIZ_OCTREE_MAX_CELL_PER_TILE
      Affects MeshViz, specifies the maximum number of cells that can be contained in a tile of the octree.

      Octree is built when using MoMeshPointProbe, MoMeshGridPlaneSlice and MoMeshStreamline nodes, or pointprobes, gridplaneslice and streamline extractors for all kind of meshes (MiPointProbeUnstructured, MiGridPlaneSliceExtractUnstructured, MiStreamlineExtractUnstructured) except regular and rectilinear that do not use octrees.
      The default value is 40.

      See Also:
    • TGS_LICENSE_DEBUG

      @Deprecated public static final String TGS_LICENSE_DEBUG
      Deprecated.
      please use OIV_LICENSE_DEBUG instead.
      See Also:
    • TGS_LICENSE_FILE

      @Deprecated public static final String TGS_LICENSE_FILE
      Deprecated.
      please use VSG_LICENSE_FILE instead.
      See Also:
    • VSG_LICENSE_DEBUG

      @Deprecated public static final String VSG_LICENSE_DEBUG
      Deprecated.
      please use OIV_LICENSE_DEBUG instead.
      See Also:
    • OIV_LICENSE_DEBUG

      public static final String OIV_LICENSE_DEBUG
      Specifies the name of the file to which license debug information will be written. If not set, license debug info is not generated.
      See Also:
    • VSG_LICENSE_FILE

      public static final String VSG_LICENSE_FILE
      Specifies the full path of the file containing the VSG license strings for Open Inventor and its extensions. Open Inventor searches for a valid password in the following locations: internal unlock string (see SoLockManager), the system registry (Windows only, see Ladmin.htm), VSG_LICENSE_FILE, $OIVJHOME/license/password.dat, and password.dat in the current directory.
      See Also:
    • OIV_JAVA_VERBOSE_LEVEL

      public static final String OIV_JAVA_VERBOSE_LEVEL
      Prints debug information according to the specified level value. A value of 0 means no print (default value). The higher the level, the more messages are displayed.
      See Also:
    • OIV_JAVA_LOAD_DEBUG_NATIVE_LIBRARIES

      public static final String OIV_JAVA_LOAD_DEBUG_NATIVE_LIBRARIES
      If OIV_JAVA_LOAD_DEBUG_NATIVE_LIBRARIES is 1, Open Inventor loads the debug version of native libraries. As the debug version of these libraries are packaged in a separated folder, the PATH or LD_LIBRARY_PATH variable must be set to this one.

      For instance, Open Inventor loads com.openinventor.inventorD.dll if OIV_JAVA_LOAD_DEBUG_NATIVE_LIBRARIES is 1, otherwise Open Inventor loads com.openinventor.inventor.dll. Default value is 0.

      See Also:
    • OIVJHOME

      public static final String OIVJHOME
      Path to the installation directory of Open Inventor Java. This variable must be set by user in the properties file, or Open Inventor Java will not work properly.
      See Also:
    • OIV_HELP_URL

      public static final String OIV_HELP_URL
      URL of the html file that is opened when clicking on the help button (icon with a ?) of any viewer.
      See Also:
    • OIV_LIBRARY_PATH

      public static final String OIV_LIBRARY_PATH
      [Windows only] OIV_LIBRARY_PATH may be used to define a path to the native lib of OpenInventor. It is like java.library.path but just for OpenInventor native lib.
      See Also:
  • Constructor Details

    • SoPreferences

      public SoPreferences()
  • Method Details

    • getValue

      public static String getValue(String key)
      Returns the value of the specified environment variable in the Open Inventor Java environment. The returned string may be empty if the name is defined but does not have an associated value. The return value is null if the name was not found in the Open Inventor Java environment.
    • getValue

      public static String getValue(String key, String defaultValue)
      Returns the value of the specified environment variable in the Open Inventor Java environment. The returned string may be empty if the name is defined but does not have an associated value. If the environment variable is not defined in the Open Inventor environment, the specified default value will be returned.
    • getBoolean

      public static boolean getBoolean(String key, boolean defaultValue)
      Returns the value of the specified environment variable in the Open Inventor environment Java, interpreted as a boolean. If the environment variable is not defined in the Open Inventor environment, or if its value cannot be interpreted as a boolean, the specified default value will be returned.
    • getInteger

      public static int getInteger(String key, int defaultValue)
      Returns the value of the specified environment variable in the Open Inventor environment, interpreted as an integer. If the environment variable is not defined in the Open Inventor environment, the specified default value will be returned.
    • getLong

      public static long getLong(String key, long defaultValue)
      Returns the value of the specified environment variable in the Open Inventor environment, interpreted as a long. If the environment variable is not defined in the Open Inventor environment, the specified default value will be returned.
    • getFloat

      public static float getFloat(String key, float defaultValue)
      Returns the value of the specified environment variable in the Open Inventor environment, interpreted as a float. If the environment variable is not defined in the Open Inventor environment, the specified default value will be returned.
    • getDouble

      public static double getDouble(String key, double defaultValue)
      Returns the value of the specified environment variable in the Open Inventor environment, interpreted as a double. If the environment variable is not defined in the Open Inventor environment, the specified default value will be returned.
    • setValue

      public static void setValue(String key, String value)
      Sets a variable in the Open Inventor environment. As this variable is set in memory, it is local to the application process and can only be retrieved using SoPreferences methods. If the value parameter is set to null, then the variable is set with no value associated with it.