55#include <Inventor/SoType.h>
56#include <Inventor/SbTime.h>
57#include <Inventor/threads/SbThread.h>
58#include <Inventor/threads/SbThreadLocalStorage.h>
62#include <Inventor/sensors/SoSensorManager.h>
63#include <Inventor/SbPList.h>
64#include <Inventor/SoPreferences.h>
84#pragma warning( push )
85#pragma warning(disable:4251)
88#include <Inventor/SoInventorLibName.h>
90#include <Inventor/SoModule.h>
91SO_MODULE_HEADER(SoInventor, __INVENTORDLL)
95#if ((_MANAGED == 1) || (_M_CEE == 1))
96#if defined(SO_MODULE_CHECK)
99#elif !defined HIDDEN_FROM_DOC && !defined(LIBRARYBUILD)
104#if defined SO_VERSION_DEPRECATED_ERROR && !defined(LIBRARYBUILD)
105static SoModuleCheck soVersionDeprecatedErrorCheck(SO_VERSION_DEPRECATED_ERROR);
375 void *userData = NULL);
393 SbBool substringOK = FALSE);
545 static int doSelect(
int nfds, fd_set *readfds, fd_set *writefds,
546 fd_set *exceptfds,
struct timeval *userTimeOut);
613 {
return s_numRenderCaches; }
701SoEXTENDER_Documented
public:
747 static long openRegistryKey(
const SbBool readOnlyFlag=FALSE);
754 static long getRegistryKeyValue(LPTSTR keyName,
759 const SbBool readOnlyFlag=FALSE
765 static long closeRegistryKey();
776 static void threadFinish();
784 static SbBool trywritelock();
787 static SbBool tryreadlock();
792 {
return SoInventorBase::getGlobalMutex(); }
795 static SoSensorManager *getSensorManager();
798 static SoSensorManager *getUnlockSensorManager();
801 static bool isInitialized();
804 static SbBool getPickCullingEnabled()
805 {
return m_pickCullingEnabled; }
807 static const char* profileName;
815 static void startNotify();
816 static SbBool isNotifying();
817 static void endNotify();
820 static void enableRealTimeSensor(
SbBool enable);
826 static SbBool m_readingAll;
834 static SbBool useNameCompat;
838 static SbThreadId_t getMainThreadId();
841 static bool isInMainThread();
844 static void resetMainThreadId();
850 template <
class T>
static void
851 syncFieldGlobaly( T& field,
const SbName& name )
857 globalField->setValue( field.getValue() );
859 field.connectFrom( globalField );
860 field.setOnValueChangedCallback( [name](
SoField* _field ) {
861 T* field =
static_cast<T*
>( _field );
863 if ( globalField && ( *field != *globalField ) )
864 *globalField = *field;
869 SB_THREAD_TLS_HEADER();
874 static HKEY s_vsgRegistryKeys;
892 static SbBool useGlobalFieldTime;
896 static bool s_notUseGPU;
899 class SoGlobalDBInfos
913 SoSensorManager* m_sensorManager;
916 SoSFRealTime *m_realTime;
923 SoGlobalDBInfos* globalDBInfos;
929 static SoGlobalDBInfos* getGlobalDBInfos();
933 static SoGlobalDBInfos* s_globalInfos;
936 static int notifyCount;
938 static void realTimeSensorCallback(
void *data,
SoSensor *sensor);
947 static SbDict *conversionDict;
950 static uint32_t getConversionKey(
SoType fromField,
SoType toField);
952 static void iv2_1PreCallback(
void *userData,
SoInput *in);
953 static void iv2_0PreCallback(
void *userData,
SoInput *in);
954 static void iv1_0PreCallback(
void *userData,
SoInput *in);
955 static void iv2_0PostCallback(
void *userData,
SoInput *in);
956 static void iv1_0PostCallback(
void *userData,
SoInput *in);
960 static int s_numRenderCaches;
961 static SbBool m_ivTuneAllowed;
967 static SbBool m_pickCullingEnabled;
969 static int s_initRefCount;
971 static SbThreadId_t m_mainThreadId;
973 static bool internalInit();
981#pragma warning( pop )
Character string stored in a hash table.
List of generic (void *) pointers.
Class for smart character strings.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Portable mutex c...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Portable readers...
Class for representation of a time.
Base class for all nodes, paths, and engines.
Scene graph database class.
static const std::vector< SbString > & getLoadedPlugins()
Returns the list of currently loaded plugins (file names).
static void renameGlobalField(const SbName &oldName, const SbName &newName)
Renames the global field named oldName.
static SbBool read(SoInput *in, SoPath *&path)
Reads a graph from the file specified by the given SoInput, returning the resulting path in path.
static SbBool isValidHeader(const char *testString)
This returns TRUE if the given character string is one of the valid Open Inventor file headers,...
static void processEvents()
Process Open Inventor sensor queues (TimerQueue and DelayQueue).
friend class SoGlobalField
static SoField * createGlobalField(const SbName &name, SoType type)
The database maintains a namespace for global fields, making sure that there is at most one instance ...
static void finish()
Frees Open Inventor's internal static memory allocations.
static void setDelaySensorTimeout(const SbTime &t)
This sets the timeout value for sensors that are delay queue sensors (one-shot sensors,...
friend class SoVRMLInline
static SoDEPRECATED void threadInit()
Initializes the database.
static int doSelect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *userTimeOut)
UNIX/Linux Only In order to keep timer and idle sensors running as expected, it is necessary that ...
static SoType getConverter(SoType fromField, SoType toField)
Returns the field conversion engine registered for the two given field types.
static const std::vector< SbString > & getUnloadedPlugins()
Returns the list of plugins that failed to load (file names).
void SoDBHeaderCB(void *userData, SoInput *in)
static SbBool read(SoInput *in, SoNode *&rootNode)
Reads a graph from the file specified by the given SoInput, returning the resulting root node in root...
static bool removePluginsDirectory(const SbString &dirName)
Remove directory from the list of search directories for plugin loading.
static void setRealTimeInterval(const SbTime &deltaT)
The database automatically creates one global field when SoDB::init() is called.
static int getNumHeaders()
Returns the number of valid headers, including standard Open Inventor headers, and user-registered he...
static SoDEPRECATED SbBool isMultiThread()
Returns whether multi-thread support is enabled in Open Inventor.
static void addConverter(SoType fromField, SoType toField, SoType converterEngine)
Registers a field conversion engine that can be used to convert from one type of field to another.
static bool removePlugin(const SbString &fileName)
Unloads the specified plugin library.
static SoDEPRECATED void setRenderCacheMode(RenderCacheMode mode)
Since Open Inventor 10.3, this method has no effect because render caches are automatically managed...
static void readlock()
Acquire a non-exclusive global scene graph read-lock.
static void readunlock()
Release a non-exclusive global scene graph read-lock.
static SbString getHeaderString(int i)
Returns the i'th header.
static SoDEPRECATED void setNumRenderCaches(int)
Since Open Inventor 10.3, this method has no effect because render caches are automatically managed...
static const std::vector< SbString > & getPluginsDirectories()
Returns the list of search directories for plugin loading.
static void writeunlock()
Release the global scene graph write-lock.
static void setIvTuneAllowed(SbBool ivTuneAllowed)
Specifies if launching IvTune interactively using the keyboard shortcut is allowed.
static SoDEPRECATED int getNumRenderCaches()
See method setNumRenderCaches().
static SoDEPRECATED RenderCacheMode getRenderCacheMode()
See setRenderCacheMode().
static bool addPluginsDirectory(const SbString &dirName)
Adds a directory to search for libraries defining new Open Inventor plugins.
static void writelock()
Acquire the global scene graph write-lock.
static void setSystemTimer(SoSystemTimer *timer)
The system dependent timer allows Inventor to manage its sensor queue (for timers,...
static const SbTime & getDelaySensorTimeout()
Returns the current delay queue timeout value.
static SoField * getGlobalField(const SbName &name)
Returns the global field with the given name, or NULL if there is none.
static SoSeparator * readAll(SoInput *in)
Reads all graphs and paths from the file specified by the given SoInput.
static bool addPlugin(const SbString &fileName)
Loads a plugin library.
static SbBool registerHeader(const SbString &headerString, SbBool isBinary, float ivVersion, SoDBHeaderCB *preCB, SoDBHeaderCB *postCB, void *userData=NULL)
Registers the given string as a valid header for input files.
static SbTime getCurrentTime()
Returns the current time.
static const SbTime & getRealTimeInterval()
Returns how often the database is updating the realTime global field.
RenderCacheMode
Render cache modes.
@ AUTO_RENDER_CACHE
Automatically choose mode depending on the hardware.
@ COMPILE_AND_EXECUTE
Display lists are created with COMPILE_AND_EXECUTE mode.
@ COMPILE
Display lists are created with COMPILE mode.
static void removeConverter(SoType fromField, SoType toField)
Remove a previously added converter.
static void init()
Initializes the database.
static SbBool getIvTuneAllowed()
Returns TRUE if IvTune can be launched interactively using the keyboard shortcut.
static SbBool getHeaderData(const SbString &string, SbBool &isBinary, float &ivVersion, SoDBHeaderCB *&preCB, SoDBHeaderCB *&postCB, void *&userData, SbBool substringOK=FALSE)
Passes back the data registered with the given header string, including the flag specifying whether t...
Base class for all fields.
Base class for all group nodes.
Class used to check and report library and application consistency.
Abstract base class for all database nodes.
Path that points to a list of hierarchical nodes.
Abstract base class for Open Inventor sensors.
Group node that saves and restores traversal state.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Common interface...
Sensor that triggers repeatedly at regular intervals.
Stores runtime type information.