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

Interface to the dynamic Python library for executing script code as part of the API. More...

#include <H3D/PythonScript.h>

Inheritance diagram for H3D::PythonScript:

Inheritance graph

List of all members.

Public Member Functions

 PythonScript (Inst< MFString > _url=0, Inst< MFNode > _references=0, Inst< SFString > _moduleName=0)
 Constructor.
virtual FieldgetField (const string &name)
 return a pointer to the field specified by name within this instance
 ~PythonScript ()
 Destructor.
virtual FieldlookupField (const string &name)
 lookupField() returns the field pointer to the field with the specified string field name, used when creating nodes via the H3DNodeDatabase service.
virtual void traverseSG (TraverseInfo &ti)
 Traverse the scenegraph.
virtual void initialize ()
 Initialize is called once upon the first reference of the RefCountedClass.

Public Attributes

auto_ptr< MFNodereferences
 Through this field one can pass references to Nodes in the scene graph that can then be access through the 'references' variable in the Python script.
auto_ptr< SFStringmoduleName
 Specify a specific moduleName for the pythonscript.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.


Detailed Description

Interface to the dynamic Python library for executing script code as part of the API.

Member Function Documentation

void PythonScript::initialize (  )  [virtual]

Field * PythonScript::lookupField ( const string &  name  )  [virtual]

lookupField() returns the field pointer to the field with the specified string field name, used when creating nodes via the H3DNodeDatabase service.

Implements H3D::H3DScriptNode.

void PythonScript::traverseSG ( TraverseInfo ti  )  [virtual]

Traverse the scenegraph.

Used in PythonScript to call a function in python once per scene graph loop.

Parameters:
ti The TraverseInfo object containing information about the traversal.

Reimplemented from H3D::Node.


Member Data Documentation

Specify a specific moduleName for the pythonscript.

This name should be unique among all PythonScript nodes in the scene. It should also differ from previously existing python modules. If this field is empty the DEF-name of the PythonScript will be used. An automatically generated name will be used if moduleName is empty and the node does not have a DEF name.

Referenced by initialize().

Through this field one can pass references to Nodes in the scene graph that can then be access through the 'references' variable in the Python script.


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

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