次の方法で共有


Mesh.Validate(GraphicsStream)

Validate メソッド

使用例

  • メッシュの検証

メッシュを検証する。

定義

Visual Basic Public Sub Validate( _
    ByVal adjacency As GraphicsStream _
)
C# public void Validate(
    GraphicsStream adjacency
);
Managed C++ public: void Validate(
    GraphicsStreamadjacency
);
JScript public function Validate(
    adjacency : GraphicsStream
) : void;

パラメータ

adjacency Microsoft.DirectX.Direct3D.GraphicsStream.

使用例

メッシュの検証

この例では、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);

対象

Mesh

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