KX_PolyProxy
Base class: SCA_IObject
A polygon holds the index of the vertex forming the poylgon.
Note: The polygon attributes are read-only, you need to retrieve the vertex proxy if you want to change the vertex settings.
material_name
Section titled “material_name”The name of polygon material, empty if no material.
Type: string
material
Section titled “material”The material of the polygon.
Type: KX_BlenderMaterial
texture_name
Section titled “texture_name”The texture name of the polygon.
Type: string
material_id
Section titled “material_id”The material index of the polygon, use this to retrieve vertex proxy from mesh proxy.
Type: integer
vertex index of the first vertex of the polygon, use this to retrieve vertex proxy from mesh proxy.
Type: integer
vertex index of the second vertex of the polygon, use this to retrieve vertex proxy from mesh proxy.
Type: integer
vertex index of the third vertex of the polygon, use this to retrieve vertex proxy from mesh proxy.
Type: integer
Type: integer
visible
Section titled “visible”visible state of the polygon: 1=visible, 0=invisible.
Type: integer
collide
Section titled “collide”collide state of the polygon: 1=receives collision, 0=collision free.
Type: integer
vertices
Section titled “vertices”Returns the list of vertices of this polygon.
Type: KX_VertexProxy list (read only)
getMaterialName()
Section titled “getMaterialName()”Returns the polygon material name with MA prefix
Returns: material name
Return type: string
getMaterial()
Section titled “getMaterial()”Returns: The polygon material
Return type: KX_BlenderMaterial
getTextureName()
Section titled “getTextureName()”Returns: The texture name
Return type: string
getMaterialIndex()
Section titled “getMaterialIndex()”Returns the material bucket index of the polygon.
This index and the ones returned by getVertexIndex() are needed to retrieve the vertex proxy from MeshProxy.
Returns: the material index in the mesh
Return type: integer
getNumVertex()
Section titled “getNumVertex()”Returns the number of vertex of the polygon.
Returns: number of vertex.
Return type: integer
isVisible()
Section titled “isVisible()”Returns whether the polygon is visible or not
Returns: 0=invisible, 1=visible
Return type: boolean
isCollider()
Section titled “isCollider()”Returns whether the polygon is receives collision or not
Returns: 0=collision free, 1=receives collision
Return type: integer
getVertexIndex(vertex)
Section titled “getVertexIndex(vertex)”Returns the mesh vertex index of a polygon vertex
This index and the one returned by getMaterialIndex() are needed to retrieve the vertex proxy from MeshProxy.
vertex: index of the vertex in the polygon: 0->2vertex: integer
Returns: mesh vertex index
Return type: integer
getMesh()
Section titled “getMesh()”Returns a mesh proxy
Returns: mesh proxy
Return type: MeshProxy
