FixedPoint 構造体
アセンブリ: Microsoft.WindowsMobile.DirectX (microsoft.windowsmobile.directx.dll 内)


この構造体は、固定小数点のインターフェイスを持つ Windows Mobile Direct 3D のさまざまな型と相互運用するために使用されます。このクラスの内部処理形式は、Int32 構造体です。

FixedPoint 構造体を使用する方法の例を次に示します。
' The following code is from the ' Direct3D Mobile Fixed Point Billboard Sample. ' It uses FixedPoint to position meshes of trees randomly. ' Initialize the tree data Dim i As Integer For i = 0 To numberTrees - 1 Dim t As New Tree() ' Position the trees randomly Do Dim fTheta As Single = 2.0F * _ System.Convert.ToSingle(Math.PI) * _ System.Convert.ToSingle(rand.NextDouble()) Dim fRadius As Single = 25.0F + 55.0F * _ System.Convert.ToSingle(rand.NextDouble()) Dim position As Vector3Fixed position.X = CType(fRadius * _ System.Convert.ToSingle( _ Math.Sin(fTheta)), FixedPoint) position.Z = CType(fRadius * _ System.Convert.ToSingle(Math.Cos(fTheta)), FixedPoint) position.Y = CType(HeightField( _ System.Convert.ToSingle(position.X), _ System.Convert.ToSingle(position.Z)), FixedPoint) t.Position = position Loop While Not IsTreePositionValid(t.Position)
// The following code is from the // Direct3D Mobile Fixed Point Billboard Sample. // It uses FixedPoint to position meshes of trees randomly. // Initialize the tree data for (int i=0; i<numberTrees; i++) { Tree t = new Tree(); do { float fTheta = 2.0f * (float)Math.PI * (float)rand.NextDouble(); float fRadius = 25.0f + 55.0f * (float)rand.NextDouble(); Vector3Fixed position; position.X = (FixedPoint)(fRadius * (float)Math.Sin(fTheta)); position.Z = (FixedPoint)(fRadius * (float)Math.Cos(fTheta)); position.Y = (FixedPoint)HeightField((float)position.X, (float)position.Z); t.Position = position; } while (!IsTreePositionValid(t.Position));


Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- FixedPoint 構造体のページへのリンク