Microsoft DirectX 8.0 (Visual Basic)

ポイント リスト

ポイント リストとは、個々のポイントとしてレンダリングされる頂点の集合である。アプリケーションでは、星のフィールドまたはポリゴンのサーフェス上の点線に、3D シーンのポイント リストを使用できる。

次の図は、レンダリングされるポイント リストを示している。

ポイント リストにはマテリアルとテクスチャを適用できる。マテリアルまたはテクスチャの色は、描画されたポイントでのみ表示され、ポイントとポイントの間には表示されない。

次のコードは、ポイント リストに対して頂点を作成する方法を示している。

Private Type CUSTOMVERTEX
    x As Single
    y As Single
    z As Single
End Type

Dim Vertices(5) As CUSTOMVERTEX
With Vertices(0): .x = -5.0: .y = -5.0: .z = 0.0: End With
With Vertices(1): .x =  0.0: .y =  5.0: .z = 0.0: End With
With Vertices(2): .x =  5.0: .y = -5.0: .z = 0.0: End With
With Vertices(3): .x = 10.0: .y =  5.0: .z = 0.0: End With
With Vertices(4): .x = 15.0: .y = -5.0: .z = 0.0: End With
With Vertices(5): .x = 20.0: .y =  5.0: .z = 0.0: End With