Table of Contents

Class Polygonal

Namespace
Polygonal

Methods

configureFunctionLogger

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

Parameters

functionName String
enableFunction Boolean
enableParameters Boolean
enableExecutionTime Boolean

computeMeshTopoChecksum

polygonal.computeMeshTopoChecksum(mesh) -> core.String

Parameters

mesh Mesh

The mesh

Returns

String

The mesh

computeMeshVertexPositionsChecksum

polygonal.computeMeshVertexPositionsChecksum(mesh, precisionFloat) -> core.String

Parameters

mesh Mesh

The mesh

precisionFloat Int

Floating point precision [1..24], number of significant numbers kept. -1 means no rounded will be applied

Returns

String

The mesh

computeUVTopoChecksum

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

Parameters

mesh Mesh

The mesh

uvChannel Int

The uv channel

Returns

String

The mesh

computeUVVertexPositionsChecksum

polygonal.computeUVVertexPositionsChecksum(mesh, uvChannel, precisionFloat) -> core.String

Parameters

mesh Mesh

The mesh

uvChannel Int

The uv channel

precisionFloat Int

Floating point precision [1..24], number of significant numbers kept. -1 means no rounded will be applied

Returns

String

The mesh

dracoDecode

decode a mesh using draco

See also:

polygonal.dracoDecode(buffer, jointIndicesId, jointWeightsId) -> polygonal.StaticMesh

Parameters

buffer ByteList
jointIndicesId Int

Unique ID of Generic attribute encoding joint indices

jointWeightsId Int

Unique ID of Generic attribute encoding joint weights

Returns

StaticMesh

dracoEncode

encode a mesh using draco

See also:

polygonal.dracoEncode(mesh, compressionLevel, quantizationPosition, quantizationNormal, quantizationTexCoord) -> core.ByteList, core.Int, core.Int

Parameters

mesh StaticMesh
compressionLevel Int

0=faster but the worst compression, 10=slower but the best compression

quantizationPosition Int

Number of quantization bits used for position attributes

quantizationNormal Int

Number of quantization bits used for normal attributes

quantizationTexCoord Int

Number of quantization bits used for texture coordinates attributes

Returns

ByteList

getNormal

Return the normal attribute of a polygon at a specified vertex

See also:

polygonal.getNormal(Polygon, Vertex) -> geom.Vector3

Parameters

Polygon Polygon

The polygon

Vertex Vertex

The vertex

Returns

Vector3

The normal

getTextureCoordinates

Return the texture coordinates attribute of all the polygons from the tessellation

See also:

polygonal.getTextureCoordinates(tessellation) -> polygonal.UVCoordList

Parameters

tessellation Tessellation

The tessellation of the wanted polygons

Returns

UVCoordList

The textures coordinates

getVisiblePolygons

return the visible polygons from the Visibility attributes (see algo.createVisibilityAttributes)

See also:

polygonal.getVisiblePolygons(tessellation) -> polygonal.PolygonList, core.IntList

Parameters

tessellation Tessellation

The tessellation of the wanted polygons

Returns

PolygonList

The polygons seen at least once

createJointPlaceholders

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

Parameters

data ULongList

Create as much joints as there are data, each joint store one data

worldMatrices Matrix4List

World matrix for each joints

Returns

PlaceholderJointList

Returns one placeholder joint per given data

createMeshFromDefinition

polygonal.createMeshFromDefinition(meshDefinition) -> polygonal.Mesh

Parameters

meshDefinition MeshDefinition

Mesh definition

Returns

Mesh

The new mesh

createMeshFromDefinitions

polygonal.createMeshFromDefinitions(meshDefinition) -> polygonal.Mesh

Parameters

meshDefinition MeshDefinitionList

The MeshDefinitions

Returns

Mesh

The new mesh

createMeshesFromDefinitions

polygonal.createMeshesFromDefinitions(meshDefinitions) -> polygonal.MeshList

Parameters

meshDefinitions MeshDefinitionList

The MeshDefinitions

Returns

MeshList

The new Meshes

getEdgePolygons

polygonal.getEdgePolygons(edge) -> polygonal.PolygonList

Parameters

edge Edge

The edge

Returns

PolygonList

The edge polygons

getEdgeVertices

polygonal.getEdgeVertices(edge) -> polygonal.VertexList

Parameters

edge Edge

The edge

Returns

VertexList

The edge vertices

getEdges

polygonal.getEdges(tessellation, category) -> polygonal.EdgeList

Parameters

tessellation Tessellation

The tessellation

category TopologyCategoryMask

Category mask of the wanted edges

Returns

EdgeList

The edges

getFreeEdges

polygonal.getFreeEdges(tessellation) -> polygonal.EdgeList

Parameters

tessellation Tessellation

The tessellation

Returns

EdgeList

All free edges of the tessellation

getFreeVertices

polygonal.getFreeVertices(tessellation) -> polygonal.VertexList

Parameters

tessellation Tessellation

The tessellation

Returns

VertexList

All free vertices of the tessellation

getJointPlaceholders

polygonal.getJointPlaceholders(joints) -> core.ULongList

Parameters

joints PlaceholderJointList

Placeholder joints to get data from

Returns

ULongList

Data stored in each placehold joint (for invalid joint, returned data is undefined)

getMeshDefinition

polygonal.getMeshDefinition(mesh) -> polygonal.MeshDefinition

Parameters

mesh Mesh

The mesh to get definition

Returns

MeshDefinition

Mesh definition

getMeshDefinitions

polygonal.getMeshDefinitions(meshes) -> polygonal.MeshDefinitionList

Parameters

meshes MeshList

The meshes to get definitions

Returns

MeshDefinitionList

The MeshDefinitions

getMeshSkinning

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

Parameters

mesh StaticMesh

Returns

JointList

getPatches

polygonal.getPatches(tessellation) -> polygonal.PatchList

Parameters

tessellation Tessellation

The tessellation

Returns

PatchList

All patches of the tessellation

getPolygonEdges

polygonal.getPolygonEdges(polygon) -> polygonal.EdgeList

Parameters

polygon Polygon

The polygon

Returns

EdgeList

The polygon edges

getPolygonVertices

polygonal.getPolygonVertices(polygon) -> polygonal.VertexList

Parameters

polygon Polygon

The polygon

Returns

VertexList

The polygon vertices

getPolygons

polygonal.getPolygons(tessellation) -> polygonal.PolygonList

Parameters

tessellation Tessellation

The tessellation

Returns

PolygonList

All polygons of the tessellation

getTessellationBoundaries

polygonal.getTessellationBoundaries(tessellation) -> polygonal.EdgeListList

Parameters

tessellation Tessellation

The Tessellation

Returns

EdgeListList

List of boundary edges grouped by cycles in the given tessellation

getVertexCoordinates

polygonal.getVertexCoordinates(vertex) -> geom.Point3

Parameters

vertex Vertex

The vertex

Returns

Point3

Vertex coordinates

getVertexEdges

polygonal.getVertexEdges(vertex) -> polygonal.EdgeList

Parameters

vertex Vertex

The vertex

Returns

EdgeList

The vertex edges

getVertexPolygons

polygonal.getVertexPolygons(vertex) -> polygonal.PolygonList

Parameters

vertex Vertex

The vertex

Returns

PolygonList

The vertex polygons

getVertices

polygonal.getVertices(tessellation, category) -> polygonal.VertexList

Parameters

tessellation Tessellation

The tessellation

category TopologyCategoryMask

Category mask of the wanted edges

Returns

VertexList

All vertices of the tessellation

hasMeshJoints

polygonal.hasMeshJoints(mesh) -> core.Bool

Parameters

mesh Mesh

The Mesh

Returns

Bool

Return True if the mesh contains joints

setMeshSkinning

polygonal.setMeshSkinning(mesh, joints, IBMs)

Parameters

mesh StaticMesh
joints JointList
IBMs Matrix4List

Inverse Bind Matrices

destroyElements

Destroy all the given elements

See also:

polygonal.destroyElements(elements)

Parameters

elements ElementList

List of elements to destroy

invertElements

Invert the orientation of all the given elements

See also:

polygonal.invertElements(elements)

Parameters

elements ElementList

List of elements to invert

usePointGapFillerNormal

This triangulates a set of points and normals

See also:

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

Parameters

points Point3List

The set of points to triangulate

normals Vector3List

The normals associated to the points to triangulate. This can be empty

Returns

IntList

The indexes of the points from the given array arranged as triangles