# Polygonal

> Python API functions

### configureFunctionLogger

```python
polygonal.configureFunctionLogger(functionName, enableFunction, enableParameters, enableExecutionTime)
```

Parameters

| Type                            | Name                | Description |
| ------------------------------- | ------------------- | ----------- |
| [String](./core_types#string)   | functionName        |             |
| [Boolean](./core_types#boolean) | enableFunction      |             |
| [Boolean](./core_types#boolean) | enableParameters    |             |
| [Boolean](./core_types#boolean) | enableExecutionTime |             |

### getPolygonCount

Returns the number of polygon of a mesh.

```python
polygonal.getPolygonCount(mesh, asTriangleCount=False) -> core.ULong
```

Parameters

| Type                           | Name            | Description                                                 |
| ------------------------------ | --------------- | ----------------------------------------------------------- |
| [Mesh](./polygonal_types#mesh) | mesh            | The mesh.                                                   |
| [Bool](./core_types#bool)      | asTriangleCount | If true count the equivalent of triangles for each polygon. |

Returns

| Type                        | Name         | Description             |
| --------------------------- | ------------ | ----------------------- |
| [ULong](./core_types#ulong) | polygonCount | The number of polygons. |

## checksum

### computeMeshTopoChecksum

Compute a checksum of the mesh topology, connectivity.

```python
polygonal.computeMeshTopoChecksum(mesh) -> core.String
```

Parameters

| Type                           | Name | Description |
| ------------------------------ | ---- | ----------- |
| [Mesh](./polygonal_types#mesh) | mesh | The mesh.   |

Returns

| Type                          | Name     | Description |
| ----------------------------- | -------- | ----------- |
| [String](./core_types#string) | checksum | The mesh.   |

See also:

* [polygonal.computeMeshVertexPositionsChecksum](./polygonal_functions#computemeshvertexpositionschecksum)
* [polygonal.computeUVTopoChecksum](./polygonal_functions#computeuvtopochecksum)
* [polygonal.computeUVVertexPositionsChecksum](./polygonal_functions#computeuvvertexpositionschecksum)

### computeMeshVertexPositionsChecksum

Compute a checksum of the mesh vertices positions.

```python
polygonal.computeMeshVertexPositionsChecksum(mesh, precisionFloat=-1) -> core.String
```

Parameters

| Type                           | Name           | Description                                                                                                 |
| ------------------------------ | -------------- | ----------------------------------------------------------------------------------------------------------- |
| [Mesh](./polygonal_types#mesh) | mesh           | The mesh.                                                                                                   |
| [Int](./core_types#int)        | precisionFloat | Floating point precision \[1..24], number of significant numbers kept. -1 means no rounded will be applied. |

Returns

| Type                          | Name     | Description |
| ----------------------------- | -------- | ----------- |
| [String](./core_types#string) | checksum | The mesh.   |

See also:

* [polygonal.computeMeshTopoChecksum](./polygonal_functions#computemeshtopochecksum)
* [polygonal.computeUVTopoChecksum](./polygonal_functions#computeuvtopochecksum)
* [polygonal.computeUVVertexPositionsChecksum](./polygonal_functions#computeuvvertexpositionschecksum)

### computeUVTopoChecksum

Compute a checksum of the uvs topology, connectivity.

```python
polygonal.computeUVTopoChecksum(mesh, uvChannel) -> core.String
```

Parameters

| Type                           | Name      | Description     |
| ------------------------------ | --------- | --------------- |
| [Mesh](./polygonal_types#mesh) | mesh      | The mesh.       |
| [Int](./core_types#int)        | uvChannel | The uv channel. |

Returns

| Type                          | Name     | Description |
| ----------------------------- | -------- | ----------- |
| [String](./core_types#string) | checksum | The mesh.   |

See also:

* [polygonal.computeMeshTopoChecksum](./polygonal_functions#computemeshtopochecksum)
* [polygonal.computeMeshVertexPositionsChecksum](./polygonal_functions#computemeshvertexpositionschecksum)
* [polygonal.computeUVVertexPositionsChecksum](./polygonal_functions#computeuvvertexpositionschecksum)

### computeUVVertexPositionsChecksum

Compute a checksum of the vertices positions in uv space.

```python
polygonal.computeUVVertexPositionsChecksum(mesh, uvChannel, precisionFloat=-1) -> core.String
```

Parameters

| Type                           | Name           | Description                                                                                                 |
| ------------------------------ | -------------- | ----------------------------------------------------------------------------------------------------------- |
| [Mesh](./polygonal_types#mesh) | mesh           | The mesh.                                                                                                   |
| [Int](./core_types#int)        | uvChannel      | The uv channel.                                                                                             |
| [Int](./core_types#int)        | precisionFloat | Floating point precision \[1..24], number of significant numbers kept. -1 means no rounded will be applied. |

Returns

| Type                          | Name     | Description |
| ----------------------------- | -------- | ----------- |
| [String](./core_types#string) | checksum | The mesh.   |

See also:

* [polygonal.computeMeshTopoChecksum](./polygonal_functions#computemeshtopochecksum)
* [polygonal.computeMeshVertexPositionsChecksum](./polygonal_functions#computemeshvertexpositionschecksum)
* [polygonal.computeUVTopoChecksum](./polygonal_functions#computeuvtopochecksum)

## draco

### dracoDecode

Decode a mesh using draco.

```python
polygonal.dracoDecode(buffer, jointIndicesId=-1, jointWeightsId=-1) -> polygonal.StaticMesh
```

Parameters

| Type                              | Name           | Description                                            |
| --------------------------------- | -------------- | ------------------------------------------------------ |
| [ByteList](./core_types#bytelist) | buffer         |                                                        |
| [Int](./core_types#int)           | jointIndicesId | Unique ID of Generic attribute encoding joint indices. |
| [Int](./core_types#int)           | jointWeightsId | Unique ID of Generic attribute encoding joint weights. |

Returns

| Type                                       | Name | Description |
| ------------------------------------------ | ---- | ----------- |
| [StaticMesh](./polygonal_types#staticmesh) | mesh |             |

See also:

* [polygonal.dracoEncode](./polygonal_functions#dracoencode)

### dracoEncode

Encode a mesh using draco.

```python
polygonal.dracoEncode(mesh, compressionLevel=7, quantizationPosition=-1, quantizationNormal=-1, quantizationTexCoord=-1) -> core.ByteList, core.Int, core.Int
```

Parameters

| Type                                       | Name                 | Description                                                             |
| ------------------------------------------ | -------------------- | ----------------------------------------------------------------------- |
| [StaticMesh](./polygonal_types#staticmesh) | mesh                 |                                                                         |
| [Int](./core_types#int)                    | compressionLevel     | 0=faster but the worst compression, 10=slower but the best compression. |
| [Int](./core_types#int)                    | quantizationPosition | Number of quantization bits used for position attributes.               |
| [Int](./core_types#int)                    | quantizationNormal   | Number of quantization bits used for normal attributes.                 |
| [Int](./core_types#int)                    | quantizationTexCoord | Number of quantization bits used for texture coordinates attributes.    |

Returns

| Type                              | Name           | Description                                                                                                 |
| --------------------------------- | -------------- | ----------------------------------------------------------------------------------------------------------- |
| [ByteList](./core_types#bytelist) | buffer         |                                                                                                             |
| [Int](./core_types#int)           | jointIndicesId | Unique ID of Generic attribute encoding joint indices (-1 if not applicable or if enocdeSkeleton is false). |
| [Int](./core_types#int)           | jointWeightsId | Unique ID of Generic attribute encoding joint weights (-1 if not applicable or if enocdeSkeleton is false). |

See also:

* [polygonal.dracoDecode](./polygonal_functions#dracodecode)

## geometry access

### createJointPlaceholders

Create fake joint to store in mesh definitions. Thus we can retrieve stored data from getJointPlaceholders.

```python
polygonal.createJointPlaceholders(data, worldMatrices) -> polygonal.PlaceholderJointList
```

Parameters

| Type                                    | Name          | Description                                                         |
| --------------------------------------- | ------------- | ------------------------------------------------------------------- |
| [ULongList](./core_types#ulonglist)     | data          | Create as much joints as there are data, each joint store one data. |
| [Matrix4List](./geom_types#matrix4list) | worldMatrices | World matrix for each joints.                                       |

Returns

| Type                                                           | Name   | Description                                   |
| -------------------------------------------------------------- | ------ | --------------------------------------------- |
| [PlaceholderJointList](./polygonal_types#placeholderjointlist) | joints | Returns one placeholder joint per given data. |

See also:

* [polygonal.createMeshFromDefinition](./polygonal_functions#createmeshfromdefinition)
* [polygonal.createMeshFromDefinitions](./polygonal_functions#createmeshfromdefinitions)
* [polygonal.createMeshFromText](./polygonal_functions#createmeshfromtext)
* [polygonal.createMeshesFromDefinitions](./polygonal_functions#createmeshesfromdefinitions)
* [polygonal.getJointPlaceholders](./polygonal_functions#getjointplaceholders)
* [polygonal.getMeshDefinition](./polygonal_functions#getmeshdefinition)
* [polygonal.getMeshDefinitions](./polygonal_functions#getmeshdefinitions)
* [polygonal.getMeshSkinning](./polygonal_functions#getmeshskinning)
* [polygonal.hasMeshJoints](./polygonal_functions#hasmeshjoints)
* [polygonal.hasNormalizedUVs](./polygonal_functions#hasnormalizeduvs)
* [polygonal.hasUVs](./polygonal_functions#hasuvs)
* [polygonal.setMeshSkinning](./polygonal_functions#setmeshskinning)

### createMeshFromDefinition

Create a new mesh with the given MeshDefinition.

```python
polygonal.createMeshFromDefinition(meshDefinition) -> polygonal.Mesh
```

Parameters

| Type                                               | Name           | Description      |
| -------------------------------------------------- | -------------- | ---------------- |
| [MeshDefinition](./polygonal_types#meshdefinition) | meshDefinition | Mesh definition. |

Returns

| Type                           | Name | Description   |
| ------------------------------ | ---- | ------------- |
| [Mesh](./polygonal_types#mesh) | mesh | The new mesh. |

See also:

* [polygonal.createJointPlaceholders](./polygonal_functions#createjointplaceholders)
* [polygonal.createMeshFromDefinitions](./polygonal_functions#createmeshfromdefinitions)
* [polygonal.createMeshFromText](./polygonal_functions#createmeshfromtext)
* [polygonal.createMeshesFromDefinitions](./polygonal_functions#createmeshesfromdefinitions)
* [polygonal.getJointPlaceholders](./polygonal_functions#getjointplaceholders)
* [polygonal.getMeshDefinition](./polygonal_functions#getmeshdefinition)
* [polygonal.getMeshDefinitions](./polygonal_functions#getmeshdefinitions)
* [polygonal.getMeshSkinning](./polygonal_functions#getmeshskinning)
* [polygonal.hasMeshJoints](./polygonal_functions#hasmeshjoints)
* [polygonal.hasNormalizedUVs](./polygonal_functions#hasnormalizeduvs)
* [polygonal.hasUVs](./polygonal_functions#hasuvs)
* [polygonal.setMeshSkinning](./polygonal_functions#setmeshskinning)

### createMeshFromDefinitions

Create a new mesh from multiple MeshDefinition.

```python
polygonal.createMeshFromDefinitions(meshDefinition) -> polygonal.Mesh
```

Parameters

| Type                                                       | Name           | Description          |
| ---------------------------------------------------------- | -------------- | -------------------- |
| [MeshDefinitionList](./polygonal_types#meshdefinitionlist) | meshDefinition | The MeshDefinitions. |

Returns

| Type                           | Name | Description   |
| ------------------------------ | ---- | ------------- |
| [Mesh](./polygonal_types#mesh) | mesh | The new mesh. |

See also:

* [polygonal.createJointPlaceholders](./polygonal_functions#createjointplaceholders)
* [polygonal.createMeshFromDefinition](./polygonal_functions#createmeshfromdefinition)
* [polygonal.createMeshFromText](./polygonal_functions#createmeshfromtext)
* [polygonal.createMeshesFromDefinitions](./polygonal_functions#createmeshesfromdefinitions)
* [polygonal.getJointPlaceholders](./polygonal_functions#getjointplaceholders)
* [polygonal.getMeshDefinition](./polygonal_functions#getmeshdefinition)
* [polygonal.getMeshDefinitions](./polygonal_functions#getmeshdefinitions)
* [polygonal.getMeshSkinning](./polygonal_functions#getmeshskinning)
* [polygonal.hasMeshJoints](./polygonal_functions#hasmeshjoints)
* [polygonal.hasNormalizedUVs](./polygonal_functions#hasnormalizeduvs)
* [polygonal.hasUVs](./polygonal_functions#hasuvs)
* [polygonal.setMeshSkinning](./polygonal_functions#setmeshskinning)

### createMeshFromText

Creates an occurrence from string.

```python
polygonal.createMeshFromText(text, matrix, font="ChicFont", fontSize=64, color=None, heigth3D=40) -> polygonal.Mesh, material.Material
```

Parameters

| Type                                  | Name     | Description                |
| ------------------------------------- | -------- | -------------------------- |
| [String](./core_types#string)         | text     | Text to create.            |
| [Matrix4](./geom_types#matrix4)       | matrix   | A matrix to apply on mesh. |
| [String](./core_types#string)         | font     | The font to use.           |
| [Int](./core_types#int)               | fontSize | The font size.             |
| [ColorAlpha](./core_types#coloralpha) | color    | The occurrence color.      |
| [Double](./core_types#double)         | heigth3D | 3D height of text.         |

Returns

| Type                                  | Name     | Description |
| ------------------------------------- | -------- | ----------- |
| [Mesh](./polygonal_types#mesh)        | mesh     |             |
| [Material](./material_types#material) | material |             |

See also:

* [polygonal.createJointPlaceholders](./polygonal_functions#createjointplaceholders)
* [polygonal.createMeshFromDefinition](./polygonal_functions#createmeshfromdefinition)
* [polygonal.createMeshFromDefinitions](./polygonal_functions#createmeshfromdefinitions)
* [polygonal.createMeshesFromDefinitions](./polygonal_functions#createmeshesfromdefinitions)
* [polygonal.getJointPlaceholders](./polygonal_functions#getjointplaceholders)
* [polygonal.getMeshDefinition](./polygonal_functions#getmeshdefinition)
* [polygonal.getMeshDefinitions](./polygonal_functions#getmeshdefinitions)
* [polygonal.getMeshSkinning](./polygonal_functions#getmeshskinning)
* [polygonal.hasMeshJoints](./polygonal_functions#hasmeshjoints)
* [polygonal.hasNormalizedUVs](./polygonal_functions#hasnormalizeduvs)
* [polygonal.hasUVs](./polygonal_functions#hasuvs)
* [polygonal.setMeshSkinning](./polygonal_functions#setmeshskinning)

### createMeshesFromDefinitions

Create new meshes with the given MeshDefinitions.

```python
polygonal.createMeshesFromDefinitions(meshDefinitions) -> polygonal.MeshList
```

Parameters

| Type                                                       | Name            | Description          |
| ---------------------------------------------------------- | --------------- | -------------------- |
| [MeshDefinitionList](./polygonal_types#meshdefinitionlist) | meshDefinitions | The MeshDefinitions. |

Returns

| Type                                   | Name   | Description     |
| -------------------------------------- | ------ | --------------- |
| [MeshList](./polygonal_types#meshlist) | meshes | The new Meshes. |

See also:

* [polygonal.createJointPlaceholders](./polygonal_functions#createjointplaceholders)
* [polygonal.createMeshFromDefinition](./polygonal_functions#createmeshfromdefinition)
* [polygonal.createMeshFromDefinitions](./polygonal_functions#createmeshfromdefinitions)
* [polygonal.createMeshFromText](./polygonal_functions#createmeshfromtext)
* [polygonal.getJointPlaceholders](./polygonal_functions#getjointplaceholders)
* [polygonal.getMeshDefinition](./polygonal_functions#getmeshdefinition)
* [polygonal.getMeshDefinitions](./polygonal_functions#getmeshdefinitions)
* [polygonal.getMeshSkinning](./polygonal_functions#getmeshskinning)
* [polygonal.hasMeshJoints](./polygonal_functions#hasmeshjoints)
* [polygonal.hasNormalizedUVs](./polygonal_functions#hasnormalizeduvs)
* [polygonal.hasUVs](./polygonal_functions#hasuvs)
* [polygonal.setMeshSkinning](./polygonal_functions#setmeshskinning)

### getJointPlaceholders

Get data stored in joint placeholders.

```python
polygonal.getJointPlaceholders(joints) -> core.ULongList
```

Parameters

| Type                                                           | Name   | Description                          |
| -------------------------------------------------------------- | ------ | ------------------------------------ |
| [PlaceholderJointList](./polygonal_types#placeholderjointlist) | joints | Placeholder joints to get data from. |

Returns

| Type                                | Name | Description                                                                          |
| ----------------------------------- | ---- | ------------------------------------------------------------------------------------ |
| [ULongList](./core_types#ulonglist) | data | Data stored in each placehold joint (for invalid joint, returned data is undefined). |

See also:

* [polygonal.createJointPlaceholders](./polygonal_functions#createjointplaceholders)
* [polygonal.createMeshFromDefinition](./polygonal_functions#createmeshfromdefinition)
* [polygonal.createMeshFromDefinitions](./polygonal_functions#createmeshfromdefinitions)
* [polygonal.createMeshFromText](./polygonal_functions#createmeshfromtext)
* [polygonal.createMeshesFromDefinitions](./polygonal_functions#createmeshesfromdefinitions)
* [polygonal.getMeshDefinition](./polygonal_functions#getmeshdefinition)
* [polygonal.getMeshDefinitions](./polygonal_functions#getmeshdefinitions)
* [polygonal.getMeshSkinning](./polygonal_functions#getmeshskinning)
* [polygonal.hasMeshJoints](./polygonal_functions#hasmeshjoints)
* [polygonal.hasNormalizedUVs](./polygonal_functions#hasnormalizeduvs)
* [polygonal.hasUVs](./polygonal_functions#hasuvs)
* [polygonal.setMeshSkinning](./polygonal_functions#setmeshskinning)

### getMeshDefinition

Returns the mesh definition.

```python
polygonal.getMeshDefinition(mesh) -> polygonal.MeshDefinition
```

Parameters

| Type                           | Name | Description                 |
| ------------------------------ | ---- | --------------------------- |
| [Mesh](./polygonal_types#mesh) | mesh | The mesh to get definition. |

Returns

| Type                                               | Name           | Description      |
| -------------------------------------------------- | -------------- | ---------------- |
| [MeshDefinition](./polygonal_types#meshdefinition) | meshDefinition | Mesh definition. |

See also:

* [polygonal.createJointPlaceholders](./polygonal_functions#createjointplaceholders)
* [polygonal.createMeshFromDefinition](./polygonal_functions#createmeshfromdefinition)
* [polygonal.createMeshFromDefinitions](./polygonal_functions#createmeshfromdefinitions)
* [polygonal.createMeshFromText](./polygonal_functions#createmeshfromtext)
* [polygonal.createMeshesFromDefinitions](./polygonal_functions#createmeshesfromdefinitions)
* [polygonal.getJointPlaceholders](./polygonal_functions#getjointplaceholders)
* [polygonal.getMeshDefinitions](./polygonal_functions#getmeshdefinitions)
* [polygonal.getMeshSkinning](./polygonal_functions#getmeshskinning)
* [polygonal.hasMeshJoints](./polygonal_functions#hasmeshjoints)
* [polygonal.hasNormalizedUVs](./polygonal_functions#hasnormalizeduvs)
* [polygonal.hasUVs](./polygonal_functions#hasuvs)
* [polygonal.setMeshSkinning](./polygonal_functions#setmeshskinning)

### getMeshDefinitions

Returns the meshes definitions.

```python
polygonal.getMeshDefinitions(meshes) -> polygonal.MeshDefinitionList
```

Parameters

| Type                                   | Name   | Description                    |
| -------------------------------------- | ------ | ------------------------------ |
| [MeshList](./polygonal_types#meshlist) | meshes | The meshes to get definitions. |

Returns

| Type                                                       | Name            | Description          |
| ---------------------------------------------------------- | --------------- | -------------------- |
| [MeshDefinitionList](./polygonal_types#meshdefinitionlist) | meshDefinitions | The MeshDefinitions. |

See also:

* [polygonal.createJointPlaceholders](./polygonal_functions#createjointplaceholders)
* [polygonal.createMeshFromDefinition](./polygonal_functions#createmeshfromdefinition)
* [polygonal.createMeshFromDefinitions](./polygonal_functions#createmeshfromdefinitions)
* [polygonal.createMeshFromText](./polygonal_functions#createmeshfromtext)
* [polygonal.createMeshesFromDefinitions](./polygonal_functions#createmeshesfromdefinitions)
* [polygonal.getJointPlaceholders](./polygonal_functions#getjointplaceholders)
* [polygonal.getMeshDefinition](./polygonal_functions#getmeshdefinition)
* [polygonal.getMeshSkinning](./polygonal_functions#getmeshskinning)
* [polygonal.hasMeshJoints](./polygonal_functions#hasmeshjoints)
* [polygonal.hasNormalizedUVs](./polygonal_functions#hasnormalizeduvs)
* [polygonal.hasUVs](./polygonal_functions#hasuvs)
* [polygonal.setMeshSkinning](./polygonal_functions#setmeshskinning)

### getMeshSkinning

Returns the joints/IBMs list of a given mesh (those referenced by jointIndices).

```python
polygonal.getMeshSkinning(mesh) -> polygonal.JointList, geom.Matrix4List
```

Parameters

| Type                                       | Name | Description |
| ------------------------------------------ | ---- | ----------- |
| [StaticMesh](./polygonal_types#staticmesh) | mesh |             |

Returns

| Type                                     | Name   | Description            |
| ---------------------------------------- | ------ | ---------------------- |
| [JointList](./polygonal_types#jointlist) | joints |                        |
| [Matrix4List](./geom_types#matrix4list)  | IBMs   | Inverse Bind Matrices. |

See also:

* [polygonal.createJointPlaceholders](./polygonal_functions#createjointplaceholders)
* [polygonal.createMeshFromDefinition](./polygonal_functions#createmeshfromdefinition)
* [polygonal.createMeshFromDefinitions](./polygonal_functions#createmeshfromdefinitions)
* [polygonal.createMeshFromText](./polygonal_functions#createmeshfromtext)
* [polygonal.createMeshesFromDefinitions](./polygonal_functions#createmeshesfromdefinitions)
* [polygonal.getJointPlaceholders](./polygonal_functions#getjointplaceholders)
* [polygonal.getMeshDefinition](./polygonal_functions#getmeshdefinition)
* [polygonal.getMeshDefinitions](./polygonal_functions#getmeshdefinitions)
* [polygonal.hasMeshJoints](./polygonal_functions#hasmeshjoints)
* [polygonal.hasNormalizedUVs](./polygonal_functions#hasnormalizeduvs)
* [polygonal.hasUVs](./polygonal_functions#hasuvs)
* [polygonal.setMeshSkinning](./polygonal_functions#setmeshskinning)

### hasMeshJoints

Check if the mesh has joints.

```python
polygonal.hasMeshJoints(mesh) -> core.Bool
```

Parameters

| Type                           | Name | Description |
| ------------------------------ | ---- | ----------- |
| [Mesh](./polygonal_types#mesh) | mesh | The Mesh.   |

Returns

| Type                      | Name  | Description                              |
| ------------------------- | ----- | ---------------------------------------- |
| [Bool](./core_types#bool) | value | Return True if the mesh contains joints. |

See also:

* [polygonal.createJointPlaceholders](./polygonal_functions#createjointplaceholders)
* [polygonal.createMeshFromDefinition](./polygonal_functions#createmeshfromdefinition)
* [polygonal.createMeshFromDefinitions](./polygonal_functions#createmeshfromdefinitions)
* [polygonal.createMeshFromText](./polygonal_functions#createmeshfromtext)
* [polygonal.createMeshesFromDefinitions](./polygonal_functions#createmeshesfromdefinitions)
* [polygonal.getJointPlaceholders](./polygonal_functions#getjointplaceholders)
* [polygonal.getMeshDefinition](./polygonal_functions#getmeshdefinition)
* [polygonal.getMeshDefinitions](./polygonal_functions#getmeshdefinitions)
* [polygonal.getMeshSkinning](./polygonal_functions#getmeshskinning)
* [polygonal.hasNormalizedUVs](./polygonal_functions#hasnormalizeduvs)
* [polygonal.hasUVs](./polygonal_functions#hasuvs)
* [polygonal.setMeshSkinning](./polygonal_functions#setmeshskinning)

### hasNormalizedUVs

Check if the provided mesh UV channel contains normalized texture coordinates.

```python
polygonal.hasNormalizedUVs(mesh, channel) -> core.Bool
```

Parameters

| Type                           | Name    | Description                                                    |
| ------------------------------ | ------- | -------------------------------------------------------------- |
| [Mesh](./polygonal_types#mesh) | mesh    | The mesh that needs to be checked.                             |
| [Int](./core_types#int)        | channel | The channel to verity. If set to -1, all channels are checked. |

Returns

| Type                      | Name  | Description                                                                                |
| ------------------------- | ----- | ------------------------------------------------------------------------------------------ |
| [Bool](./core_types#bool) | value | Return True if the mesh UV channel is defined and contains normalized texture coordinates. |

See also:

* [polygonal.createJointPlaceholders](./polygonal_functions#createjointplaceholders)
* [polygonal.createMeshFromDefinition](./polygonal_functions#createmeshfromdefinition)
* [polygonal.createMeshFromDefinitions](./polygonal_functions#createmeshfromdefinitions)
* [polygonal.createMeshFromText](./polygonal_functions#createmeshfromtext)
* [polygonal.createMeshesFromDefinitions](./polygonal_functions#createmeshesfromdefinitions)
* [polygonal.getJointPlaceholders](./polygonal_functions#getjointplaceholders)
* [polygonal.getMeshDefinition](./polygonal_functions#getmeshdefinition)
* [polygonal.getMeshDefinitions](./polygonal_functions#getmeshdefinitions)
* [polygonal.getMeshSkinning](./polygonal_functions#getmeshskinning)
* [polygonal.hasMeshJoints](./polygonal_functions#hasmeshjoints)
* [polygonal.hasUVs](./polygonal_functions#hasuvs)
* [polygonal.setMeshSkinning](./polygonal_functions#setmeshskinning)

### hasUVs

Check if one or some UV channels are defined in the mesh.

```python
polygonal.hasUVs(mesh, channel=-1) -> core.Bool
```

Parameters

| Type                           | Name    | Description                             |
| ------------------------------ | ------- | --------------------------------------- |
| [Mesh](./polygonal_types#mesh) | mesh    | The mesh to check.                      |
| [Int](./core_types#int)        | channel | The UV channel to check, or -1 for any. |

Returns

| Type                      | Name  | Description                                                                                                         |
| ------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------- |
| [Bool](./core_types#bool) | value | Return True if the mesh contains the provided UV channel, or if channel is -1 and the mesh contains any UV channel. |

See also:

* [polygonal.createJointPlaceholders](./polygonal_functions#createjointplaceholders)
* [polygonal.createMeshFromDefinition](./polygonal_functions#createmeshfromdefinition)
* [polygonal.createMeshFromDefinitions](./polygonal_functions#createmeshfromdefinitions)
* [polygonal.createMeshFromText](./polygonal_functions#createmeshfromtext)
* [polygonal.createMeshesFromDefinitions](./polygonal_functions#createmeshesfromdefinitions)
* [polygonal.getJointPlaceholders](./polygonal_functions#getjointplaceholders)
* [polygonal.getMeshDefinition](./polygonal_functions#getmeshdefinition)
* [polygonal.getMeshDefinitions](./polygonal_functions#getmeshdefinitions)
* [polygonal.getMeshSkinning](./polygonal_functions#getmeshskinning)
* [polygonal.hasMeshJoints](./polygonal_functions#hasmeshjoints)
* [polygonal.hasNormalizedUVs](./polygonal_functions#hasnormalizeduvs)
* [polygonal.setMeshSkinning](./polygonal_functions#setmeshskinning)

### setMeshSkinning

Set/Replace the list of joints/IBMs of a given mesh (those referenced by jointIndices).

```python
polygonal.setMeshSkinning(mesh, joints, IBMs)
```

Parameters

| Type                                       | Name   | Description            |
| ------------------------------------------ | ------ | ---------------------- |
| [StaticMesh](./polygonal_types#staticmesh) | mesh   |                        |
| [JointList](./polygonal_types#jointlist)   | joints |                        |
| [Matrix4List](./geom_types#matrix4list)    | IBMs   | Inverse Bind Matrices. |

See also:

* [polygonal.createJointPlaceholders](./polygonal_functions#createjointplaceholders)
* [polygonal.createMeshFromDefinition](./polygonal_functions#createmeshfromdefinition)
* [polygonal.createMeshFromDefinitions](./polygonal_functions#createmeshfromdefinitions)
* [polygonal.createMeshFromText](./polygonal_functions#createmeshfromtext)
* [polygonal.createMeshesFromDefinitions](./polygonal_functions#createmeshesfromdefinitions)
* [polygonal.getJointPlaceholders](./polygonal_functions#getjointplaceholders)
* [polygonal.getMeshDefinition](./polygonal_functions#getmeshdefinition)
* [polygonal.getMeshDefinitions](./polygonal_functions#getmeshdefinitions)
* [polygonal.getMeshSkinning](./polygonal_functions#getmeshskinning)
* [polygonal.hasMeshJoints](./polygonal_functions#hasmeshjoints)
* [polygonal.hasNormalizedUVs](./polygonal_functions#hasnormalizeduvs)
* [polygonal.hasUVs](./polygonal_functions#hasuvs)

## modification

### usePointGapFillerNormal

This triangulates a set of points and normals.

```python
polygonal.usePointGapFillerNormal(points, normals) -> core.IntList
```

Parameters

| Type                                    | Name    | Description                                                             |
| --------------------------------------- | ------- | ----------------------------------------------------------------------- |
| [Point3List](./geom_types#point3list)   | points  | The set of points to triangulate.                                       |
| [Vector3List](./geom_types#vector3list) | normals | The normals associated to the points to triangulate. This can be empty. |

Returns

| Type                            | Name          | Description                                                           |
| ------------------------------- | ------------- | --------------------------------------------------------------------- |
| [IntList](./core_types#intlist) | triangulation | The indexes of the points from the given array arranged as triangles. |
