collada.lineset.LineSet¶
- class collada.lineset.LineSet(sources, material, index, xmlnode=None)¶
Class containing the data COLLADA puts in a <lines> tag, a collection of lines. The LineSet object is read-only. To modify a LineSet, create a new instance using
collada.geometry.Geometry.createLineSet()
.If
L
is an instance ofcollada.lineset.LineSet
, thenlen(L)
returns the number of lines in the set.L[i]
returns the ith line in the set.
- __init__(sources, material, index, xmlnode=None)¶
A LineSet should not be created manually. Instead, call the
collada.geometry.Geometry.createLineSet()
method after creating a geometry instance.
Methods
__init__
(sources, material, index[, xmlnode])A LineSet should not be created manually.
bind
(matrix, materialnodebysymbol)Create a bound line set from this line set, transform and material mapping
getInputList
()Gets a
collada.source.InputList
representing the inputs from a primitiveload
(collada, localscope, node)Load and return a class instance from an XML node.
save
()Put all the data to the internal xml node (xmlnode) so it can be serialized.
Attributes
normal
Read-only numpy.array of size Nx3 where N is the number of normal values in the primitive's normal source array.
normal_index
Read-only numpy.array of size Nx3 where N is the number of vertices in the primitive.
texbinormal_indexset
Read-only tuple of texture binormal index arrays.
texbinormalset
Read-only tuple of texture binormal arrays.
texcoord_indexset
Read-only tuple of texture coordinate index arrays.
texcoordset
Read-only tuple of texture coordinate arrays.
textangent_indexset
Read-only tuple of texture tangent index arrays.
textangentset
Read-only tuple of texture tangent arrays.
vertex
Read-only numpy.array of size Nx3 where N is the number of vertex points in the primitive's vertex source array.
vertex_index
Read-only numpy.array of size Nx3 where N is the number of vertices in the primitive.
xmlnode
ElementTree representation of the line set.