SoDB Class Reference
[General]

Scene graph database class. More...

#include <Inventor/SoDB.h>

List of all members.

Classes

struct  MTstruct
class  SoGlobalDBInfos

Public Types

enum  RenderCacheMode {
  COMPILE,
  COMPILE_AND_EXECUTE,
  AUTO_RENDER_CACHE
}

Static Public Member Functions

static void init ()
static void finish ()
static void threadInit ()
static void setSystemTimer (SoSystemTimer *timer)
static SbBool read (SoInput *in, SoNode *&rootNode)
static SbBool read (SoInput *in, SoPath *&path)
static SoSeparatorreadAll (SoInput *in)
static SoNONUNICODE SbBool readPROTOFromFile (SoInput *in, char *name, SoVRMLPROTODef *&protoDef)
static SbBool readPROTOFromFile (SoInput *in, const SbString &name, SoVRMLPROTODef *&protoDef)
static void createRoute (SoNode *pFromNode, const char *fromEventOutName, SoNode *pInNode, const char *toEventInName)
static void removeRoute (SoNode *pFromNode, const char *fromEventOutName, SoNode *pInNode, const char *toEventInName)
static SbBool registerHeader (const SbString &headerString, SbBool isBinary, float ivVersion, SoDBHeaderCB *preCB, SoDBHeaderCB *postCB, void *userData=NULL)
static SbBool getHeaderData (const SbString &string, SbBool &isBinary, float &ivVersion, SoDBHeaderCB *&preCB, SoDBHeaderCB *&postCB, void *&userData, SbBool substringOK=FALSE)
static int getNumHeaders ()
static SbString getHeaderString (int i)
static SbBool isValidHeader (const char *testString)
static SoFieldcreateGlobalField (const SbName &name, SoType type)
static SoFieldgetGlobalField (const SbName &name)
static void renameGlobalField (const SbName &oldName, const SbName &newName)
static void setRealTimeInterval (const SbTime &deltaT)
static const SbTimegetRealTimeInterval ()
static void setDelaySensorTimeout (const SbTime &t)
static const SbTimegetDelaySensorTimeout ()
static void processEvents ()
static int doSelect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *userTimeOut)
static SbBool isMultiThread ()
static void writelock ()
static void writeunlock ()
static void readlock ()
static void readunlock ()
static void setNumRenderCaches (int num)
static int getNumRenderCaches ()
static void setRenderCacheMode (RenderCacheMode mode)
static RenderCacheMode getRenderCacheMode ()
static SbTime getCurrentTime ()
static bool addPlugin (const SbString &fileName)
static bool removePlugin (const SbString &fileName)
static const std::vector
< SbString > & 
getLoadedPlugins ()
static const std::vector
< SbString > & 
getUnloadedPlugins ()
static bool addPluginsDirectory (const SbString &dirName)
static bool removePluginsDirectory (const SbString &dirName)
static const std::vector
< SbString > & 
getPluginsDirectories ()
static void addConverter (SoType fromField, SoType toField, SoType converterEngine)
static SoType getConverter (SoType fromField, SoType toField)
static void removeConverter (SoType fromField, SoType toField)
static void setIvTuneAllowed (SbBool ivTuneAllowed)
static SbBool getIvTuneAllowed ()

Friends

class SoGlobalField

Deprecated



static SoDEPRECATED const char * getVersion ()
static SoDEPRECATED SoVRMLGroupreadAllVRML (SoInput *in)
static SoDEPRECATED void prioritizeChildrenCaching (SbBool onOff)
static SoDEPRECATED SbBool isPrioritizedChildrenCaching ()
static SoDEPRECATED float getLicensingVersionNumber ()
static SoDEPRECATED int LicenseCheck (const char *productName, float version, const char *licenseString=NULL, SbBool printWarning=TRUE, char **errReport=NULL)

Detailed Description

Scene graph database class.

The SoDB class holds all scene graphs, each representing a 3D scene used by an application. A scene graph is a collection of SoNode objects which come in several varieties (see SoNode).

Application programs must initialize the database by calling SoDB::init() before calling any other database routines and before constructing any nodes, paths, functions, or actions. Note that SoDB::init() is called by SoInteraction::init(), SoNodeKit::init(), and SoWin::init(), so if you are calling any of these methods, you do not need to call SoDB::init() directly. All methods on this class are static.

Application programs should close and cleanup the database by calling SoDB::finish() after deleting all explicitly created Open Inventor objects. Note that in when using C++ API, "reference counted" objects like nodes and paths cannot be explicitly deleted.

All methods in this class are static.

Data Files:

SoDB also provides convenient methods for reading data files, for example:

      SbString filename = "$OIVHOME/data/models/bird.iv";
      SoSeparator* rootSep = NULL;
      SoInput input;
      if (input.openFile( filename )) {
        rootSep = SoDB::readAll( &in );
        input.closeFile();
      }

Open Inventor has built-in support for reading the following file formats:

Open Inventor also supports many standard CAD file formats. See SoCADInputReader for the current list. Also see SoCADFileFormat.

Multithread Programming:

Application programs that use Open Inventor classes from more than one thread must call SoDB::threadInit instead of SoDB::init.

Although it's only necessary to call SoDB::init once in a single-threaded program, in a multithreaded program, every thread that uses Open Inventor classes must call SoDB::threadInit.

Since SoDB::init is called by SoInteraction::init, SoNodeKit::Init, and SoWin::init, do not call these methods in a multithread program. Call (for example), SoInteraction::threadInit instead.

Version Number:

Please use the SoLicensesInfo class to query the Open Inventor version number.

SEE ALSO

SoBase, SoNode, SoEngine, SoField, SoInput, SoFile, SoPath, SoOneShotSensor, SoDataSensor, SoWin

See related examples:

QtCustomViewer, QtLargeModelViewer, QtReadFile


Member Enumeration Documentation

Render cache modes.

Enumerator:
COMPILE 

Display lists are created with COMPILE mode.

COMPILE_AND_EXECUTE 

Display lists are created with COMPILE_AND_EXECUTE mode.

AUTO_RENDER_CACHE 

Automatically choose mode depending on the hardware.

(Default).


Member Function Documentation

static void SoDB::addConverter ( SoType  fromField,
SoType  toField,
SoType  converterEngine 
) [static]

Registers a field conversion engine that can be used to convert from one type of field to another.

The type id's of the two fields are passed in, as is the type id of the field converter engine (derived from SoFieldConverter).

static bool SoDB::addPlugin ( const SbString fileName  )  [static]

Loads a plugin library.

A plugin library may implement one or more classes extending Open Inventor classes. For example a custom node or a custom file reader derived from SoInputReader.

A plugin library must implement the initPlugin() and exitPlugin() C-formatted entry-points. The initPlugin() function is responsible for registering the new class (or classes) in the Open Inventor database through the standard SoType type creation mechanism. The exitPlugin() function is used to disable the use of the custom class(s) by removing the corresponding type(s) from the Open Inventor database.

By default, Open Inventor attempts to load all files that may be plugins (files with the extension .dll or .so depending on the platform) from the following locations:

  • Application specified directories,
    defined using the OIV_PLUGINS_DIRECTORY environment variable, or the SoDB::addPluginsDirectory() method.
  • The current application working directory.
  • The directory containing the Open Inventor libraries.

Specific plugin libraries can be loaded and unloaded by direct calls to the SoDB::addPlugin() and SoDB::removePlugin() methods.

Different plugins can be designed depending on their usage. Please refer to the Open Inventor plugin section in the documentation

static bool SoDB::addPluginsDirectory ( const SbString dirName  )  [static]

Adds a directory to search for libraries defining new Open Inventor plugins.

See addPlugin(). Returns true if directory has been successfully added.

static SoField* SoDB::createGlobalField ( const SbName name,
SoType  type 
) [static]

The database maintains a namespace for global fields, making sure that there is at most one instance of a global field with any given name in the database.

This routine is used to create new global fields. If there is no global field with the given name, it will create a new global field with the given name and type. If there is already a global field with the given name and type, it will return it. If there is already a global field with the given name but a different type, this returns NULL.

All global fields must be derived from SoField; typically the result of this routine is cast into the appropriate type. For example:

static void SoDB::createRoute ( SoNode pFromNode,
const char *  fromEventOutName,
SoNode pInNode,
const char *  toEventInName 
) [static]

Creates a VRML 2.0 ROUTE-TO connection.

The connection is made from the pFromNode 's fromEventOut eventOut to the pToNodes 's toEventIn eventIn. This is equivalent to

ROUTE pFromNode.fromEventOut
TO pToNode.toEventIn

in a VRML 2.0 file.

static int SoDB::doSelect ( int  nfds,
fd_set *  readfds,
fd_set *  writefds,
fd_set *  exceptfds,
struct timeval *  userTimeOut 
) [static]

UNIX/Linux Only
In order to keep timer and idle sensors running as expected, it is necessary that an Open Inventor application not block while waiting for input.

If the Open Inventor application uses the SoXt component library, this can be handled automatically. However, if the application is using its own event loop, this function is provided as a wrapper around select() that will handle Open Inventor tasks if necessary instead of blocking.

static void SoDB::finish (  )  [static]

Frees Open Inventor's internal static memory allocations.

This avoids false positives from memory leak checking software. We recommend calling this method and it should be the last Open Inventor method called by the application.

Note : Open Inventor objects must be destroyed before you call this method. See SoXt::finish() method for additional info.

static SoType SoDB::getConverter ( SoType  fromField,
SoType  toField 
) [static]

Returns the field conversion engine registered for the two given field types.

If no such engine exists, SoType::badType() is returned. See addConverter().

static SbTime SoDB::getCurrentTime (  )  [static]

Returns the current time.

static const SbTime& SoDB::getDelaySensorTimeout (  )  [static]

Returns the current delay queue timeout value.

See setDelaySensorTimeout().

static SoField* SoDB::getGlobalField ( const SbName name  )  [static]

Returns the global field with the given name, or NULL if there is none.

See createGlobalField(). The type of the field may be checked using the SoField::isOfType(), SoField::getClassTypeId(), and SoField::getTypeId() methods.

static SbBool SoDB::getHeaderData ( const SbString string,
SbBool isBinary,
float &  ivVersion,
SoDBHeaderCB *&  preCB,
SoDBHeaderCB *&  postCB,
void *&  userData,
SbBool  substringOK = FALSE 
) [static]

Passes back the data registered with the given header string, including the flag specifying whether the string is for a binary file, pointers to the callback functions invoked before and after reading the file, and a pointer to the user data passed to the callback functions.

If the given header string does not match any of the registered headers, and the substringOK flag is TRUE, then the method will search for a registered header that is a substring of the given string. The method returns TRUE if a matching registered header, or subheader, was found.

static SbString SoDB::getHeaderString ( int  i  )  [static]

Returns the i'th header.

See registerHeader().

static SbBool SoDB::getIvTuneAllowed (  )  [static]

Returns TRUE if IvTune can be launched interactively using the keyboard shortcut.

See setIvTuneAllowed().

static SoDEPRECATED float SoDB::getLicensingVersionNumber (  )  [static]

Returns current version number for license checking.

See method LicenseCheck.

If you need a descriptive string see getVersion. If you just need the version number as an integer or string, see the macros in SoVersion.h.

Deprecated:

Deprecated since Open Inventor 9800
please use SoLicensesInfo::getLicensingVersionNumber() instead
static const std::vector<SbString>& SoDB::getLoadedPlugins (  )  [static]

Returns the list of currently loaded plugins (file names).

See addPlugin().

static int SoDB::getNumHeaders (  )  [static]

Returns the number of valid headers, including standard Open Inventor headers, and user-registered headers.

See registerHeader().

static int SoDB::getNumRenderCaches (  )  [inline, static]

Returns the current maximum number of render caches.


See method setNumRenderCaches().

static const std::vector<SbString>& SoDB::getPluginsDirectories (  )  [static]

Returns the list of search directories for plugin loading.

See addPlugin().

static const SbTime& SoDB::getRealTimeInterval (  )  [static]

Returns how often the database is updating the realTime global field.

See also setRealTimeInterval(). The realTime global field can be accessed like this:

 SoSFTime* realTimeField = (SoSFTime*)SoDB::getGlobalField( "realTime" );
static RenderCacheMode SoDB::getRenderCacheMode (  )  [static]

Returns the current render cache mode.

See setRenderCacheMode().

static const std::vector<SbString>& SoDB::getUnloadedPlugins (  )  [static]

Returns the list of plugins that failed to load (file names).

See addPlugin().

static SoDEPRECATED const char* SoDB::getVersion (  )  [static]

Returns a character string identifying the version of the Open Inventor library in use.

For example: "9.4.0.0" for the 9.4 release.

For a floating point version number see getLicensingVersionNumber. For integer and string constants, see SoVersion.h.

Deprecated:

Deprecated since Open Inventor 9800
please use SoLicensesInfo::getVersion() instead
static void SoDB::init (  )  [static]

Initializes the database.

This must be called before calling any other database routines, including the construction of any nodes, paths, engines, or actions.

static SbBool SoDB::isMultiThread (  )  [static]

Returns whether multi-thread support is enabled in Open Inventor.

Always returns FALSE before SoDB::init or SoDB::threadInit has been called.

static SoDEPRECATED SbBool SoDB::isPrioritizedChildrenCaching (  )  [static]

Returns the children caching priority state.

Deprecated:

Deprecated since Open Inventor 9000
No longer used.
static SbBool SoDB::isValidHeader ( const char *  testString  )  [static]

This returns TRUE if the given character string is one of the valid Open Inventor file headers, (e.g., "#Inventor V2.0 binary"), or if the string has been registered as a valid header through the registerHeader() method.

static SoDEPRECATED int SoDB::LicenseCheck ( const char *  productName,
float  version,
const char *  licenseString = NULL,
SbBool  printWarning = TRUE,
char **  errReport = NULL 
) [static]

Query if Open Inventor or an extension module is licensed on this machine.

Returns:
< 0 If product or version is NOT licensed on this machine.
>= 0 If product and version are licensed and can be used.

Note: If productName is "ScaleViz" and ScaleViz is licensed on this machine. Then the return value is the number of render nodes allowed.

Parameters:
productName : Product to be licensed (no blanks), e.g. OpenInventor or VolumeVizLDM.
version : Version to be licensed (see getLicensingVersionNumber).
licenseString : (optional) Embedded application password string, if any.
printWarning : If true, error and warning messages (if any) will be displayed to user.
errReport : If not NULL, will be set to point to the text of the error or warning messages (if any).
Note! This address is an internal static buffer and must not be freed by the application.

FlexNet Notes:

static SoDEPRECATED void SoDB::prioritizeChildrenCaching ( SbBool  onOff  )  [static]

Set the priority to children caching.

When set to TRUE, render caches are built from the "bottom up", meaning caches are built for the lowest level separators in the scene graph first. Higher level separators will build caches during subsequent traversals. Several scene graph traversals may be needed to build all possible caches.

When set to FALSE, render caches are built from the top down, meaning caches are built for the highest level separators in the scene graph first.

Setting TRUE may increase rendering performance because of a finer granularity in cache creation and calling. The default is TRUE. Prior to Open Inventor version 6.0, the default was FALSE. The value can also be set using the OIV_PRIORITIZE_CHILDREN_CACHING configuration parameter.

Deprecated:

Deprecated since Open Inventor 9000
No longer used.
static void SoDB::processEvents (  )  [static]

Process Open Inventor sensor queues (TimerQueue and DelayQueue).

Normally this is handled automatically by the viewer.

static SbBool SoDB::read ( SoInput in,
SoPath *&  path 
) [static]

Reads a graph from the file specified by the given SoInput, returning the resulting path in path.

There is an alternate read routine that returns the resulting root node. The programmer is responsible for determining which routine to use, based on the contents of the input.

These routines return FALSE if any error occurred during reading.

If the passed SoInput was used to open a file and the name of the file contains a directory, SoDB automatically adds the directory to the end of the current directory search path in the SoInput. This means that nested files named in SoFile nodes may be found relative to that directory. The directory is removed from the search path when reading is complete.

static SbBool SoDB::read ( SoInput in,
SoNode *&  rootNode 
) [static]

Reads a graph from the file specified by the given SoInput, returning the resulting root node in rootNode.

There is an alternate read routine that returns the resulting path. The programmer is responsible for determining which routine to use, based on the contents of the input.

These routines return FALSE if any error occurred during reading.

If the passed SoInput was used to open a file and the name of the file contains a directory, SoDB automatically adds the directory to the end of the current directory search path in the SoInput. This means that nested files named in SoFile nodes may be found relative to that directory. The directory is removed from the search path when reading is complete.

static SoSeparator* SoDB::readAll ( SoInput in  )  [static]

Reads all graphs and paths from the file specified by the given SoInput.

If there is only one graph in the file and its root is an SoSeparator, the root is returned. In all other cases, this creates an SoSeparator, adds the root nodes of all graphs read as children of it, and returns it. This returns NULL on error. This processes directory paths in the same way as the other reading routines.

Reading an OpenFlight file into Open Inventor is just like reading in an Open Inventor format file. Open Inventor will open the file and automatically detect that it is an OpenFlight file. Optionally, you can tell Open Inventor explicitly that the file type is OpenFlight. See SoInput for details about support of the OpenFlight format.

Reading a DXF file into Open Inventor is just like reading in an Open Inventor format file. Open Inventor will open the file and automatically detect that it is a DXF file. Optionally, you can tell Open Inventor explicitly that the file type is DXF. See SoInput for details about support of the DXF format.

static SoDEPRECATED SoVRMLGroup* SoDB::readAllVRML ( SoInput in  )  [static]

Reads all graphs and paths from the VRML file specified by the given SoInput.

If there is only one graph in the file and its root is an SoVRMLGroup, the root is returned. In all other cases, this creates an SoVRMLGroup, adds the root nodes to its children field, and returns it. This returns NULL on error. This processes directory paths in the same way as the other reading routines.

Deprecated:

Deprecated since Open Inventor 9810
The VRML API is no longer supported.
static void SoDB::readlock (  )  [static]

Acquire a non-exclusive global scene graph read-lock.

The calling thread will block until a read-lock is available (no thread is holding the global write-lock). Multiple threads may hold global read-locks at the same time. While holding a read-lock it is safe to traverse the scene graph and to query values of fields, but not to modify the scene graph (see method SoDB::writelock). See readunlock().

static SbBool SoDB::readPROTOFromFile ( SoInput in,
const SbString name,
SoVRMLPROTODef *&  protoDef 
) [static]

Reads all PROTOs in the specified input file up to and including the named PROTO and returns the definition of the named PROTO in protoDef.

static SoNONUNICODE SbBool SoDB::readPROTOFromFile ( SoInput in,
char *  name,
SoVRMLPROTODef *&  protoDef 
) [static]

Reads all PROTOs in the specified input file up to and including the named PROTO and returns the definition of the named PROTO in protoDef.

Non Unicode List:
This function should not be used in a Unicode application.
static void SoDB::readunlock (  )  [static]

Release a non-exclusive global scene graph read-lock.

See readunlock().

static SbBool SoDB::registerHeader ( const SbString headerString,
SbBool  isBinary,
float  ivVersion,
SoDBHeaderCB preCB,
SoDBHeaderCB postCB,
void *  userData = NULL 
) [static]

Registers the given string as a valid header for input files.

The string must be 80 characters or less, and start with the comment character '#'. If the passed isBinary flag is true, any file with this header will be read as a binary file. Usually, a user-defined header represents a file format that is a superset of the Open Inventor file format. The ivVersion number indicates which Open Inventor file version this header corresponds to. The user-defined callback functions preCB and postCB are called before and after a file with this header is read. The userData is passed to both callback functions. The method returns TRUE if the header is successfully registered. Note, nothing prevents you from registering the same string multiple times.

static void SoDB::removeConverter ( SoType  fromField,
SoType  toField 
) [static]

Remove a previously added converter.

See addConverter().

static bool SoDB::removePlugin ( const SbString fileName  )  [static]

Unloads the specified plugin library.

See addPlugin(). Returns true if plugin was successfully unloaded.

static bool SoDB::removePluginsDirectory ( const SbString dirName  )  [static]

Remove directory from the list of search directories for plugin loading.

See addPlugin(). Returns true if directory has been successfully removed.

static void SoDB::removeRoute ( SoNode pFromNode,
const char *  fromEventOutName,
SoNode pInNode,
const char *  toEventInName 
) [static]

Removes a VRML 2.0 ROUTE-TO connection.

See createRoute().

static void SoDB::renameGlobalField ( const SbName oldName,
const SbName newName 
) [static]

Renames the global field named oldName.

Renaming a global field to an empty name ("") deletes it. If there is already a global field with the new name, that field will be deleted (the getGlobalField() method can be used to guard against this). See createGlobalField().

static void SoDB::setDelaySensorTimeout ( const SbTime t  )  [static]

This sets the timeout value for sensors that are delay queue sensors (one-shot sensors, data sensors).

Delay queue sensors are triggered whenever there is idle time. If a long period of time elapses without any idle time (as when there are continuous events to process), these sensors may not be triggered. Setting this timeout value ensures that if the specified length of time elapses without any idle time, the delay queue sensors will be processed anyway.

The default timeout for delay queue sensors is 0.083 seconds. So if delay queue sensors are only triggered by the timeout, then by default the viewer animation can only run at about 12 frames per second. To trigger the delay queue sensors at, for example, 30 frames per second, make this call:

SoDB::setDelaySensorTimeout( 0.03f );

static void SoDB::setIvTuneAllowed ( SbBool  ivTuneAllowed  )  [static]

Specifies if launching IvTune interactively using the keyboard shortcut is allowed.

See SoIvTune to set the keyboard shortcut.

static void SoDB::setNumRenderCaches ( int  num  )  [inline, static]

This method sets the maximum number of caches for nodes that create render caches.

Examples of nodes that create render caches are SoSeparator (OpenGL display lists) and SoTexture2 (OpenGL texture objects). This method affects only nodes that are created after it is called, not nodes that were created before it. Setting the number of caches to zero disables render caching for all nodes created after the call.

By default, each node maintains 2 render caches. (This is to allow two different representations, e.g., filled and wireframe, to both be cached.) Each render cache uses memory, so decreasing this number may decrease the memory requirements of the application. However multi-pipe applications should generally set the number of render caches equal to the number of pipes because pipes may not be able to share display lists.

This value can also be specified globally using the environment variable OIV_MAX_CACHES. This value can also be specified separately for classes that have a setNumRenderCaches method.

static void SoDB::setRealTimeInterval ( const SbTime deltaT  )  [static]

The database automatically creates one global field when SoDB::init() is called.

The realTime global field, which is of type SoSFTime, can be connected to engines and nodes for real-time animation. The database will automatically update the realTime global field 12 times per second, using a timer sensor. Typically, there will be a node sensor on the root of the scene graph which schedules a redraw whenever the scene graph changes; by updating the realTime global field periodically, scene graphs that are connected to realTime (and are therefore animating) will be redrawn. The rate at which the database updates realTime can be controlled with this routine. Passing in a zero time will disable automatic update of realTime . If there are no enabled connections from the realTime field to any other field, the sensor is automatically disabled. Note that the SoSceneManager class automatically updates realTime immediately after redrawing, which will result in as high a frame rate as possible if the scene is continuously animating. This method ensures that engines that do not continuously animate (such as SoTimeCounter) will eventually be scheduled. See also getRealTimeInterval(). The realTime global field can be accessed like this:

   SoSFTime* realTimeField = (SoSFTime*)SoDB::getGlobalField( "realTime" );
static void SoDB::setRenderCacheMode ( RenderCacheMode  mode  )  [static]

This method specifies the way render caches (display lists) will be created.

By default, under each separator node, GL commands are merely compiled and executed when the display list is created (mode = COMPILE). This can increase performances on some graphics board. With this method you can ask OIV to execute GL commands as they are compiled into the display list (mode = COMPILE_AND_EXECUTE). You can also use the AUTO_RENDER_CACHE to allow Open Inventor to detect the best mode.

static void SoDB::setSystemTimer ( SoSystemTimer timer  )  [static]

The system dependent timer allows Inventor to manage its sensor queue (for timers, animation) when creating custom viewers.

Typically, this method could be called in the constructor of the first interactive render area created. Calling this method more than once, does nothing. The SoSystemTimer instance is reference counted and will be deleted when its reference count reaches 0.

static void SoDB::threadInit (  )  [static]

Initializes the database with support for multithread programs.

This must be called before calling any other database routines, including the construction of any nodes, paths, engines, or actions. This method calls SoDB::init. Application programs that use Open Inventor classes from more than one thread must call this method instead of SoDB::init.

Note: Although it's only necessary to call SoDB::init once in a single-threaded program, in a multithreaded program, every thread that uses Open Inventor classes must call SoDB::threadInit.

static void SoDB::writelock (  )  [static]

Acquire the global scene graph write-lock.

The calling thread will block until the write-lock is available (no threads hold a global read-lock). The global write-lock is exclusive. Only a single thread can hold this lock and while it is held, no thread can acquire a global read-lock. While holding the global write-lock it is safe to modify the scene graph including adding/removing nodes, modifying field values, etc. Do not hold the global write-lock longer than necessary. See writeunlock().

Note: Be sure the global write-lock is always released or there is a good chance the application will "dead lock" because all standard actions automatically attempt to acquire a global read-lock.

static void SoDB::writeunlock (  )  [static]

Release the global scene graph write-lock.

See writelock().


Friends And Related Function Documentation

friend class SoGlobalField [friend]

The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 24 Mar 2020
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/