collada.scene.Node

class collada.scene.Node(id, children=None, transforms=None, xmlnode=None, name=None)

Represents 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, name=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

  • name – If given, sets the node name property, if missing (None) then then node name property is set from the id value (if not None)

Methods

__init__(id[, children, transforms, ...])

Create a node in the scene graph.

load(collada, node, localscope)

Load and return a class instance from an XML node.

objects(tipo[, matrix])

Iterate through all objects under this node that match tipo.

save()

Saves the geometry back to xmlnode.

Attributes

xmlnode

ElementTree representation of the transform.

id

The unique string identifier for the node

name

The optional string node name (not required to be unique)for the node, by default set to the id value

children

A list of child nodes of this node.

matrix

A numpy.array of size 4x4 containing a transformation matrix that combines all the transformations in transforms.