Module KX_PolyProxy :: Class KX_PolyProxy
[hide private]
[frames] | no frames]

Class KX_PolyProxy

source code

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.

Instance Methods [hide private]
string
getMaterialName()
Returns the polygon material name with MA prefix
source code
KX_PolygonMaterial or KX_BlenderMaterial
getMaterial()
Returns the polygon material
source code
string
getTextureName()
Returns the polygon texture name
source code
integer
getMaterialIndex()
Returns the material bucket index of the polygon.
source code
integer
getNumVertex()
Returns the number of vertex of the polygon.
source code
integer
isVisible()
Returns whether the polygon is visible or not
source code
integer
isCollider()
Returns whether the polygon is receives collision or not
source code
integer
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 KX_MeshProxy.
source code
KX_MeshProxy
getMesh()
Returns a mesh proxy
source code
Instance Variables [hide private]
integer collide
collide state of the polygon: 1=receives collision, 0=collision free.
KX_PolygonMaterial or KX_BlenderMaterial material
The material of the polygon
integer matid
The material index of the polygon, use this to retrieve vertex proxy from mesh proxy
string matname
The name of polygon material, empty if no material.
string texture
The texture name of the polygon.
integer v1
vertex index of the first vertex of the polygon, use this to retrieve vertex proxy from mesh proxy
integer v2
vertex index of the second vertex of the polygon, use this to retrieve vertex proxy from mesh proxy
integer v3
vertex index of the third vertex of the polygon, use this to retrieve vertex proxy from mesh proxy
integer v4
vertex index of the fourth vertex of the polygon, 0 if polygon has only 3 vertex use this to retrieve vertex proxy from mesh proxy
integer visible
visible state of the polygon: 1=visible, 0=invisible
Method Details [hide private]

getMaterialName()

source code 

Returns the polygon material name with MA prefix

Returns: string
material name

getTextureName()

source code 

Returns the polygon texture name

Returns: string
texture name

getMaterialIndex()

source code 

Returns the material bucket index of the polygon. This index and the ones returned by getVertexIndex() are needed to retrieve the vertex proxy from KX_MeshProxy.

Returns: integer
the material index in the mesh

getNumVertex()

source code 

Returns the number of vertex of the polygon.

Returns: integer
number of vertex, 3 or 4.

isVisible()

source code 

Returns whether the polygon is visible or not

Returns: integer
0=invisible, 1=visible

isCollider()

source code 

Returns whether the polygon is receives collision or not

Returns: integer
0=collision free, 1=receives collision

getVertexIndex(vertex)

source code 

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 KX_MeshProxy.

Parameters:
  • vertex (integer) - index of the vertex in the polygon: 0->3
Returns: integer
mesh vertex index

getMesh()

source code 

Returns a mesh proxy

Returns: KX_MeshProxy
mesh proxy