collada.scene.GeometryNode

class collada.scene.GeometryNode(geometry, materials=None, xmlnode=None)

Bases: collada.scene.SceneNode

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

__init__(geometry, materials=None, xmlnode=None)

Creates a geometry node

Parameters:
  • geometry (collada.geometry.Geometry) – A geometry to instantiate in the scene
  • materials (list) – A list containing items of type collada.scene.MaterialNode. Each of these represents a material that the geometry should be bound to.
  • xmlnode – When loaded, the xmlnode it comes from

Methods

__init__(geometry[, materials, xmlnode]) Creates a geometry node
load(collada, node) Load and return a class instance from an XML node.
objects(tipo[, matrix]) Yields a collada.geometry.BoundGeometry if tipo=='geometry'
save() Saves the geometry node back to xmlnode
geometry = None

An object of type collada.geometry.Geometry representing the geometry to bind in the scene

materials = None

A list containing items of type collada.scene.MaterialNode. Each of these represents a material that the geometry is bound to.

xmlnode = None

ElementTree representation of the geometry node.

objects(tipo, matrix=None)

Yields a collada.geometry.BoundGeometry if tipo=='geometry'

static load(collada, node)

Load and return a class instance from an XML node.

Inspect the data inside node, which must match this class tag and create an instance out of it.

Parameters:
  • collada (collada.Collada) – The collada file object where this object lives
  • localscope (dict) – If there is a local scope where we should look for local ids (sid) this is the dictionary. Otherwise empty dict ({})
  • node – An Element from python’s ElementTree API
save()

Saves the geometry node back to xmlnode