FixedPoint Structure
.NET Framework 3.0
Represents a 16.16 fixed-point number.
Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in microsoft.windowsmobile.directx.dll)
Microsoft.WindowsMobile.DirectX.Direct3D Namespace
Assembly: Microsoft.WindowsMobile.DirectX (in microsoft.windowsmobile.directx.dll)
This structure is used to interoperate with the various types in Windows Mobile Direct 3D that have fixed-point interfaces. The internal representation of this class is an Int32 structure.
The following example shows how you can use a FixedPoint structure.
// 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));
Reference
FixedPoint MembersMicrosoft.WindowsMobile.DirectX.Direct3D Namespace
Other Resources
Direct3D ProgrammingCommunity Additions
ADD
Show: