H3D API  2.4.1
Static Public Member Functions | List of all members
H3D::PyNode Class Reference

Python C Type wrapper around Node*. More...

#include <H3D/PythonTypes.h>

Inheritance diagram for H3D::PyNode:
Inheritance graph

Static Public Member Functions

static PyObject * create ()
 create() a new instance of PyNode using Python to allocate the memory and initialise the PyObject headers - to be called by PythonScript's internals.
 
static void dealloc (PyNode *self)
 Python type deallocation.
 
static int init (PyNode *self, PyObject *args, PyObject *kwds)
 Python type initialisation: will set the Node value from a python string argument list.
 
static PyObject * repr (PyNode *myself, PyObject *args)
 Converts a PyNode to a char* string.
 
static int compare (PyObject *veca, PyObject *vecb)
 Test if two PyNode are equal or not. More...
 
static PyObject * getField (PyObject *myself, char *arg)
 Get the field of a node. arg is the name of the field.
 
static PyObject * getAttr (PyObject *myself, char *arg)
 If myself encapsulates a node that is not a PythonScript node it works just as getField. More...
 
static PyObject * getFieldList (PyObject *myself, PyObject *args)
 Get the list of fields available in this Node.
 
static PyObject * getName (PyObject *myself, PyObject *args)
 Get the name of this node.
 
static PyObject * getTypeName (PyObject *myself, PyObject *args)
 Get the type name of this node, i.e. "Group".
 
static PyObject * setName (PyObject *self, PyObject *args)
 Set the name of this node.
 
static PyObject * getSingleField (PyObject *self, PyObject *args)
 Get a field from the node database.
 
static PyObject * addField (PyObject *self, PyObject *args)
 If this Node is a DynamicFieldsObject a new field is added.
 
static PyObject * removeField (PyObject *self, PyObject *args)
 If this Node is a DynamicFieldsObject then the specified field is removed.
 
static PyObject * clearFields (PyObject *self, PyObject *args)
 If this Node is a DynamicFieldsObject then all dynamic fields are removed.
 
static PyObject * clone (PyObject *self, PyObject *args)
 Create a clone of the node.
 
static PyObject * closestPoint (PyObject *self, PyObject *args)
 Calculate the closest point to the node.
 
static PyObject * lineIntersect (PyObject *self, PyObject *args)
 Calculate a line intersection with the node.
 

Detailed Description

Python C Type wrapper around Node*.

Member Function Documentation

◆ compare()

int H3D::PyNode::compare ( PyObject *  veca,
PyObject *  vecb 
)
static

Test if two PyNode are equal or not.

They are equal if they contain the same node pointer.

References H3D_FULL_LOCATION, H3D::PyNode_AsNode(), and H3D::PyNode_Check().

◆ getAttr()

PyObject * H3D::PyNode::getAttr ( PyObject *  myself,
char *  arg 
)
static

If myself encapsulates a node that is not a PythonScript node it works just as getField.

If a PythonScript node it will first check the name against the global attributes of the script/module in the PythonScript node and return that if it exists. If it does not it will also work as getField.

References getField(), and H3D::PythonScript::getPythonAttribute().


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