1
2
3
5 """
6 A polygon holds the index of the vertex forming the poylgon.
7
8 Note:
9 The polygon attributes are read-only, you need to retrieve the vertex proxy if you want
10 to change the vertex settings.
11
12 @ivar matname: The name of polygon material, empty if no material.
13 @type matname: string
14 @ivar material: The material of the polygon
15 @type material: L{KX_PolygonMaterial} or KX_BlenderMaterial
16 @ivar texture: The texture name of the polygon.
17 @type texture: string
18 @ivar matid: The material index of the polygon, use this to retrieve vertex proxy from mesh proxy
19 @type matid: integer
20 @ivar v1: vertex index of the first vertex of the polygon, use this to retrieve vertex proxy from mesh proxy
21 @type v1: integer
22 @ivar v2: vertex index of the second vertex of the polygon, use this to retrieve vertex proxy from mesh proxy
23 @type v2: integer
24 @ivar v3: vertex index of the third vertex of the polygon, use this to retrieve vertex proxy from mesh proxy
25 @type v3: integer
26 @ivar v4: vertex index of the fourth vertex of the polygon, 0 if polygon has only 3 vertex
27 use this to retrieve vertex proxy from mesh proxy
28 @type v4: integer
29 @ivar visible: visible state of the polygon: 1=visible, 0=invisible
30 @type visible: integer
31 @ivar collide: collide state of the polygon: 1=receives collision, 0=collision free.
32 @type collide: integer
33 """
34
36 """
37 Returns the polygon material name with MA prefix
38
39 @rtype: string
40 @return: material name
41 """
43 """
44 Returns the polygon material
45
46 @rtype: L{KX_PolygonMaterial} or KX_BlenderMaterial
47 """
49 """
50 Returns the polygon texture name
51
52 @rtype: string
53 @return: texture name
54 """
56 """
57 Returns the material bucket index of the polygon.
58 This index and the ones returned by getVertexIndex() are needed to retrieve the vertex proxy from L{KX_MeshProxy}.
59
60 @rtype: integer
61 @return: the material index in the mesh
62 """
64 """
65 Returns the number of vertex of the polygon.
66
67 @rtype: integer
68 @return: number of vertex, 3 or 4.
69 """
71 """
72 Returns whether the polygon is visible or not
73
74 @rtype: integer
75 @return: 0=invisible, 1=visible
76 """
78 """
79 Returns whether the polygon is receives collision or not
80
81 @rtype: integer
82 @return: 0=collision free, 1=receives collision
83 """
85 """
86 Returns the mesh vertex index of a polygon vertex
87 This index and the one returned by getMaterialIndex() are needed to retrieve the vertex proxy from L{KX_MeshProxy}.
88
89 @type vertex: integer
90 @param vertex: index of the vertex in the polygon: 0->3
91 @rtype: integer
92 @return: mesh vertex index
93 """
95 """
96 Returns a mesh proxy
97
98 @rtype: L{KX_MeshProxy}
99 @return: mesh proxy
100 """
101