FixedPoint 構造体とは? わかりやすく解説

FixedPoint 構造体

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

名前空間: Microsoft.WindowsMobile.DirectX.Direct3D
アセンブリ: Microsoft.WindowsMobile.DirectX (microsoft.windowsmobile.directx.dll 内)
構文構文

Public Structure FixedPoint
    Implements IComparable, IFormattable, IConvertible
public struct FixedPoint : IComparable, IFormattable, IConvertible
public value class FixedPoint : IComparable,
 IFormattable, IConvertible
public final class FixedPoint extends ValueType
 implements IComparable, IFormattable, 
    IConvertible
JScript では、構造体使用できますが、新規に宣言することはできません。
解説解説
使用例使用例

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));
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「FixedPoint 構造体」の関連用語

FixedPoint 構造体のお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



FixedPoint 構造体のページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS