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.1.9680+a1b1e43de1ad9a7e35472c33948d688d7b40ef79
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