Click or drag to resize
Ab4d.SharpEngine logo

MeshAnalyzerTryCreate Method

TryCreate method tries to create a MeshAnalyzer from the specified mesh.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntax
C#
public static MeshAnalyzer? TryCreate(
	Mesh mesh
)

Parameters

mesh  Mesh
Mesh

Return Value

MeshAnalyzer
Created MeshAnalyzer or null if mesh does not provide positions and triangle indices.
Remarks

TryCreate method tries to create a MeshAnalyzer from the specified mesh.

If Mesh is a StandardMesh then the MeshAnalyzer is created directly from the mesh.

Otherwise the GetDataChannelArrayT(MeshDataChannelTypes) is called to retrieve the positions and triangle indices from the mesh (note that this may require copying of data). If the positions and triangle indices cannot be retrieved then null is returned.

See Also