collada.scene.Node¶
-
class
collada.scene.Node(id, children=None, transforms=None, xmlnode=None)¶ Bases:
collada.scene.SceneNodeRepresents a node object, which is a point on the scene graph, as defined in the collada <node> tag.
Contains the list of transformations effecting the node as well as any children.
-
__init__(id, children=None, transforms=None, xmlnode=None)¶ Create a node in the scene graph.
Parameters: - id (str) – A unique string identifier for the node
- children (list) – A list of child nodes of this node. This can contain any
object that inherits from
collada.scene.SceneNode - transforms (list) – A list of transformations effecting the node. This can
contain any object that inherits from
collada.scene.Transform - xmlnode – When loaded, the xmlnode it comes from
Methods
__init__(id[, children, transforms, xmlnode])Create a node in the scene graph. load(node, localscope)objects(tipo[, matrix])Iterate through all objects under this node that match tipo. save()Saves the geometry back to xmlnode.-
id= None¶ The unique string identifier for the node
-
children= None¶ A list of child nodes of this node. This can contain any object that inherits from
collada.scene.SceneNode
-
matrix= None¶ A numpy.array of size 4x4 containing a transformation matrix that combines all the transformations in
transforms. This will only be updated after callingsave().
-
xmlnode= None¶ ElementTree representation of the transform.
-
objects(tipo, matrix=None)¶ Iterate through all objects under this node that match tipo. The objects will be bound and transformed via the scene transformations.
Parameters: - tipo (str) – A string for the desired object type. This can be one of ‘geometry’, ‘camera’, ‘light’, or ‘controller’.
- matrix (numpy.matrix) – An optional transformation matrix
Return type: generator that yields the type specified
-