| | |
- MFNode(_MFNode, Field)
-
- MFRoute
- Node(object)
-
- ROUTE
-
- IS
- SFNode(_SFNode, Field)
-
- SFRoute
class IS(ROUTE) |
| |
An is-mapping for a field/event
Functionally, an instantiated IS is just a
multi-directional ROUTE (that is, it's a route
to and from a given field on the base node to
the sub-nodes. |
| |
- Method resolution order:
- IS
- ROUTE
- Node
- object
Methods defined here:
- bind(self)
- Bind the in and out routes for the IS mapping
- forward(self, signal, sender, event=None, value=None, **arguments)
- Forward a value update to our destination (or source)
Data and other attributes defined here:
- PROTO = 'IS'
Methods inherited from ROUTE:
- __init__(self, *arguments, **named)
- Initialize the route object
Calls bind() after normal node.Node
argument processing.
- __str__(self)
- Get a friendly representation of the Node
- copy(self, copier)
- Copy the route for the copier object
Data descriptors inherited from ROUTE:
- destination
- exposedField SFNode SFNode <bound method SFNode
- destinationField
- exposedField SFString destinationField
- source
- exposedField SFNode SFNode <bound method SFNode
- sourceField
- exposedField SFString sourceField
Methods inherited from Node:
- __repr__(self)
- Get a code-like representation of the Node
Basically every attribute except for sub-nodes values
are returned as a full representation.
- toString(self, **namedargs)
- Generate a VRML 97-syntax string representing this Prototype
**namedargs -- key:value
passed arguments for the linearisation object
see lineariser4.Lineariser
Data descriptors inherited from Node:
- DEF
- exposedField SFString DEF
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- externalURL
- exposedField MFString externalURL []
- rootSceneGraph
- exposedField RootScenegraphNode SFNode NULL
|
class MFRoute(MFNode) |
| |
Multiple-value-field ROUTEs |
| |
- Method resolution order:
- MFRoute
- MFNode
- _MFNode
- Field
- BaseField
- object
Data descriptors defined here:
- baseSFNode
- exposedField SFRoute SFNode <bound method SFRout
Methods inherited from _MFNode:
- coerce(self, value)
- Coerce value to an MFNode list-of-objects
- copyValue(self, value, copier=None)
- Copy a value for copier
- fset(self, client, value, notify=1)
- Set the client's value for this property
notify -- if true send a notification event
The MFNode tries to update the value's root
attribute to point to the root of the client
*iff* the value doesn't currently point at
a valid root. (That is, it only updates root
if there is no current root). This is done
without sending notify events.
- vrmlstr(self, value, lineariser)
- Convert the given value to a VRML97 representation
Data descriptors inherited from _MFNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from _MFNode:
- baseObjectType = <class 'vrml.olist.OList'>
- List sub-class which generates pydispatch events on changes
Generates 4 types of events:
* NEW_CHILD_EVT, from self, with value=child, for each added child
* NEW_PARENT_EVT, from child, with parent=self, for each added child
* DEL_CHILD_EVT, from self, with value=child, for each removed child
* DEL_PARENT_EVT, from child, with parent=self, for each removed child
Note that the OList semantics are a little loose currently, as
it sometimes acts as though adding a new duplicate child is not
an event and sometimes acts as though it is. This doesn't cause
problems for the OpenGLContext scenegraph.
The OList is intended for situations where slow-write-fast-read
is the primary requirement, it allows you to hook writing events
in order to recalculate/cache values.
- defaultDefault = <class 'vrml.olist.OList'>
- List sub-class which generates pydispatch events on changes
Generates 4 types of events:
* NEW_CHILD_EVT, from self, with value=child, for each added child
* NEW_PARENT_EVT, from child, with parent=self, for each added child
* DEL_CHILD_EVT, from self, with value=child, for each removed child
* DEL_PARENT_EVT, from child, with parent=self, for each removed child
Note that the OList semantics are a little loose currently, as
it sometimes acts as though adding a new duplicate child is not
an event and sometimes acts as though it is. This doesn't cause
problems for the OpenGLContext scenegraph.
The OList is intended for situations where slow-write-fast-read
is the primary requirement, it allows you to hook writing events
in order to recalculate/cache values.
- nodes = 1
Methods inherited from Field:
- __init__(self, name, exposure=1, default=[])
- Initialise the field object
name -- string name
exposure -- boolean (0/1) indicating whether this is an exposed field
default -- default value for the field
- __str__(self)
- Get a human-friendly representation of the field
- copy(self, client=None, copier=None)
- Copy this property's value/definition for client node/proto
if client is a prototype, copy this field definition
for use in a new prototype.
if client is a node, and it has a set value for this
field, then returns copyValue( currentValue )
otherwise returns _NULL, a singleton object which
shouldn't turn up anywhere else.
- fhas(self, client)
- Determine whether the client currently has a non-default value
- fieldVrmlstr(self, lineariser)
- Write the field's definition to the lineariser
Basically this gives you a VRML97 fragment
which can be used for creating a PROTO which
will have the equivalent of this field available.
- typeName(self)
- Get the typeName of this field
- watch(self, node, receiver, signal=_Any)
- Make receiver receive all update events for this field+node
receiver( signal, sender, value=None )
signal -- ('del',self), ('set',self) etc...
sender -- node
value -- new value set (for set values)
Methods inherited from BaseField:
- __del__(...)
- Delete our value from client's dictionary (notifies)
- __delete__(...)
- descr.__delete__(obj)
- __get__(...)
- descr.__get__(obj[, type]) -> value
- __set__(...)
- descr.__set__(obj, value)
- check(...)
- Raise ValueError if isn't correct type
- fdel(...)
- Delete with option to notify
- fget = __get__(...)
- descr.__get__(obj[, type]) -> value
- getDefault(...)
- Get the default value of this field
if client, set client's attribute to default
without sending a notification event.
Data descriptors inherited from BaseField:
- call_default
- defaultobj
- name
Data and other attributes inherited from BaseField:
- __new__ = <built-in method __new__ of type object at 0x7f8ea99534e0>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
- __pyx_vtable__ = <PyCObject object at 0x3084e68>
|
class ROUTE(Node) |
| |
Representation and implementation of a VRML97 ROUTE
This implementation uses the dispatcher module to create
an approximation of the VRML97 event model. It allows nodes
to forward events via the ROUTE objects, and watches for
event cycles. |
| |
- Method resolution order:
- ROUTE
- Node
- object
Methods defined here:
- __init__(self, *arguments, **named)
- Initialize the route object
Calls bind() after normal node.Node
argument processing.
- __str__(self)
- Get a friendly representation of the Node
- bind(self)
- Bind this ROUTE node's source to destination
Should also setup notification for changes to our
values to cause changes to the ROUTING table in
dispatcher.
- copy(self, copier)
- Copy the route for the copier object
- forward(self, signal, sender, event=None, value=None, **arguments)
- Forward a value update to our destination
Data descriptors defined here:
- destination
- exposedField SFNode SFNode <bound method SFNode
- destinationField
- exposedField SFString destinationField
- source
- exposedField SFNode SFNode <bound method SFNode
- sourceField
- exposedField SFString sourceField
Data and other attributes defined here:
- PROTO = 'ROUTE'
Methods inherited from Node:
- __repr__(self)
- Get a code-like representation of the Node
Basically every attribute except for sub-nodes values
are returned as a full representation.
- toString(self, **namedargs)
- Generate a VRML 97-syntax string representing this Prototype
**namedargs -- key:value
passed arguments for the linearisation object
see lineariser4.Lineariser
Data descriptors inherited from Node:
- DEF
- exposedField SFString DEF
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- externalURL
- exposedField MFString externalURL []
- rootSceneGraph
- exposedField RootScenegraphNode SFNode NULL
|
class SFRoute(SFNode) |
| |
Single-field ROUTE value |
| |
- Method resolution order:
- SFRoute
- SFNode
- _SFNode
- Field
- BaseField
- object
Data and other attributes defined here:
- requiredTypes = (<class 'vrml.route.ROUTE'>,)
Methods inherited from _SFNode:
- coerce(self, value)
- Coerce value to an SFNode reference
- defaultDefault(self)
- Default SFNode value
- fset(self, client, value, notify=1)
- Set the client's value for this property
notify -- if true send a notification event
The SFNode tries to update the value's root
attribute to point to the root of the client
*iff* the value doesn't currently point at
a valid root. (That is, it only updates root
if there is no current root). This is done
without sending notify events.
- vrmlstr(self, value, lineariser)
- Convert the given value to a VRML97 representation
Data descriptors inherited from _SFNode:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from _SFNode:
- allowNULL = 1
- name = 'SFNode'
- nodes = 1
Methods inherited from Field:
- __init__(self, name, exposure=1, default=[])
- Initialise the field object
name -- string name
exposure -- boolean (0/1) indicating whether this is an exposed field
default -- default value for the field
- __str__(self)
- Get a human-friendly representation of the field
- copy(self, client=None, copier=None)
- Copy this property's value/definition for client node/proto
if client is a prototype, copy this field definition
for use in a new prototype.
if client is a node, and it has a set value for this
field, then returns copyValue( currentValue )
otherwise returns _NULL, a singleton object which
shouldn't turn up anywhere else.
- copyValue(self, value, copier=None)
- Copy a value for copier
- fhas(self, client)
- Determine whether the client currently has a non-default value
- fieldVrmlstr(self, lineariser)
- Write the field's definition to the lineariser
Basically this gives you a VRML97 fragment
which can be used for creating a PROTO which
will have the equivalent of this field available.
- typeName(self)
- Get the typeName of this field
- watch(self, node, receiver, signal=_Any)
- Make receiver receive all update events for this field+node
receiver( signal, sender, value=None )
signal -- ('del',self), ('set',self) etc...
sender -- node
value -- new value set (for set values)
Methods inherited from BaseField:
- __del__(...)
- Delete our value from client's dictionary (notifies)
- __delete__(...)
- descr.__delete__(obj)
- __get__(...)
- descr.__get__(obj[, type]) -> value
- __set__(...)
- descr.__set__(obj, value)
- check(...)
- Raise ValueError if isn't correct type
- fdel(...)
- Delete with option to notify
- fget = __get__(...)
- descr.__get__(obj[, type]) -> value
- getDefault(...)
- Get the default value of this field
if client, set client's attribute to default
without sending a notification event.
Data descriptors inherited from BaseField:
- call_default
- defaultobj
Data and other attributes inherited from BaseField:
- __new__ = <built-in method __new__ of type object at 0x7f8ea99534e0>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
- __pyx_vtable__ = <PyCObject object at 0x3084e68>
| |