Share via


Mesh.Validate

Validate メソッド

使用例

  • メッシュの検証

メッシュを検証する。

オーバーロード リスト

public Void Validate (Int32[])
public Void Validate (Int32[], String)
public Void Validate (GraphicsStream)
public Void Validate (GraphicsStream, String)

使用例

メッシュの検証

この例では、Mesh オブジェクトについての GraphicsStream 検証情報を取得する方法を示す。

Mesh.Validate 検証メソッドは、GraphicsStream オブジェクトを返す。このオブジェクトを ProgressiveMesh(Mesh,GraphicsStream,GraphicsStream,Int32,MeshFlags) などの他のメソッドで使えば、グラフィック ストリーム内のメッシュ オブジェクトを正しく処理できる。

using Microsoft.DirectX.Direct3D;

protected Device device; // The rendering device
device = null;
Mesh pMesh = null;
GraphicsStream adj = null; // Graphics Stream object
ExtendedMaterial[] mtrl = null;

// Load the mesh from the specified file
pMesh = Mesh.FromFile("tiger.x", MeshFlags.Managed, device, out adj,out mtrl);

// Verify validity of mesh for simplification purposes
pMesh.Validate(adj);

© 2002 Microsoft Corporation. All rights reserved. Terms of use.