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: 3.1.9316+94bbd23b55747f096f056a5602f7dd90558b3673
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