collada.scene

This module contains several classes related to the scene graph.

Supported scene nodes are:
  • <node> which is loaded as a Node

  • <instance_camera> which is loaded as a CameraNode

  • <instance_light> which is loaded as a LightNode

  • <instance_material> which is loaded as a MaterialNode

  • <instance_geometry> which is loaded as a GeometryNode

  • <instance_controller> which is loaded as a ControllerNode

  • <scene> which is loaded as a Scene

Functions

loadNode(collada, node, localscope)

Generic scene node loading from an xml node and a collada object.

makeRotationMatrix(x, y, z, angle)

Build and return a transform 4x4 matrix to rotate angle radians around (x,`y`,`z`) axis.

Classes

CameraNode(camera[, xmlnode])

Represents a camera being instantiated in a scene, as defined in the collada <instance_camera> tag.

ControllerNode(controller, materials[, xmlnode])

Represents a controller instance in a scene, as defined in the collada <instance_controller> tag.

ExtraNode(xmlnode)

Represents extra information in a scene, as defined in a collada <extra> tag.

GeometryNode(geometry[, materials, xmlnode])

Represents a geometry instance in a scene, as defined in the collada <instance_geometry> tag.

LightNode(light[, xmlnode])

Represents a light being instantiated in a scene, as defined in the collada <instance_light> tag.

LookAtTransform(eye, interest, upvector[, ...])

Contains a transformation for aiming a camera as defined in the collada <lookat> tag.

MaterialNode(symbol, target, inputs[, xmlnode])

Represents a material being instantiated in a scene, as defined in the collada <instance_material> tag.

MatrixTransform(matrix[, xmlnode])

Contains a matrix transformation as defined in the collada <matrix> tag.

Node(id[, children, transforms, xmlnode, name])

Represents a node object, which is a point on the scene graph, as defined in the collada <node> tag.

NodeNode(node[, xmlnode])

Represents a node being instantiated in a scene, as defined in the collada <instande_node> tag.

RotateTransform(x, y, z, angle[, xmlnode])

Contains a rotation transformation as defined in the collada <rotate> tag.

ScaleTransform(x, y, z[, xmlnode])

Contains a scale transformation as defined in the collada <scale> tag.

Scene(id, nodes[, xmlnode, collada])

The root object for a scene, as defined in a collada <scene> tag

SceneNode()

Abstract base class for all nodes within a scene.

Transform()

Base class for all transformation types

TranslateTransform(x, y, z[, xmlnode])

Contains a translation transformation as defined in the collada <translate> tag.

Exceptions

DaeInstanceNotLoadedError(msg)

Raised when an instance_node refers to a node that isn't loaded yet.