FixedPoint-Struktur
Dieser Dokumentation für die Vorschau nur ist und in späteren Versionen geändert. Leere Themen wurden als Platzhalter eingefügt.]
Stellt eine 16.16 Festkomma Zahl dar.
Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)
Syntax
'Declaration
Public Structure FixedPoint _
Implements IComparable, IFormattable, IConvertible
'Usage
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
Hinweise
Diese Struktur wird für die Zusammenarbeit mit den verschiedenen Typen in Windows Mobile-Beschleunigung, die mit Festkomma Schnittstellen verwendet.Die interne Darstellung dieser Klasse ist eine Struktur Int32.
Beispiele
Das folgende Beispiel veranschaulicht die Verwendung einer Struktur 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));
Threadsicherheit
Alle öffentlichen static (Shared in Visual Basic)-Member dieses Typs sind threadsicher. Bei Instanzmembern ist die Threadsicherheit nicht gewährleistet.
Plattformen
Windows CE, Windows Mobile für Smartphone, Windows Mobile für Pocket PC
Die .NET Framework und .NET Compact Framework unterstützen nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET framework.
Versionsinformationen
.NET Compact Framework
Unterstützt in: 3.5, 2.0
Siehe auch
Referenz
Microsoft.WindowsMobile.DirectX.Direct3D-Namespace