collada.polylist.Polygon¶
- class collada.polylist.Polygon(indices, vertices, normal_indices, normals, texcoord_indices, texcoords, material)¶
Single polygon representation. Represents a polygon of N points.
- __init__(indices, vertices, normal_indices, normals, texcoord_indices, texcoords, material)¶
A Polygon should not be created manually.
Methods
__init__(indices, vertices, normal_indices, ...)A Polygon should not be created manually.
triangles()This triangulates the polygon using a simple fanning method.
Attributes
verticesA (N, 3) float array containing the points in the polygon.
normalsA (N, 3) float array with the normals for points in the polygon.
texcoordsA tuple where entries are numpy float arrays of size (N, 2) containing the texture coordinates for the points in the polygon for each texture coordinate set.
materialIf coming from an unbound
collada.polylist.Polylist, contains a string with the material symbol.indicesA (N,) int array containing the indices for the vertices of the N points in the polygon.
normal_indicesA (N,) int array containing the indices for the normals of the N points in the polygon
texcoord_indicesA (N,2) int array with texture coordinate indexes for the texcoords of the N points in the polygon