Class Polygonal
Inheritance
Namespace:
Syntax
Methods
configureFunctionLogger
Declaration
polygonal.configureFunctionLogger(functionName, enableFunction, enableParameters, enableExecutionTime)
Parameters
Type | Name | Description |
---|---|---|
String | functionName | |
Boolean | enableFunction | |
Boolean | enableParameters | |
Boolean | enableExecutionTime |
computeMeshTopoChecksum
Compute a checksum of the mesh topology, connectivity
See also:
Declaration
polygonal.computeMeshTopoChecksum(mesh) -> core.String
Parameters
Type | Name | Description |
---|---|---|
Mesh | mesh | The mesh |
Returns
Type | Description |
---|---|
String | The mesh |
computeMeshVertexPositionsChecksum
Compute a checksum of the mesh vertices positions
See also:
Declaration
polygonal.computeMeshVertexPositionsChecksum(mesh, precisionFloat) -> core.String
Parameters
Type | Name | Description |
---|---|---|
Mesh | mesh | The mesh |
Int | precisionFloat | Floating point precision [1..24], number of significant numbers kept. -1 means no rounded will be applied |
Returns
Type | Description |
---|---|
String | The mesh |
computeUVTopoChecksum
Compute a checksum of the uvs topology, connectivity
See also:
Declaration
polygonal.computeUVTopoChecksum(mesh, uvChannel) -> core.String
Parameters
Type | Name | Description |
---|---|---|
Mesh | mesh | The mesh |
Int | uvChannel | The uv channel |
Returns
Type | Description |
---|---|
String | The mesh |
computeUVVertexPositionsChecksum
Compute a checksum of the vertices positions in uv space
See also:
Declaration
polygonal.computeUVVertexPositionsChecksum(mesh, uvChannel, precisionFloat) -> core.String
Parameters
Type | Name | Description |
---|---|---|
Mesh | mesh | The mesh |
Int | uvChannel | The uv channel |
Int | precisionFloat | Floating point precision [1..24], number of significant numbers kept. -1 means no rounded will be applied |
Returns
Type | Description |
---|---|
String | The mesh |
dracoDecode
Declaration
polygonal.dracoDecode(buffer, jointIndicesId, jointWeightsId) -> polygonal.StaticMesh
Parameters
Type | Name | Description |
---|---|---|
ByteList | buffer | |
Int | jointIndicesId | Unique ID of Generic attribute encoding joint indices |
Int | jointWeightsId | Unique ID of Generic attribute encoding joint weights |
Returns
Type | Description |
---|---|
StaticMesh |
dracoEncode
Declaration
polygonal.dracoEncode(mesh, compressionLevel, quantizationPosition, quantizationNormal, quantizationTexCoord) -> core.ByteList, core.Int, core.Int
Parameters
Type | Name | Description |
---|---|---|
StaticMesh | mesh | |
Int | compressionLevel | 0=faster but the worst compression, 10=slower but the best compression |
Int | quantizationPosition | Number of quantization bits used for position attributes |
Int | quantizationNormal | Number of quantization bits used for normal attributes |
Int | quantizationTexCoord | Number of quantization bits used for texture coordinates attributes |
Returns
Type | Description |
---|---|
ByteList |
createJointPlaceholders
Create fake joint to store in mesh definitions. Thus we can retrieve stored data from getJointPlaceholders
See also:
- polygonal.createMeshFromDefinition
- polygonal.createMeshFromDefinitions
- polygonal.createMeshFromText
- polygonal.createMeshesFromDefinitions
- polygonal.getJointPlaceholders
- polygonal.getMeshDefinition
- polygonal.getMeshDefinitions
- polygonal.getMeshSkinning
- polygonal.hasMeshJoints
- polygonal.setMeshSkinning
Declaration
polygonal.createJointPlaceholders(data, worldMatrices) -> polygonal.PlaceholderJointList
Parameters
Type | Name | Description |
---|---|---|
ULongList | data | Create as much joints as there are data, each joint store one data |
Matrix4List | worldMatrices | World matrix for each joints |
Returns
Type | Description |
---|---|
PlaceholderJointList | Returns one placeholder joint per given data |
createMeshFromDefinition
Create a new mesh with the given MeshDefinition
See also:
- polygonal.createJointPlaceholders
- polygonal.createMeshFromDefinitions
- polygonal.createMeshFromText
- polygonal.createMeshesFromDefinitions
- polygonal.getJointPlaceholders
- polygonal.getMeshDefinition
- polygonal.getMeshDefinitions
- polygonal.getMeshSkinning
- polygonal.hasMeshJoints
- polygonal.setMeshSkinning
Declaration
polygonal.createMeshFromDefinition(meshDefinition) -> polygonal.Mesh
Parameters
Type | Name | Description |
---|---|---|
MeshDefinition | meshDefinition | Mesh definition |
Returns
Type | Description |
---|---|
Mesh | The new mesh |
createMeshFromDefinitions
Create a new mesh from multiple MeshDefinition
See also:
Declaration
polygonal.createMeshFromDefinitions(meshDefinition) -> polygonal.Mesh
Parameters
Type | Name | Description |
---|---|---|
MeshDefinitionList | meshDefinition | The MeshDefinitions |
Returns
Type | Description |
---|---|
Mesh | The new mesh |
createMeshFromText
Creates an occurrence from string
See also:
- polygonal.createJointPlaceholders
- polygonal.createMeshFromDefinition
- polygonal.createMeshFromDefinitions
- polygonal.createMeshesFromDefinitions
- polygonal.getJointPlaceholders
- polygonal.getMeshDefinition
- polygonal.getMeshDefinitions
- polygonal.getMeshSkinning
- polygonal.hasMeshJoints
- polygonal.setMeshSkinning
Declaration
polygonal.createMeshFromText(text, matrix, font, fontSize, color, heigth3D) -> polygonal.Mesh, material.Material
Parameters
Type | Name | Description |
---|---|---|
String | text | Text to create |
Matrix4 | matrix | A matrix to apply on mesh |
String | font | The font to use |
Int | fontSize | The font size |
ColorAlpha | color | The occurrence color |
Double | heigth3D | 3D height of text |
Returns
Type | Description |
---|---|
Mesh |
createMeshesFromDefinitions
Create new meshes with the given MeshDefinitions
See also:
Declaration
polygonal.createMeshesFromDefinitions(meshDefinitions) -> polygonal.MeshList
Parameters
Type | Name | Description |
---|---|---|
MeshDefinitionList | meshDefinitions | The MeshDefinitions |
Returns
Type | Description |
---|---|
MeshList | The new Meshes |
getJointPlaceholders
Get data stored in joint placeholders
See also:
- polygonal.createJointPlaceholders
- polygonal.createMeshFromDefinition
- polygonal.createMeshFromDefinitions
- polygonal.createMeshFromText
- polygonal.createMeshesFromDefinitions
- polygonal.getMeshDefinition
- polygonal.getMeshDefinitions
- polygonal.getMeshSkinning
- polygonal.hasMeshJoints
- polygonal.setMeshSkinning
Declaration
polygonal.getJointPlaceholders(joints) -> core.ULongList
Parameters
Type | Name | Description |
---|---|---|
PlaceholderJointList | joints | Placeholder joints to get data from |
Returns
Type | Description |
---|---|
ULongList | Data stored in each placehold joint (for invalid joint, returned data is undefined) |
getMeshDefinition
Returns the definition
See also:
- polygonal.createJointPlaceholders
- polygonal.createMeshFromDefinition
- polygonal.createMeshFromDefinitions
- polygonal.createMeshFromText
- polygonal.createMeshesFromDefinitions
- polygonal.getJointPlaceholders
- polygonal.getMeshDefinitions
- polygonal.getMeshSkinning
- polygonal.hasMeshJoints
- polygonal.setMeshSkinning
Declaration
polygonal.getMeshDefinition(mesh) -> polygonal.MeshDefinition
Parameters
Type | Name | Description |
---|---|---|
Mesh | mesh | The mesh to get definition |
Returns
Type | Description |
---|---|
MeshDefinition | Mesh definition |
getMeshDefinitions
Returns the definition
See also:
- polygonal.createJointPlaceholders
- polygonal.createMeshFromDefinition
- polygonal.createMeshFromDefinitions
- polygonal.createMeshFromText
- polygonal.createMeshesFromDefinitions
- polygonal.getJointPlaceholders
- polygonal.getMeshDefinition
- polygonal.getMeshSkinning
- polygonal.hasMeshJoints
- polygonal.setMeshSkinning
Declaration
polygonal.getMeshDefinitions(meshes) -> polygonal.MeshDefinitionList
Parameters
Type | Name | Description |
---|---|---|
MeshList | meshes | The meshes to get definitions |
Returns
Type | Description |
---|---|
MeshDefinitionList | The MeshDefinitions |
getMeshSkinning
Returns the joints/IBMs list of a given mesh (those referenced by jointIndices)
See also:
- polygonal.createJointPlaceholders
- polygonal.createMeshFromDefinition
- polygonal.createMeshFromDefinitions
- polygonal.createMeshFromText
- polygonal.createMeshesFromDefinitions
- polygonal.getJointPlaceholders
- polygonal.getMeshDefinition
- polygonal.getMeshDefinitions
- polygonal.hasMeshJoints
- polygonal.setMeshSkinning
Declaration
polygonal.getMeshSkinning(mesh) -> polygonal.JointList, geom.Matrix4List
Parameters
Type | Name | Description |
---|---|---|
StaticMesh | mesh |
Returns
Type | Description |
---|---|
JointList |
hasMeshJoints
Check if the mesh has joints
See also:
- polygonal.createJointPlaceholders
- polygonal.createMeshFromDefinition
- polygonal.createMeshFromDefinitions
- polygonal.createMeshFromText
- polygonal.createMeshesFromDefinitions
- polygonal.getJointPlaceholders
- polygonal.getMeshDefinition
- polygonal.getMeshDefinitions
- polygonal.getMeshSkinning
- polygonal.setMeshSkinning
Declaration
polygonal.hasMeshJoints(mesh) -> core.Bool
Parameters
Type | Name | Description |
---|---|---|
Mesh | mesh | The Mesh |
Returns
Type | Description |
---|---|
Bool | Return True if the mesh contains joints |
setMeshSkinning
Set/Replace the list of joints/IBMs of a given mesh (those referenced by jointIndices)
See also:
- polygonal.createJointPlaceholders
- polygonal.createMeshFromDefinition
- polygonal.createMeshFromDefinitions
- polygonal.createMeshFromText
- polygonal.createMeshesFromDefinitions
- polygonal.getJointPlaceholders
- polygonal.getMeshDefinition
- polygonal.getMeshDefinitions
- polygonal.getMeshSkinning
- polygonal.hasMeshJoints
Declaration
polygonal.setMeshSkinning(mesh, joints, IBMs)
Parameters
Type | Name | Description |
---|---|---|
StaticMesh | mesh | |
JointList | joints | |
Matrix4List | IBMs | Inverse Bind Matrices |
usePointGapFillerNormal
This triangulates a set of points and normals
Declaration
polygonal.usePointGapFillerNormal(points, normals) -> core.IntList
Parameters
Type | Name | Description |
---|---|---|
Point3List | points | The set of points to triangulate |
Vector3List | normals | The normals associated to the points to triangulate. This can be empty |
Returns
Type | Description |
---|---|
IntList | The indexes of the points from the given array arranged as triangles |