Previous topic

collada.triangleset.BoundTriangleSet

Next topic

collada.triangleset.TriangleSet

This Page

collada.triangleset.Triangle

class collada.triangleset.Triangle(indices, vertices, normals, texcoords, material)

Bases: object

Single triangle representation.

__init__(indices, vertices, normals, texcoords, material)

A triangle should not be created manually.

Methods

__init__(indices, vertices, normals, ...) A triangle should not be created manually.
vertices

A (3, 3) float array for points in the triangle

texcoords

A tuple with (3, 2) float arrays with the texture coordinates for the points in the triangle

material

If coming from an unbound collada.triangleset.TriangleSet, contains a string with the material symbol. If coming from a bound collada.triangleset.BoundTriangleSet, contains the actual collada.material.Effect the triangle is bound to.

indices

A (3, 3) int array with vertex indexes in the vertex array

normals

A (3, 3) float array with the normals for points in the triangle. If the triangle didn’t have normals, they will be computed.