collada.source.FloatSource¶
-
class
collada.source.FloatSource(id, data, components, xmlnode=None)¶ Bases:
collada.source.SourceContains a source array of floats, as defined in the collada <float_array> inside a <source>.
If
digraph inheritance7607915fbc { rankdir=LR; size="8.0, 12.0"; "DaeObject" [URL="collada.common.DaeObject.html#collada.common.DaeObject",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="This class is the abstract interface to all collada objects."]; "FloatSource" [URL="#collada.source.FloatSource",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Contains a source array of floats, as defined in the collada"]; "Source" -> "FloatSource" [arrowsize=0.5,style="setlinewidth(0.5)"]; "IDRefSource" [URL="collada.source.IDRefSource.html#collada.source.IDRefSource",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Contains a source array of ID references, as defined in the collada"]; "Source" -> "IDRefSource" [arrowsize=0.5,style="setlinewidth(0.5)"]; "InputList" [URL="collada.source.InputList.html#collada.source.InputList",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Used for defining input sources to a geometry."]; "NameSource" [URL="collada.source.NameSource.html#collada.source.NameSource",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Contains a source array of strings, as defined in the collada"]; "Source" -> "NameSource" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Source" [URL="collada.source.Source.html#collada.source.Source",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Abstract class for loading source arrays"]; "DaeObject" -> "Source" [arrowsize=0.5,style="setlinewidth(0.5)"]; }fis an instance ofcollada.source.FloatSource, thenlen(f)is the length of the shaped source.len(f)*len(f.components)would give you the number of values in the source.f[i]is the ith item in the source array.-
__init__(id, data, components, xmlnode=None)¶ Create a float source instance.
Parameters: - id (str) – A unique string identifier for the source
- data (numpy.array) – Numpy array (unshaped) with the source values
- components (tuple) – Tuple of strings describing the semantic of the data,
e.g.
('X','Y','Z')would causedatato be reshaped as(-1, 3) - xmlnode – When loaded, the xmlnode it comes from.
Methods
__init__(id, data, components[, xmlnode])Create a float source instance. load(localscope, node)save()Saves the source back to xmlnode-
id= None¶ The unique string identifier for the source
-
data= None¶ Numpy array with the source values. This will be shaped as
(-1,N)whereN = len(self.components)
-
components= None¶ Tuple of strings describing the semantic of the data, e.g.
('X','Y','Z')
-
xmlnode= None¶ ElementTree representation of the source.
-