Share via


FixedPoint 構造体

[このドキュメントはプレビュー版であり、後のリリースで変更されることがあります。 空白のトピックは、プレースホルダーとして挿入されています。]

16.16 の固定小数点数を表します。

名前空間:  Microsoft.WindowsMobile.DirectX.Direct3D
アセンブリ:  Microsoft.WindowsMobile.DirectX (Microsoft.WindowsMobile.DirectX.dll 内)

構文

'宣言
Public Structure FixedPoint _
    Implements IComparable, IFormattable, IConvertible
'使用
Dim instance As FixedPoint
public struct FixedPoint : IComparable, 
    IFormattable, IConvertible
public value class FixedPoint : IComparable, 
    IFormattable, IConvertible
[<SealedAttribute>]
type FixedPoint =  
    struct
        interface IComparable
        interface IFormattable
        interface IConvertible
    end

解説

この構造体は、固定小数点のインターフェイスを持つ 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 dataDim i AsIntegerFor i = 0 To numberTrees - 1
    Dim t AsNew Tree()
    ' Position the trees randomlyDoDim fTheta AsSingle = 2.0F * _
            System.Convert.ToSingle(Math.PI) * _
            System.Convert.ToSingle(randObj.NextDouble())
        Dim fRadius AsSingle = 25.0F + 55.0F * _
            System.Convert.ToSingle(randObj.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
    LoopWhileNot 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 datafor (int i=0; i<numberTrees; i++)
        {
            Tree t = new Tree();


do
{
    float fTheta  = 2.0f * (float)Math.PI *
        (float)randObj.NextDouble();
    float fRadius = 25.0f + 55.0f * (float)randObj.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));

スレッド セーフ

この型のすべてのパブリック static (Visual Basic では Shared) メンバーは、スレッド セーフです。 インスタンス メンバーの場合は、スレッド セーフであるとは限りません。

プラットフォーム

Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。 サポートされているバージョンについては、「.NET フレームワークのシステム要件」を参照してください。

バージョン情報

.NET Compact Framework

サポート対象 : 3.5、2.0

参照

参照

FixedPoint メンバー

Microsoft.WindowsMobile.DirectX.Direct3D 名前空間

その他の技術情報

.NET Compact Framework でモバイル Direct3D プログラミング