collada.triangleset.BoundTriangleSet¶
- class collada.triangleset.BoundTriangleSet(ts, matrix, materialnodebysymbol)¶
A triangle set bound to a transform matrix and materials mapping.
If
Tis an instance ofcollada.triangleset.BoundTriangleSet, thenlen(T)returns the number of triangles in the set.T[i]returns the ith triangle in the set.
- __init__(ts, matrix, materialnodebysymbol)¶
Create a bound triangle set from a triangle set, transform and material mapping. This gets created when a triangle set is instantiated in a scene. Do not create this manually.
Methods
__init__(ts, matrix, materialnodebysymbol)Create a bound triangle set from a triangle set, transform and material mapping.
generateNormals()If
normalsis None or you wish for normals to be recomputed, call this method to recompute them.shapes()Iterate through all the triangles contained in the set.
triangles()Iterate through all the triangles contained in the set.
Attributes
normalRead-only numpy.array of size Nx3 where N is the number of normal values in the primitive's normal source array.
normal_indexRead-only numpy.array of size Nx3 where N is the number of vertices in the primitive.
texcoord_indexsetRead-only tuple of texture coordinate index arrays.
texcoordsetRead-only tuple of texture coordinate arrays.
vertexRead-only numpy.array of size Nx3 where N is the number of vertex points in the primitive's vertex source array.
vertex_indexRead-only numpy.array of size Nx3 where N is the number of vertices in the primitive.