| |
- object
-
- _MatrixHolder
- _NodePath
-
- NodePath(_NodePath, NodePath)
- WeakNodePath(_NodePath, WeakNodePath)
class NodePath(_NodePath, NodePath) |
|
Strong-reference version of VRML97 NodePath |
|
- Method resolution order:
- NodePath
- _NodePath
- NodePath
- list
- object
Methods inherited from _NodePath:
- __add__(self, other)
- Add parent-matrix pre-caching support to nodepaths
- invalidate(self)
- Set this path to be invalid (and all children paths)
- isTransform(self, item)
- Customization Point: determine whether a node is a Transform
- iterchildren(self)
- Iterate over child paths which are still live
- iterdescendents(self)
- Iterate over all descendent paths
- itransformMatrix(self)
- Manually generate an inverse transform matrix for this path
See transformMatrix for semantics
- transformChildren(self, reverse=0)
- Yield all transforming children
- transformMatrix(self, translate=True, scale=True, rotate=True, matrixHolder=False)
- Calculate (and cache) a transform matrix for this path
Calculates our transformMatrix from our parent's transform
and the set of nodes between our parent and ourself. Normally
that should be a *single* node or *none* in most cases.
translate -- if true, include translations in the matrix
scale -- if true, include scales in the matrix
rotate -- if true, include rotations in the matrix
Note: to apply these matrices to a particular coordinate,
you would do the following:
p = ones( 4 )
p[:3] = coordinate
return dot( p, matrix)
That is, you use the homogenous coordinate, and
make it the first item in the dot'ing.
Data descriptors inherited from _NodePath:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from _NodePath:
- active = True
- broken = False
- children = None
- parent = None
Methods inherited from NodePath:
- __eq__(self, other)
- Check whether we are equal to another path
- __getslice__(self, start, stop)
- Return a new path with our items from start to stop
- __repr__(self)
- Code-like representation of the node path
Note: this doesn't use super for determining
the base representation, as that might wind up
creating a name like:
WeakNodePath( WeakTuple( Node, Node,...))
- __str__(self)
- Simple representation of a node-path for human consumption
- common(self, other)
- Return the common root sub-path between ourselves and other
If there is no common sub-root, returns an empty path
Methods inherited from list:
- __contains__(...)
- x.__contains__(y) <==> y in x
- __delitem__(...)
- x.__delitem__(y) <==> del x[y]
- __delslice__(...)
- x.__delslice__(i, j) <==> del x[i:j]
Use of negative indices is not supported.
- __ge__(...)
- x.__ge__(y) <==> x>=y
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __getitem__(...)
- x.__getitem__(y) <==> x[y]
- __gt__(...)
- x.__gt__(y) <==> x>y
- __iadd__(...)
- x.__iadd__(y) <==> x+=y
- __imul__(...)
- x.__imul__(y) <==> x*=y
- __init__(...)
- x.__init__(...) initializes x; see x.__class__.__doc__ for signature
- __iter__(...)
- x.__iter__() <==> iter(x)
- __le__(...)
- x.__le__(y) <==> x<=y
- __len__(...)
- x.__len__() <==> len(x)
- __lt__(...)
- x.__lt__(y) <==> x<y
- __mul__(...)
- x.__mul__(n) <==> x*n
- __ne__(...)
- x.__ne__(y) <==> x!=y
- __reversed__(...)
- L.__reversed__() -- return a reverse iterator over the list
- __rmul__(...)
- x.__rmul__(n) <==> n*x
- __setitem__(...)
- x.__setitem__(i, y) <==> x[i]=y
- __setslice__(...)
- x.__setslice__(i, j, y) <==> x[i:j]=y
Use of negative indices is not supported.
- __sizeof__(...)
- L.__sizeof__() -- size of L in memory, in bytes
- append(...)
- L.append(object) -- append object to end
- count(...)
- L.count(value) -> integer -- return number of occurrences of value
- extend(...)
- L.extend(iterable) -- extend list by appending elements from the iterable
- index(...)
- L.index(value, [start, [stop]]) -> integer -- return first index of value.
Raises ValueError if the value is not present.
- insert(...)
- L.insert(index, object) -- insert object before index
- pop(...)
- L.pop([index]) -> item -- remove and return item at index (default last).
Raises IndexError if list is empty or index is out of range.
- remove(...)
- L.remove(value) -- remove first occurrence of value.
Raises ValueError if the value is not present.
- reverse(...)
- L.reverse() -- reverse *IN PLACE*
- sort(...)
- L.sort(cmp=None, key=None, reverse=False) -- stable sort *IN PLACE*;
cmp(x, y) -> -1, 0, 1
Data and other attributes inherited from list:
- __hash__ = None
- __new__ = <built-in method __new__ of type object at 0x8187c0>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class WeakNodePath(_NodePath, WeakNodePath) |
|
Weak-reference version of VRML97 NodePath |
|
- Method resolution order:
- WeakNodePath
- _NodePath
- WeakNodePath
- NodePath
- WeakList
- list
- object
Methods inherited from _NodePath:
- __add__(self, other)
- Add parent-matrix pre-caching support to nodepaths
- invalidate(self)
- Set this path to be invalid (and all children paths)
- isTransform(self, item)
- Customization Point: determine whether a node is a Transform
- iterchildren(self)
- Iterate over child paths which are still live
- iterdescendents(self)
- Iterate over all descendent paths
- itransformMatrix(self)
- Manually generate an inverse transform matrix for this path
See transformMatrix for semantics
- transformChildren(self, reverse=0)
- Yield all transforming children
- transformMatrix(self, translate=True, scale=True, rotate=True, matrixHolder=False)
- Calculate (and cache) a transform matrix for this path
Calculates our transformMatrix from our parent's transform
and the set of nodes between our parent and ourself. Normally
that should be a *single* node or *none* in most cases.
translate -- if true, include translations in the matrix
scale -- if true, include scales in the matrix
rotate -- if true, include rotations in the matrix
Note: to apply these matrices to a particular coordinate,
you would do the following:
p = ones( 4 )
p[:3] = coordinate
return dot( p, matrix)
That is, you use the homogenous coordinate, and
make it the first item in the dot'ing.
Data descriptors inherited from _NodePath:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from _NodePath:
- active = True
- broken = False
- children = None
- parent = None
Methods inherited from NodePath:
- __eq__(self, other)
- Check whether we are equal to another path
- __getslice__(self, start, stop)
- Return a new path with our items from start to stop
- __repr__(self)
- Code-like representation of the node path
Note: this doesn't use super for determining
the base representation, as that might wind up
creating a name like:
WeakNodePath( WeakTuple( Node, Node,...))
- __str__(self)
- Simple representation of a node-path for human consumption
- common(self, other)
- Return the common root sub-path between ourselves and other
If there is no common sub-root, returns an empty path
Methods inherited from WeakList:
- __contains__(self, item)
- Return boolean indicating whether the item is in the list
- __ge__(self, sequence)
- Compare the list to another (>=)
- __getitem__(self, index)
- Get the item at the given index
- __gt__(self, sequence)
- Compare the list to another (>)
- __iadd__ = extend(self, sequence)
- Extend this list with another sequence
- __init__(self, sequence=())
- Initialize the list, with an optional sequence of objects
The WeakList will store weak references to objects
within the sequence.
- __iter__(self)
- Iterate over the list, yielding strong references
- __le__(self, sequence)
- Compare the list to another (<=)
- __lt__(self, sequence)
- Compare the list to another (<)
- __ne__(self, sequence)
- Compare the list to another (!=)
- __setitem__(self, index, item)
- Set the item at the given index
- __setslice__(self, start, stop, sequence)
- Set a sequence of items from the start to the stop index
- append(self, item)
- Append a single item to the list
- count(self, item)
- Return integer count of instances of item in list
- extend(self, sequence)
- Extend this list with another sequence
- get(self)
- Get all items as a list of strong references
- index(self, item)
- Return integer index of item in list
- insert(self, index, item)
- Insert an item at the given index
- pop(self, index=-1)
- Pop an item from the list, removing it and returning it
- remove(self, item)
- Remove the given item from the list
- sort(self, function=None)
- Sort the list of objects
This sorts the objects referenced,
then rebuilds the list of references!
- unwrap(self, item)
- Unwrap an individual item
This is a fairly trivial operation at the moment,
it merely calls the item with no arguments and
returns the result.
- wrap(self, item)
- Wrap an individual item in a weak-reference
If the item is already a weak reference, we store
a reference to the original item. We use approximately
the same weak reference callback mechanism as the
standard weakref.WeakKeyDictionary object.
Methods inherited from list:
- __delitem__(...)
- x.__delitem__(y) <==> del x[y]
- __delslice__(...)
- x.__delslice__(i, j) <==> del x[i:j]
Use of negative indices is not supported.
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __imul__(...)
- x.__imul__(y) <==> x*=y
- __len__(...)
- x.__len__() <==> len(x)
- __mul__(...)
- x.__mul__(n) <==> x*n
- __reversed__(...)
- L.__reversed__() -- return a reverse iterator over the list
- __rmul__(...)
- x.__rmul__(n) <==> n*x
- __sizeof__(...)
- L.__sizeof__() -- size of L in memory, in bytes
- reverse(...)
- L.reverse() -- reverse *IN PLACE*
Data and other attributes inherited from list:
- __hash__ = None
- __new__ = <built-in method __new__ of type object at 0x8187c0>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class _MatrixHolder(object) |
| |
Methods defined here:
- __init__(self, matrix)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class _NodePath(object) |
|
Path within a VRML97 scenegraph from root to particular node
Adds transformation-matrix calculation functions
based on the nodetypes.Transforming node's
attributes. |
|
Methods defined here:
- __add__(self, other)
- Add parent-matrix pre-caching support to nodepaths
- invalidate(self)
- Set this path to be invalid (and all children paths)
- isTransform(self, item)
- Customization Point: determine whether a node is a Transform
- iterchildren(self)
- Iterate over child paths which are still live
- iterdescendents(self)
- Iterate over all descendent paths
- itransformMatrix(self)
- Manually generate an inverse transform matrix for this path
See transformMatrix for semantics
- transformChildren(self, reverse=0)
- Yield all transforming children
- transformMatrix(self, translate=True, scale=True, rotate=True, matrixHolder=False)
- Calculate (and cache) a transform matrix for this path
Calculates our transformMatrix from our parent's transform
and the set of nodes between our parent and ourself. Normally
that should be a *single* node or *none* in most cases.
translate -- if true, include translations in the matrix
scale -- if true, include scales in the matrix
rotate -- if true, include rotations in the matrix
Note: to apply these matrices to a particular coordinate,
you would do the following:
p = ones( 4 )
p[:3] = coordinate
return dot( p, matrix)
That is, you use the homogenous coordinate, and
make it the first item in the dot'ing.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes defined here:
- active = True
- broken = False
- children = None
- parent = None
| |