Asset Transformer SDK (ex Pixyz) PolygonalInterface Class
Read time 6 minutes
Last updated 21 hours ago Inheritance
Inherited Members
Namespace: UnityEngine.Pixyz.Polygonal
public class PolygonalInterface : Interface
Methods
GetLastError
public static string GetLastError()
Returns
ConfigureFunctionLogger
[HandleProcessCorruptedStateExceptions] public void ConfigureFunctionLogger(string functionName, bool enableFunction, bool enableParameters, bool enableExecutionTime)
Parameters
Type Name Description string functionName bool enableFunction bool enableParameters bool enableExecutionTime
GetPolygonCount
Returns the number of polygon of a mesh.
[HandleProcessCorruptedStateExceptions] public ulong GetPolygonCount(uint mesh, bool asTriangleCount = false)
Parameters
Type Name Description uint mesh The mesh. bool asTriangleCount If true count the equivalent of triangles for each polygon.
Returns
ComputeMeshTopoChecksum
Compute a checksum of the mesh topology, connectivity.
[HandleProcessCorruptedStateExceptions] public string ComputeMeshTopoChecksum(uint mesh)
Parameters
Type Name Description uint mesh The mesh.
Returns
ComputeMeshVertexPositionsChecksum
Compute a checksum of the mesh vertices positions.
[HandleProcessCorruptedStateExceptions] public string ComputeMeshVertexPositionsChecksum(uint mesh, int precisionFloat = -1)
Parameters
Type Name Description uint mesh The mesh. int precisionFloat Floating point precision [1..24], number of significant numbers kept. -1 means no rounded will be applied.
Returns
ComputeUVTopoChecksum
Compute a checksum of the uvs topology, connectivity.
[HandleProcessCorruptedStateExceptions] public string ComputeUVTopoChecksum(uint mesh, int uvChannel)
Parameters
Type Name Description uint mesh The mesh. int uvChannel The uv channel.
Returns
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 uint 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
DracoDecode
Decode a mesh using draco.
[HandleProcessCorruptedStateExceptions] public uint DracoDecode(ByteList buffer, int jointIndicesId = -1, int jointWeightsId = -1)
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
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 uint 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
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 ULongList data Create as much joints as there are data, each joint store one data. Matrix4List worldMatrices World matrix for each joints.
Returns
CreateMeshFromDefinition
Create a new mesh with the given MeshDefinition.
[HandleProcessCorruptedStateExceptions] public uint CreateMeshFromDefinition(MeshDefinition meshDefinition)
Parameters
Returns
CreateMeshFromDefinitions
Create a new mesh from multiple MeshDefinition.
[HandleProcessCorruptedStateExceptions] public uint CreateMeshFromDefinitions(MeshDefinitionList meshDefinition)
Parameters
Returns
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 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
CreateMeshesFromDefinitions
Create new meshes with the given MeshDefinitions.
[HandleProcessCorruptedStateExceptions] public MeshList CreateMeshesFromDefinitions(MeshDefinitionList meshDefinitions)
Parameters
Returns
GetJointPlaceholders
Get data stored in joint placeholders.
[HandleProcessCorruptedStateExceptions] public ULongList GetJointPlaceholders(PlaceholderJointList joints)
Parameters
Returns
GetMeshDefinition
Returns the mesh definition.
[HandleProcessCorruptedStateExceptions] public MeshDefinition GetMeshDefinition(uint mesh)
Parameters
Type Name Description uint mesh The mesh to get definition.
Returns
GetMeshDefinitions
Returns the meshes definitions.
[HandleProcessCorruptedStateExceptions] public MeshDefinitionList GetMeshDefinitions(MeshList meshes)
Parameters
Type Name Description MeshList meshes The meshes to get definitions.
Returns
GetMeshSkinning
Returns the joints/IBMs list of a given mesh (those referenced by jointIndices).
[HandleProcessCorruptedStateExceptions] public GetMeshSkinningReturn GetMeshSkinning(uint mesh)
Parameters
Type Name Description uint mesh
Returns
HasMeshJoints
Check if the mesh has joints.
[HandleProcessCorruptedStateExceptions] public bool HasMeshJoints(uint mesh)
Parameters
Type Name Description uint mesh The Mesh.
Returns
HasNormalizedUVs
Check if the provided mesh UV channel contains normalized texture coordinates.
[HandleProcessCorruptedStateExceptions] public bool HasNormalizedUVs(uint mesh, int channel)
Parameters
Type Name Description uint mesh The mesh that needs to be checked. int channel The channel to verity. If set to -1, all channels are checked.
Returns
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 uint mesh The mesh to check. int channel The UV channel to check, or -1 for any.
Returns
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
UsePointGapFillerNormal
This triangulates a set of points and normals.
[HandleProcessCorruptedStateExceptions] public IntList UsePointGapFillerNormal(Point3List points, Vector3List normals)
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