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

Compute a checksum of the mesh topology, connectivity

polygonal.computeMeshTopoChecksum(mesh) -> core.String

Parameters

mesh Mesh

The mesh

Returns

String

The mesh

computeMeshVertexPositionsChecksum

Compute a checksum of the mesh vertices positions

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

Compute a checksum of the uvs topology, connectivity

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

Parameters

mesh Mesh

The mesh

uvChannel Int

The uv channel

Returns

String

The mesh

computeUVVertexPositionsChecksum

Compute a checksum of the vertices positions in uv space

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

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

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

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

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)

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

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

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

Create a new mesh with the given MeshDefinition

polygonal.createMeshFromDefinition(meshDefinition) -> polygonal.Mesh

Parameters

meshDefinition MeshDefinition

Mesh definition

Returns

Mesh

The new mesh

createMeshesFromDefinitions

Create new meshes with the given MeshDefinitions

polygonal.createMeshesFromDefinitions(meshDefinitions) -> polygonal.MeshList

Parameters

meshDefinitions MeshDefinitionList

The MeshDefinitions

Returns

MeshList

The new Meshes

getEdgePolygons

Returns the polygons connected to an edge

polygonal.getEdgePolygons(edge) -> polygonal.PolygonList

Parameters

edge Edge

The edge

Returns

PolygonList

The edge polygons

getEdgeVertices

Returns the vertices of an edge

polygonal.getEdgeVertices(edge) -> polygonal.VertexList

Parameters

edge Edge

The edge

Returns

VertexList

The edge vertices

getEdges

Returns the edges corresponding to the given connectivity

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

Parameters

tessellation Tessellation

The tessellation

category TopologyCategoryMask

Category mask of the wanted edges

Returns

EdgeList

The edges

getFreeEdges

Returns the free edges of a tessellation

polygonal.getFreeEdges(tessellation) -> polygonal.EdgeList

Parameters

tessellation Tessellation

The tessellation

Returns

EdgeList

All free edges of the tessellation

getFreeVertices

Returns the free vertices of a tessellation

polygonal.getFreeVertices(tessellation) -> polygonal.VertexList

Parameters

tessellation Tessellation

The tessellation

Returns

VertexList

All free vertices of the tessellation

getJointPlaceholders

Get data stored in joint placeholders

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

Returns the definition

polygonal.getMeshDefinition(mesh) -> polygonal.MeshDefinition

Parameters

mesh Mesh

The mesh to get definition

Returns

MeshDefinition

Mesh definition

getMeshDefinitions

Returns the definition

polygonal.getMeshDefinitions(meshes) -> polygonal.MeshDefinitionList

Parameters

meshes MeshList

The meshes to get definitions

Returns

MeshDefinitionList

The MeshDefinitions

getMeshSkinning

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

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

Parameters

mesh StaticMesh

Returns

JointList

getPatches

Returns the patches of a tessellation

polygonal.getPatches(tessellation) -> polygonal.PatchList

Parameters

tessellation Tessellation

The tessellation

Returns

PatchList

All patches of the tessellation

getPolygonEdges

Returns the edges of a a polygon

polygonal.getPolygonEdges(polygon) -> polygonal.EdgeList

Parameters

polygon Polygon

The polygon

Returns

EdgeList

The polygon edges

getPolygonVertices

Returns the vertices of a a polygon

polygonal.getPolygonVertices(polygon) -> polygonal.VertexList

Parameters

polygon Polygon

The polygon

Returns

VertexList

The polygon vertices

getPolygons

Returns the polygons of a tessellation

polygonal.getPolygons(tessellation) -> polygonal.PolygonList

Parameters

tessellation Tessellation

The tessellation

Returns

PolygonList

All polygons of the tessellation

getTessellationBoundaries

Get boundary edges of a tessellation grouped by cycles

polygonal.getTessellationBoundaries(tessellation) -> polygonal.EdgeListList

Parameters

tessellation Tessellation

The Tessellation

Returns

EdgeListList

List of boundary edges grouped by cycles in the given tessellation

getVertexCoordinates

Returns the vertex coordinates in the tessellation local space

polygonal.getVertexCoordinates(vertex) -> geom.Point3

Parameters

vertex Vertex

The vertex

Returns

Point3

Vertex coordinates

getVertexEdges

Returns the edges connected to a vertex

polygonal.getVertexEdges(vertex) -> polygonal.EdgeList

Parameters

vertex Vertex

The vertex

Returns

EdgeList

The vertex edges

getVertexPolygons

Returns the polygons connected to a vertex

polygonal.getVertexPolygons(vertex) -> polygonal.PolygonList

Parameters

vertex Vertex

The vertex

Returns

PolygonList

The vertex polygons

getVertices

Returns the vertices of a tessellation

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

Check if the mesh has joints

polygonal.hasMeshJoints(mesh) -> core.Bool

Parameters

mesh Mesh

The Mesh

Returns

Bool

Return True if the mesh contains joints

setMeshSkinning

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

polygonal.setMeshSkinning(mesh, joints, IBMs)

Parameters

mesh StaticMesh
joints JointList
IBMs Matrix4List

Inverse Bind Matrices

destroyElements

Destroy all the given elements

polygonal.destroyElements(elements)

Parameters

elements ElementList

List of elements to destroy

invertElements

Invert the orientation of all the given elements

polygonal.invertElements(elements)

Parameters

elements ElementList

List of elements to invert