H3D API
2.4.1
|
GlobalSettings is a X3DBindableNode that specifies default settings for use in H3D API, such as caching options, haptic rendering options etc. More...
#include <H3D/GlobalSettings.h>
Public Member Functions | |
GlobalSettings (Inst< SFSetBind > _set_bind=0, Inst< SFNode > _metadata=0, Inst< SFTime > _bindTime=0, Inst< SFBool > _isBound=0, Inst< MFOptionNode > _options=0, Inst< SFBool > _x3dROUTESendsEvent=0, Inst< SFBool > _loadTexturesInThread=0, Inst< SFString > _renderMode=0, Inst< SFBool > _multiThreadedPython=0) | |
Construtor. | |
~GlobalSettings () | |
Destructor. | |
template<class OptionNodeType > | |
void | getOptionNode (OptionNodeType *&option) |
Get the first option node of the type of the pointer given as argument. More... | |
bool | optionNodesUpdated () |
check whether option nodes has updated since last scene graph loop | |
![]() | |
X3DBindableNode (const string &_bindable_stack_name, Inst< SFSetBind > _set_bind=0, Inst< SFNode > _metadata=0, Inst< SFTime > _bindTime=0, Inst< SFBool > _isBound=0) | |
Constructor. | |
virtual | ~X3DBindableNode () |
Destructor. | |
virtual void | initialize () |
Initialize this bindable stack, toStackTop is done. | |
virtual void | toStackTop () |
Move this instance to the stack top. | |
virtual void | removeFromStack () |
Remove the bindable node from the stack. | |
bool | isStackTop () |
Is this node at the top of the stack. | |
![]() | |
X3DChildNode (Inst< SFNode > _metadata=0) | |
Constructor. | |
![]() | |
X3DNode (Inst< SFNode > _metadata=0) | |
Constructor. | |
X3DMetadataObject * | getMetadataByName (const string &_name) |
Given a name, the first X3DMetadataObject in the metadata field that matches that name is returned. More... | |
![]() | |
Node () | |
Constructor. | |
virtual Node * | clone (bool deepCopy=true, DeepCopyMap *deepCopyMap=NULL) |
Returns a new instance of this node type with the same state as this one. More... | |
virtual | ~Node () |
Destructor. | |
X3DPrototypeInstance * | getProtoInstanceParent () |
If this node is the root node in the proto body of a X3DPrototypeInstance then this will return that node. More... | |
void | setProtoInstanceParent (X3DPrototypeInstance *p) |
Set the X3DPrototypeInstance this node is the the root node if applicaple. | |
virtual void | render () |
the render() function is used for the depth-first rendering traversal of the scene-graph. More... | |
virtual void | traverseSG (TraverseInfo &ti) |
traverseSG is called once per scenegraph loop on the scene in order to traverse the scenegraph. More... | |
virtual bool | lineIntersect (const Vec3f &from, const Vec3f &to, LineIntersectResult &result) |
Detect intersection between a line segment and the Node. More... | |
virtual void | closestPoint (const Vec3f &p, NodeIntersectResult &result) |
Find closest point on Node to p. More... | |
virtual bool | movingSphereIntersect (H3DFloat radius, const Vec3f &from, const Vec3f &to, NodeIntersectResult &result) |
Detect collision between a moving sphere and the Node. More... | |
virtual string | defaultXMLContainerField () |
Returns the default xml containerField attribute value. More... | |
virtual Field * | getField (const string &_name) const |
return a pointer to the field specified by name within this instance | |
int | addDestructCallback (void(*func)(Node *, void *), void *args) |
Add a callback function to be run on destruction of node. More... | |
int | removeDestructCallback (void(*func)(Node *, void *), void *args) |
Add a callback function to be run on destruction of node. More... | |
Static Public Member Functions | |
static GlobalSettings * | getActive () |
Convenience function to get the top of the DeviceInfo stack. | |
![]() | |
static X3DBindableNode * | getActive (const string &bindable_stack_name) |
Returns the active bindable instance, i.e. More... | |
static const StackType & | getStack (const string &bindable_stack_name) |
Get the stack for a given name. | |
static const StackMapType & | getStackMap () |
Return the map of all bindable nodes available. | |
![]() | |
static unsigned int | nrNodesAlive () |
Returns the nr of nodes currently alive, i.e. nodes created but not destructed. | |
static int | nrNodesCreated () |
Returns the number of nodes created in total since the start of the program. | |
Public Attributes | |
H3DUniquePtr< MFOptionNode > | options |
Contains the H3DOptionNode to be use as default settings. More... | |
H3DUniquePtr< SFBool > | x3dROUTESendsEvent |
According to the X3D specification the ROUTE statement in an X3D file is not supposed to send an event. More... | |
H3DUniquePtr< SFBool > | loadTexturesInThread |
Controls if the downloading/reading of texture image data from file should be done in a separate thread or in the main thread. More... | |
H3DUniquePtr< SFString > | renderMode |
Controls the render mode of all geometries in the scene. More... | |
H3DUniquePtr< SFBool > | multiThreadedPython |
If true then the embedded Python interpreter is initialized to support multi-threaded use of the Python C API by calling PyEval_InitThreads(). More... | |
![]() | |
H3DUniquePtr< SFSetBind > | set_bind |
Input field to bind or unbind the node. More... | |
H3DUniquePtr< SFTime > | bindTime |
The bindTime field is the time at which the Viewpoint node is bound or unbound. More... | |
H3DUniquePtr< SFBool > | isBound |
Output field telling if this node is bound or not. More... | |
![]() | |
H3DUniquePtr< SFNode > | metadata |
Meta data about the node. More... | |
Static Public Attributes | |
static H3DNodeDatabase | database |
The H3DNodeDatabase for this node. | |
static bool | default_x3d_route_sends_event = true |
The default value for the x3dROUTESendsEvent field. | |
![]() | |
static H3DNodeDatabase | database |
The H3DNodedatabase for this node. | |
![]() | |
static H3DNodeDatabase | database |
The H3DNodeDatabase for this node. | |
Additional Inherited Members | |
![]() | |
typedef std::map< Node *, Node * > | DeepCopyMap |
A map type used during a deep copy clone() to map from original nodes to cloned nodes. | |
![]() | |
void | cloneFieldValue (Field &_from, Field &_to, bool deepCopy, DeepCopyMap &deepCopyMap) |
A helper function for the clone() method. More... | |
![]() | |
static Node * | getClonedInstance (Node *original, bool deepCopy, DeepCopyMap &deepCopyMap) |
A helper function for nodes that implement clone() More... | |
![]() | |
static StackMapType | stack |
The bindable stack. | |
GlobalSettings is a X3DBindableNode that specifies default settings for use in H3D API, such as caching options, haptic rendering options etc.
According to the X3D specification the ROUTE statement in an X3D file is not supposed to send an event. H3D has always done this by default up until 2.2 though. The x3dROUTESendsEvent lets you control if an event should be sent or not.
The loadTexturesInThread controls if the downloading/reading of texture image data from file should be done in a separate thread or in the main thread. The result for doing it in separate thread is that the main program can start up faster and the textures will be applied later when they are loaded versus having to wait for all textures to be read before program starts.
Controls the render mode of all geometries in the scene. The possible values are:
"DEFAULT" | Render as X3D scene nodes say. |
"FILLED" | Draw filled polygons always. |
"WIREFRAME" | Draw wireframe polygons always. |
"POINTS" | Draw points at vertices for polygons always. |
For a way to set fill mode per object see the X3D node FillProperties.
Access type: inputOutput
Default value: "DEFAULT"
The options field contains H3DOptionNode instances for various options.
Examples:
|
inline |
Get the first option node of the type of the pointer given as argument.
The option argument will contain the node afterwards, or NULL if no option of that type exists.
Referenced by H3D::H3DDisplayListObject::DisplayList::cachingDelay(), H3D::X3DGeometryNode::DisplayList::cachingDelay(), H3D::X3DTexture2DNode::glTexImage(), H3D::X3DTexture3DNode::glTexImage(), H3D::Scene::idle(), H3D::H3DDisplayListObject::DisplayList::initGraphicOption(), H3D::Capsule::render(), H3D::Cylinder::render(), H3D::ElevationGrid::render(), H3D::FrameBufferTextureGenerator::render(), H3D::FullscreenRectangle::render(), H3D::IndexedLineSet::render(), H3D::IndexedTriangleFanSet::render(), H3D::IndexedTriangleSet::render(), H3D::IndexedTriangleStripSet::render(), H3D::LineSet::render(), H3D::PointSet::render(), H3D::Polyline2D::render(), H3D::Polypoint2D::render(), H3D::Sphere::render(), H3D::SuperShape::render(), H3D::TriangleSet::render(), H3D::TriangleSet2D::render(), H3D::TriangleStripSet::render(), H3D::H3DWindowNode::render(), H3D::H3DHapticsDevice::renderEffects(), H3D::Sphere::traverseSG(), H3D::ShadowGeometry::update(), H3D::X3DPointingDeviceSensorNode::updateX3DPointingDeviceSensors(), H3D::ImageTexture::useSharing(), H3D::H3DDisplayListObject::DisplayList::usingCaching(), H3D::X3DGeometryNode::DisplayList::usingCaching(), and H3D::H3DDisplayListObject::DisplayList::usingFrustumCulling().
H3DUniquePtr< SFBool > H3D::GlobalSettings::loadTexturesInThread |
Controls if the downloading/reading of texture image data from file should be done in a separate thread or in the main thread.
The result for doing it in separate thread is that the main program can start up faster and the textures will be applied later when they are loaded versus having to wait for all textures to be read before program starts.
Access type: inputOutput
Default value: X3DTextureNode::load_images_in_separate_thread (in H3DLoad and H3DViewer this is true)
Referenced by GlobalSettings(), H3D::Image3DTexture::SFImage::update(), and H3D::ImageTexture::SFImage::update().
H3DUniquePtr< SFBool > H3D::GlobalSettings::multiThreadedPython |
If true then the embedded Python interpreter is initialized to support multi-threaded use of the Python C API by calling PyEval_InitThreads().
This is not required to use threads created in a Python script, but is required if threads other than the main thread, not created by Python, will call the Python C API.
There is a small overhead if enabled, and this option should be disabled for most applications.
This field has no effect if modified after a PythonScript node instance has been created.
Access type: inputOutput
Default value: false
Referenced by GlobalSettings().
H3DUniquePtr< MFOptionNode > H3D::GlobalSettings::options |
Contains the H3DOptionNode to be use as default settings.
If several nodes of the same type exist the first one will be used.
Access type: inputOutput
Referenced by GlobalSettings().
H3DUniquePtr< SFString > H3D::GlobalSettings::renderMode |
Controls the render mode of all geometries in the scene.
The possible values are:
"DEFAULT" | Render as X3D scene nodes say. |
"FILLED" | Draw filled polygons always. |
"WIREFRAME" | Draw wireframe polygons always. |
"POINTS" | Draw points at vertices for polygons always. |
For a way to set fill mode per object see the X3D node FillProperties.
Access type: inputOutput
Default value: "DEFAULT"
Referenced by GlobalSettings(), H3D::X3DShapeNode::render(), and H3D::X3DShapeNode::traverseSG().
H3DUniquePtr< SFBool > H3D::GlobalSettings::x3dROUTESendsEvent |
According to the X3D specification the ROUTE statement in an X3D file is not supposed to send an event.
H3D has always done this by default up until 2.2 though. This field lets you control if an event should be sent or not. The default value is the value of GlobalSettings::default_x3d_route_sends_event.
Access type: inputOutput
Default value: GlobalSettings::default_x3d_route_sends_event (in H3DLoad and H3DViewer this is false)
Referenced by GlobalSettings().