H3D::Scene Class Reference
[X3D node classes.]

The Scene node is topmost node that takes care of the rendering of the scene graph both haptically and graphically. More...

#include <H3D/Scene.h>

Inheritance diagram for H3D::Scene:

Inheritance graph

List of all members.

Classes

class  EventSink
 The EventSink class makes all fields up-to-date what are routed to it, with the exception of PeriodicUpdateFields. More...

Public Types

enum  CallbackCode { CALLBACK_DONE, CALLBACK_CONTINUE }
 Return code for callback functions. More...
typedef CallbackCode(* CallbackFunc )(void *data)
 Callback function type.

Public Member Functions

 Scene (Inst< SFChildNode > _sceneRoot=0, Inst< MFWindow > _window=0, Inst< SFFloat > _frameRate=0)
 Constructor.
 ~Scene ()
 Destructor.
TraverseInfogetLastTraverseInfo ()
 Returns the TraverseInfo from the previous sceneRoot traversal.
void setActive (bool _active)
 Set whether this Scene instance should be active or not.
bool isActive ()
 Returns if the Scene instance is active or not.
virtual void idle ()
 This function will be called by the event loop when there are no other events to process and the Scene is active.

Static Public Member Functions

static void mainLoop ()
 Static function that is called to start the main event loop.
static void replaceWorld (AutoRef< Node > new_world, X3DViewpointNode *new_vp)
 Static function to replace a scene with another scene.

Public Attributes

auto_ptr< SFChildNodesceneRoot
 The scene graph to render in this scene.
auto_ptr< MFWindowwindow
 The windows to render into this scene.
auto_ptr< SFFloatframeRate
 The instantaneous frame rate of the scene.

Static Public Attributes

static auto_ptr< SFTimetime
 Current time within the simulation, updated during each graphic loop.
static set< Scene * > scenes
 All instances of Scene that has been created.
static H3DNodeDatabase database
 The H3DNodeDatabase for this node.


Detailed Description

The Scene node is topmost node that takes care of the rendering of the scene graph both haptically and graphically.

Scene::mainLoop() can be called to start the main event loop, e.g. start the haptic and graphical rendering. Before this function is called at least one instance of Scene must have created and be active.


Member Enumeration Documentation

Return code for callback functions.

Enumerator:
CALLBACK_DONE  The callback is done and should not be called any more.
CALLBACK_CONTINUE  The callback should be rescheduled and called the next loop again.


Member Function Documentation

void Scene::idle (  )  [virtual]

void Scene::mainLoop (  )  [static]

Static function that is called to start the main event loop.

Before this function is called at least one instance of Scene must have created and be active.

References H3D::GLUTWindow::initGLUT().

void H3D::Scene::setActive ( bool  _active  )  [inline]

Set whether this Scene instance should be active or not.

If a Scene is not active it will not be rendered at all.


Member Data Documentation

The instantaneous frame rate of the scene.

Access type: outputOnly

Referenced by idle(), and Scene().

The scene graph to render in this scene.

Access type: inputOutput

Referenced by idle().

auto_ptr< SFTime > Scene::time [static]

The windows to render into this scene.

Access type: inputOutput

Referenced by idle().


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

Generated on Fri Nov 7 10:30:50 2008 for H3D API by  doxygen 1.5.7