# Polygonal

> Python API functions

### configureFunctionLogger

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

Parameters

| Type                               | Name                | Description |
| ---------------------------------- | ------------------- | ----------- |
| [String](./core_types.md#string)   | functionName        |             |
| [Boolean](./core_types.md#boolean) | enableFunction      |             |
| [Boolean](./core_types.md#boolean) | enableParameters    |             |
| [Boolean](./core_types.md#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.md#mesh) | mesh            | The mesh.                                                   |
| [Bool](./core_types.md#bool)      | asTriangleCount | If true count the equivalent of triangles for each polygon. |

Returns

| Type                           | Name         | Description             |
| ------------------------------ | ------------ | ----------------------- |
| [ULong](./core_types.md#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.md#mesh) | mesh | The mesh.   |

Returns

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

See also:

* [polygonal.computeMeshVertexPositionsChecksum](./polygonal_functions.md#computemeshvertexpositionschecksum)
* [polygonal.computeUVTopoChecksum](./polygonal_functions.md#computeuvtopochecksum)
* [polygonal.computeUVVertexPositionsChecksum](./polygonal_functions.md#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.md#mesh) | mesh           | The mesh.                                                                                                    |
| [Int](./core_types.md#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.md#string) | checksum | The mesh.   |

See also:

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

### computeUVTopoChecksum

Compute a checksum of the uvs topology, connectivity.

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

Parameters

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

Returns

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

See also:

* [polygonal.computeMeshTopoChecksum](./polygonal_functions.md#computemeshtopochecksum)
* [polygonal.computeMeshVertexPositionsChecksum](./polygonal_functions.md#computemeshvertexpositionschecksum)
* [polygonal.computeUVVertexPositionsChecksum](./polygonal_functions.md#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.md#mesh) | mesh           | The mesh.                                                                                                    |
| [Int](./core_types.md#int)        | uvChannel      | The uv channel.                                                                                              |
| [Int](./core_types.md#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.md#string) | checksum | The mesh.   |

See also:

* [polygonal.computeMeshTopoChecksum](./polygonal_functions.md#computemeshtopochecksum)
* [polygonal.computeMeshVertexPositionsChecksum](./polygonal_functions.md#computemeshvertexpositionschecksum)
* [polygonal.computeUVTopoChecksum](./polygonal_functions.md#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.md#bytelist) | buffer         |                                                        |
| [Int](./core_types.md#int)           | jointIndicesId | Unique ID of Generic attribute encoding joint indices. |
| [Int](./core_types.md#int)           | jointWeightsId | Unique ID of Generic attribute encoding joint weights. |

Returns

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

See also:

* [polygonal.dracoEncode](./polygonal_functions.md#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.md#staticmesh) | mesh                 |                                                                         |
| [Int](./core_types.md#int)                    | compressionLevel     | 0=faster but the worst compression, 10=slower but the best compression. |
| [Int](./core_types.md#int)                    | quantizationPosition | Number of quantization bits used for position attributes.               |
| [Int](./core_types.md#int)                    | quantizationNormal   | Number of quantization bits used for normal attributes.                 |
| [Int](./core_types.md#int)                    | quantizationTexCoord | Number of quantization bits used for texture coordinates attributes.    |

Returns

| Type                                 | Name           | Description                                                                                                 |
| ------------------------------------ | -------------- | ----------------------------------------------------------------------------------------------------------- |
| [ByteList](./core_types.md#bytelist) | buffer         |                                                                                                             |
| [Int](./core_types.md#int)           | jointIndicesId | Unique ID of Generic attribute encoding joint indices (-1 if not applicable or if enocdeSkeleton is false). |
| [Int](./core_types.md#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.md#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.md#ulonglist)     | data          | Create as much joints as there are data, each joint store one data. |
| [Matrix4List](./geom_types.md#matrix4list) | worldMatrices | World matrix for each joints.                                       |

Returns

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

See also:

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

### createMeshFromDefinition

Create a new mesh with the given MeshDefinition.

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

Parameters

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

Returns

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

See also:

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

### createMeshFromDefinitions

Create a new mesh from multiple MeshDefinition.

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

Parameters

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

Returns

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

See also:

* [polygonal.createJointPlaceholders](./polygonal_functions.md#createjointplaceholders)
* [polygonal.createMeshFromDefinition](./polygonal_functions.md#createmeshfromdefinition)
* [polygonal.createMeshFromText](./polygonal_functions.md#createmeshfromtext)
* [polygonal.createMeshesFromDefinitions](./polygonal_functions.md#createmeshesfromdefinitions)
* [polygonal.getJointPlaceholders](./polygonal_functions.md#getjointplaceholders)
* [polygonal.getMeshDefinition](./polygonal_functions.md#getmeshdefinition)
* [polygonal.getMeshDefinitions](./polygonal_functions.md#getmeshdefinitions)
* [polygonal.getMeshSkinning](./polygonal_functions.md#getmeshskinning)
* [polygonal.hasMeshJoints](./polygonal_functions.md#hasmeshjoints)
* [polygonal.hasNormalizedUVs](./polygonal_functions.md#hasnormalizeduvs)
* [polygonal.hasUVs](./polygonal_functions.md#hasuvs)
* [polygonal.setMeshSkinning](./polygonal_functions.md#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.md#string)         | text     | Text to create.            |
| [Matrix4](./geom_types.md#matrix4)       | matrix   | A matrix to apply on mesh. |
| [String](./core_types.md#string)         | font     | The font to use.           |
| [Int](./core_types.md#int)               | fontSize | The font size.             |
| [ColorAlpha](./core_types.md#coloralpha) | color    | The occurrence color.      |
| [Double](./core_types.md#double)         | heigth3D | 3D height of text.         |

Returns

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

See also:

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

### createMeshesFromDefinitions

Create new meshes with the given MeshDefinitions.

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

Parameters

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

Returns

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

See also:

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

### getJointPlaceholders

Get data stored in joint placeholders.

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

Parameters

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

Returns

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

See also:

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

### getMeshDefinition

Returns the mesh definition.

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

Parameters

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

Returns

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

See also:

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

### getMeshDefinitions

Returns the meshes definitions.

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

Parameters

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

Returns

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

See also:

* [polygonal.createJointPlaceholders](./polygonal_functions.md#createjointplaceholders)
* [polygonal.createMeshFromDefinition](./polygonal_functions.md#createmeshfromdefinition)
* [polygonal.createMeshFromDefinitions](./polygonal_functions.md#createmeshfromdefinitions)
* [polygonal.createMeshFromText](./polygonal_functions.md#createmeshfromtext)
* [polygonal.createMeshesFromDefinitions](./polygonal_functions.md#createmeshesfromdefinitions)
* [polygonal.getJointPlaceholders](./polygonal_functions.md#getjointplaceholders)
* [polygonal.getMeshDefinition](./polygonal_functions.md#getmeshdefinition)
* [polygonal.getMeshSkinning](./polygonal_functions.md#getmeshskinning)
* [polygonal.hasMeshJoints](./polygonal_functions.md#hasmeshjoints)
* [polygonal.hasNormalizedUVs](./polygonal_functions.md#hasnormalizeduvs)
* [polygonal.hasUVs](./polygonal_functions.md#hasuvs)
* [polygonal.setMeshSkinning](./polygonal_functions.md#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.md#staticmesh) | mesh |             |

Returns

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

See also:

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

### hasMeshJoints

Check if the mesh has joints.

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

Parameters

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

Returns

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

See also:

* [polygonal.createJointPlaceholders](./polygonal_functions.md#createjointplaceholders)
* [polygonal.createMeshFromDefinition](./polygonal_functions.md#createmeshfromdefinition)
* [polygonal.createMeshFromDefinitions](./polygonal_functions.md#createmeshfromdefinitions)
* [polygonal.createMeshFromText](./polygonal_functions.md#createmeshfromtext)
* [polygonal.createMeshesFromDefinitions](./polygonal_functions.md#createmeshesfromdefinitions)
* [polygonal.getJointPlaceholders](./polygonal_functions.md#getjointplaceholders)
* [polygonal.getMeshDefinition](./polygonal_functions.md#getmeshdefinition)
* [polygonal.getMeshDefinitions](./polygonal_functions.md#getmeshdefinitions)
* [polygonal.getMeshSkinning](./polygonal_functions.md#getmeshskinning)
* [polygonal.hasNormalizedUVs](./polygonal_functions.md#hasnormalizeduvs)
* [polygonal.hasUVs](./polygonal_functions.md#hasuvs)
* [polygonal.setMeshSkinning](./polygonal_functions.md#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.md#mesh) | mesh    | The mesh that needs to be checked.                             |
| [Int](./core_types.md#int)        | channel | The channel to verity. If set to -1, all channels are checked. |

Returns

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

See also:

* [polygonal.createJointPlaceholders](./polygonal_functions.md#createjointplaceholders)
* [polygonal.createMeshFromDefinition](./polygonal_functions.md#createmeshfromdefinition)
* [polygonal.createMeshFromDefinitions](./polygonal_functions.md#createmeshfromdefinitions)
* [polygonal.createMeshFromText](./polygonal_functions.md#createmeshfromtext)
* [polygonal.createMeshesFromDefinitions](./polygonal_functions.md#createmeshesfromdefinitions)
* [polygonal.getJointPlaceholders](./polygonal_functions.md#getjointplaceholders)
* [polygonal.getMeshDefinition](./polygonal_functions.md#getmeshdefinition)
* [polygonal.getMeshDefinitions](./polygonal_functions.md#getmeshdefinitions)
* [polygonal.getMeshSkinning](./polygonal_functions.md#getmeshskinning)
* [polygonal.hasMeshJoints](./polygonal_functions.md#hasmeshjoints)
* [polygonal.hasUVs](./polygonal_functions.md#hasuvs)
* [polygonal.setMeshSkinning](./polygonal_functions.md#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.md#mesh) | mesh    | The mesh to check.                      |
| [Int](./core_types.md#int)        | channel | The UV channel to check, or -1 for any. |

Returns

| Type                         | Name  | Description                                                                                                         |
| ---------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------- |
| [Bool](./core_types.md#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.md#createjointplaceholders)
* [polygonal.createMeshFromDefinition](./polygonal_functions.md#createmeshfromdefinition)
* [polygonal.createMeshFromDefinitions](./polygonal_functions.md#createmeshfromdefinitions)
* [polygonal.createMeshFromText](./polygonal_functions.md#createmeshfromtext)
* [polygonal.createMeshesFromDefinitions](./polygonal_functions.md#createmeshesfromdefinitions)
* [polygonal.getJointPlaceholders](./polygonal_functions.md#getjointplaceholders)
* [polygonal.getMeshDefinition](./polygonal_functions.md#getmeshdefinition)
* [polygonal.getMeshDefinitions](./polygonal_functions.md#getmeshdefinitions)
* [polygonal.getMeshSkinning](./polygonal_functions.md#getmeshskinning)
* [polygonal.hasMeshJoints](./polygonal_functions.md#hasmeshjoints)
* [polygonal.hasNormalizedUVs](./polygonal_functions.md#hasnormalizeduvs)
* [polygonal.setMeshSkinning](./polygonal_functions.md#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.md#staticmesh) | mesh   |                        |
| [JointList](./polygonal_types.md#jointlist)   | joints |                        |
| [Matrix4List](./geom_types.md#matrix4list)    | IBMs   | Inverse Bind Matrices. |

See also:

* [polygonal.createJointPlaceholders](./polygonal_functions.md#createjointplaceholders)
* [polygonal.createMeshFromDefinition](./polygonal_functions.md#createmeshfromdefinition)
* [polygonal.createMeshFromDefinitions](./polygonal_functions.md#createmeshfromdefinitions)
* [polygonal.createMeshFromText](./polygonal_functions.md#createmeshfromtext)
* [polygonal.createMeshesFromDefinitions](./polygonal_functions.md#createmeshesfromdefinitions)
* [polygonal.getJointPlaceholders](./polygonal_functions.md#getjointplaceholders)
* [polygonal.getMeshDefinition](./polygonal_functions.md#getmeshdefinition)
* [polygonal.getMeshDefinitions](./polygonal_functions.md#getmeshdefinitions)
* [polygonal.getMeshSkinning](./polygonal_functions.md#getmeshskinning)
* [polygonal.hasMeshJoints](./polygonal_functions.md#hasmeshjoints)
* [polygonal.hasNormalizedUVs](./polygonal_functions.md#hasnormalizeduvs)
* [polygonal.hasUVs](./polygonal_functions.md#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.md#point3list)   | points  | The set of points to triangulate.                                       |
| [Vector3List](./geom_types.md#vector3list) | normals | The normals associated to the points to triangulate. This can be empty. |

Returns

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