Documentation

Support

Asset Transformer SDK


User Manual

Python API

C# API

Changelog

Discussions

Asset Transformer SDK

PolygonalInterface

Class
Read time 6 minutesLast updated 21 hours ago

Inheritance
Inherited Members
Namespace: UnityEngine.Pixyz.Polygonal
public class PolygonalInterface : Interface

Methods

GetLastError

public static string GetLastError()
Returns

Type

Description

string

ConfigureFunctionLogger

[HandleProcessCorruptedStateExceptions]public void ConfigureFunctionLogger(string functionName, bool enableFunction, bool enableParameters, bool enableExecutionTime)
Parameters

Type

Name

Description

stringfunctionName
boolenableFunction
boolenableParameters
boolenableExecutionTime

GetPolygonCount

Returns the number of polygon of a mesh.
[HandleProcessCorruptedStateExceptions]public ulong GetPolygonCount(uint mesh, bool asTriangleCount = false)
Parameters

Type

Name

Description

uintmeshThe mesh.
boolasTriangleCountIf true count the equivalent of triangles for each polygon.
Returns

Type

Description

ulong

ComputeMeshTopoChecksum

Compute a checksum of the mesh topology, connectivity.
[HandleProcessCorruptedStateExceptions]public string ComputeMeshTopoChecksum(uint mesh)
Parameters

Type

Name

Description

uintmeshThe mesh.
Returns

Type

Description

string

ComputeMeshVertexPositionsChecksum

Compute a checksum of the mesh vertices positions.
[HandleProcessCorruptedStateExceptions]public string ComputeMeshVertexPositionsChecksum(uint mesh, int precisionFloat = -1)
Parameters

Type

Name

Description

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

Type

Description

string

ComputeUVTopoChecksum

Compute a checksum of the uvs topology, connectivity.
[HandleProcessCorruptedStateExceptions]public string ComputeUVTopoChecksum(uint mesh, int uvChannel)
Parameters

Type

Name

Description

uintmeshThe mesh.
intuvChannelThe uv channel.
Returns

Type

Description

string

ComputeUVVertexPositionsChecksum

Compute a checksum of the vertices positions in uv space.
[HandleProcessCorruptedStateExceptions]public string ComputeUVVertexPositionsChecksum(uint mesh, int uvChannel, int precisionFloat = -1)
Parameters

Type

Name

Description

uintmeshThe mesh.
intuvChannelThe uv channel.
intprecisionFloatFloating point precision [1..24], number of significant numbers kept. -1 means no rounded will be applied.
Returns

Type

Description

string

DracoDecode

Decode a mesh using draco.
[HandleProcessCorruptedStateExceptions]public uint DracoDecode(ByteList buffer, int jointIndicesId = -1, int jointWeightsId = -1)
Parameters

Type

Name

Description

ByteListbuffer
intjointIndicesIdUnique ID of Generic attribute encoding joint indices.
intjointWeightsIdUnique ID of Generic attribute encoding joint weights.
Returns

Type

Description

uint

DracoEncode

Encode a mesh using draco.
[HandleProcessCorruptedStateExceptions]public DracoEncodeReturn DracoEncode(uint mesh, int compressionLevel = 7, int quantizationPosition = -1, int quantizationNormal = -1, int quantizationTexCoord = -1)
Parameters

Type

Name

Description

uintmesh
intcompressionLevel0=faster but the worst compression, 10=slower but the best compression.
intquantizationPositionNumber of quantization bits used for position attributes.
intquantizationNormalNumber of quantization bits used for normal attributes.
intquantizationTexCoordNumber of quantization bits used for texture coordinates attributes.
Returns

Type

Description

DracoEncodeReturn

CreateJointPlaceholders

Create fake joint to store in mesh definitions. Thus we can retrieve stored data from getJointPlaceholders.
[HandleProcessCorruptedStateExceptions]public PlaceholderJointList CreateJointPlaceholders(ULongList data, Matrix4List worldMatrices)
Parameters

Type

Name

Description

ULongListdataCreate as much joints as there are data, each joint store one data.
Matrix4ListworldMatricesWorld matrix for each joints.
Returns

Type

Description

PlaceholderJointList

CreateMeshFromDefinition

Create a new mesh with the given MeshDefinition.
[HandleProcessCorruptedStateExceptions]public uint CreateMeshFromDefinition(MeshDefinition meshDefinition)
Parameters

Type

Name

Description

MeshDefinitionmeshDefinitionMesh definition.
Returns

Type

Description

uint

CreateMeshFromDefinitions

Create a new mesh from multiple MeshDefinition.
[HandleProcessCorruptedStateExceptions]public uint CreateMeshFromDefinitions(MeshDefinitionList meshDefinition)
Parameters

Type

Name

Description

MeshDefinitionListmeshDefinitionThe MeshDefinitions.
Returns

Type

Description

uint

CreateMeshFromText

Creates an occurrence from string.
[HandleProcessCorruptedStateExceptions]public CreateMeshFromTextReturn CreateMeshFromText(string text, Matrix4 matrix, string font = "ChicFont", int fontSize = 64, ColorAlpha? color = null, double heigth3D = 40)
Parameters

Type

Name

Description

stringtextText to create.
Matrix4matrixA matrix to apply on mesh.
stringfontThe font to use.
intfontSizeThe font size.
ColorAlphacolorThe occurrence color.
doubleheigth3D3D height of text.
Returns

CreateMeshesFromDefinitions

Create new meshes with the given MeshDefinitions.
[HandleProcessCorruptedStateExceptions]public MeshList CreateMeshesFromDefinitions(MeshDefinitionList meshDefinitions)
Parameters

Type

Name

Description

MeshDefinitionListmeshDefinitionsThe MeshDefinitions.
Returns

Type

Description

MeshList

GetJointPlaceholders

Get data stored in joint placeholders.
[HandleProcessCorruptedStateExceptions]public ULongList GetJointPlaceholders(PlaceholderJointList joints)
Parameters

Type

Name

Description

PlaceholderJointListjointsPlaceholder joints to get data from.
Returns

Type

Description

ULongList

GetMeshDefinition

Returns the mesh definition.
[HandleProcessCorruptedStateExceptions]public MeshDefinition GetMeshDefinition(uint mesh)
Parameters

Type

Name

Description

uintmeshThe mesh to get definition.
Returns

Type

Description

MeshDefinition

GetMeshDefinitions

Returns the meshes definitions.
[HandleProcessCorruptedStateExceptions]public MeshDefinitionList GetMeshDefinitions(MeshList meshes)
Parameters

Type

Name

Description

MeshListmeshesThe meshes to get definitions.
Returns

Type

Description

MeshDefinitionList

GetMeshSkinning

Returns the joints/IBMs list of a given mesh (those referenced by jointIndices).
[HandleProcessCorruptedStateExceptions]public GetMeshSkinningReturn GetMeshSkinning(uint mesh)
Parameters

Type

Name

Description

uintmesh
Returns

Type

Description

GetMeshSkinningReturn

HasMeshJoints

Check if the mesh has joints.
[HandleProcessCorruptedStateExceptions]public bool HasMeshJoints(uint mesh)
Parameters

Type

Name

Description

uintmeshThe Mesh.
Returns

Type

Description

bool

HasNormalizedUVs

Check if the provided mesh UV channel contains normalized texture coordinates.
[HandleProcessCorruptedStateExceptions]public bool HasNormalizedUVs(uint mesh, int channel)
Parameters

Type

Name

Description

uintmeshThe mesh that needs to be checked.
intchannelThe channel to verity. If set to -1, all channels are checked.
Returns

Type

Description

bool

HasUVs

Check if one or some UV channels are defined in the mesh.
[HandleProcessCorruptedStateExceptions]public bool HasUVs(uint mesh, int channel = -1)
Parameters

Type

Name

Description

uintmeshThe mesh to check.
intchannelThe UV channel to check, or -1 for any.
Returns

Type

Description

bool

SetMeshSkinning

Set/Replace the list of joints/IBMs of a given mesh (those referenced by jointIndices).
[HandleProcessCorruptedStateExceptions]public void SetMeshSkinning(uint mesh, JointList joints, Matrix4List IBMs)
Parameters

Type

Name

Description

uintmesh
JointListjoints
Matrix4ListIBMsInverse Bind Matrices.

UsePointGapFillerNormal

This triangulates a set of points and normals.
[HandleProcessCorruptedStateExceptions]public IntList UsePointGapFillerNormal(Point3List points, Vector3List normals)
Parameters

Type

Name

Description

Point3ListpointsThe set of points to triangulate.
Vector3ListnormalsThe normals associated to the points to triangulate. This can be empty.
Returns

Type

Description

IntList