CustomVertex.PositionNormalTextured.Ny
Ny フィールド
使用例
- テクスチャ マップ化オブジェクト用頂点バッファの作成
定義
Visual Basic | Public Ny As Single |
C# | public Single Ny; |
Managed C++ | public: Single Ny; |
JScript | public var Ny() : Single |
フィールド値
System.Single.
これは読み取り/書き込み可能フィールドである。
使用例
テクスチャ マップ化オブジェクト用頂点バッファの作成
この例では、テクスチャ マップ化された Microsoft® Direct3D® オブジェクトを表現する、定義済み頂点構造体を作成する方法を示す。
CustomVertex クラスで利用可能な 11 種類の構造体を、さまざまな種類の 3D オブジェクトの頂点バッファ表現に使うことができる。この場合、各頂点について PositionNormalTextured 構造体は、 (Tu, Nz) テクスチャ座標だけでなく、(Nx, Ny, Nz) 法線ベクトルを格納する。
public void OnCreateVertexBuffer(object sender, EventArgs e)
{
VertexBuffer vb = (VertexBuffer)sender;
// Create a vertex buffer.
// Lock the buffer to be able to return filled structures
CustomVertex.PositionNormalTextured[] verts =
(CustomVertex.PositionNormalTextured[])vb.Lock(0,0);
// Fill the PositionNormalTextured structures with the
// 3-D object representation.
// When finished, unlock the vertex buffer to allow CPU access again.
}
対象
© 2002 Microsoft Corporation. All rights reserved. Terms of use.