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: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
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