collada.material.Sampler2D¶
- class collada.material.Sampler2D(id, surface, minfilter=None, magfilter=None, xmlnode=None)¶
Class containing data coming from <sampler2D> tag in material.
Collada uses the <sampler2D> tag to map to a <surface>. The only information we store about the sampler right now is minfilter and magfilter. Theoretically, the collada spec has many more parameters here, but no one seems to be using them in the wild, so they are currently unimplemented.
- __init__(id, surface, minfilter=None, magfilter=None, xmlnode=None)¶
Create a Sampler2D object.
- Parameters:
id (str) – A string identifier for the sampler within the local scope of the material
surface (collada.material.Surface) – Surface instance that this object samples from
minfilter (str) – Minification filter string id, see collada spec for details
magfilter (str) – Maximization filter string id, see collada spec for details
xmlnode – If loaded from xml, the xml node
Methods
__init__
(id, surface[, minfilter, ...])Create a Sampler2D object.
load
(collada, localscope, node)Load and return a class instance from an XML node.
save
()Saves the sampler data back to
xmlnode
Attributes
xmlnode
ElementTree representation of the sampler.
id
The string identifier for the sampler within the local scope of the material
surface
Surface instance that this object samples from
minfilter
Minification filter string id, see collada spec for details
magfilter
Maximization filter string id, see collada spec for details