# collada.material.Map

class collada.material.Map(sampler, texcoord, xmlnode=None)

  Class containing data coming from <texture> tag inside material.

  When a material defines its properties like diffuse, it can give you a color or a texture. In the latter, the texture is mapped with a sampler and a texture coordinate channel. If a material defined a texture for one of its properties, you’ll find an object of this class in the corresponding attribute.

  __init__(sampler, texcoord, xmlnode=None)

    Create a map instance to a sampler using a texcoord channel.

    Parameters:

      - sampler (collada.material.Sampler2D) – A sampler object to map

      - texcoord (str) – Texture coordinate channel symbol to use

      - xmlnode – If loaded from xml, the xml node

  Methods

  `__init__`(sampler, texcoord[, xmlnode]) | Create a map instance to a sampler using a texcoord channel.
  `load`(collada, localscope, node) | Load and return a class instance from an XML node.
  `save`() | Saves the map back to `xmlnode`

  Attributes

  `xmlnode` | ElementTree representation of the map
  `sampler` | `collada.material.Sampler2D` object to map
  `texcoord` | Texture coordinate channel symbol to use