vrml.vrml97.scenegraph
Scenegraph node-like "prototype" for VRML97
Classes
A VRML 97 sceneGraph
Attributes:
__gi__ -- constant string "sceneGraph"
DEF -- constant string ""
children -- Node list
List of the root children of the sceneGraph, nodes/scripts only
routes -- ROUTE list
List of the routes within the sceneGraph
defNames -- string DEFName: Node node
Mapping of DEF names to their respective nodes
protoTypes -- Namespace prototypes
Namespace (with chaining lookup) collection of prototypes
getattr( sceneGraph.protoTypes, 'nodeGI' ) retrieves a prototype
baseURI
exposedField SFString baseURI
children
exposedField MFNode children <class 'vrml.olist.O
routes
exposedField MFRoute routes <class 'vrml.olist.O
__init__(
self
,
root
= None
,
protoTypes
= None
,
routes
= None
,
defNames
= None
,
children
= None
,
*
args
,
**
namedargs
)
root -- sceneGraph root or Dictionary root or Module root or None
Base object for root of protoType namespace hierarchy
protoTypes -- string nodeGI: Prototype PROTO
Dictionary of prototype definitions
routes -- ROUTE list or (string sourcenode, string sourceeventOut, string destinationnode, string destinationeventOut) list
List of route objects or tuples to be added to the sceneGraph
see attribute routes
defNames -- string DEFName: Node node
see attribute defNames
children -- Node list
see attribute children
addRoute(
self
,
route
,
*
args
)
Add a route to the scenegraph
route,args -- Possible forms:
ROUTE object -- added to routes
((source)node,field,(destination)node,field) -- ROUTE
created, nodes may be strings, in which case
getDEF( node ) is called for each
((source)node,field,target( signal, sender, value )) --
field.watch( target ) is called for the source
node (which can be a DEF name).