LightFixed クラス
アセンブリ: Microsoft.WindowsMobile.DirectX (microsoft.windowsmobile.directx.dll 内)



LightFixed 構造体を使用する方法を次のコード例に示します。
' This code example is from the ' Direct3D Mobile Fixed Point Lighting Sample ' of the .NET Compact Framework Samples ' in the .NET Framework SDK. ' The FrameMove method is called once per frame, ' and is the entry point for animating the scene. Public Sub FrameMove() lightData = device.LightsFixed(2) ' Rotate through the various light types If Fix(appTime) Mod 20 < 10 Then device.LightsFixed(2).Type = LightType.Point Else device.LightsFixed(2).Type = LightType.Directional End If ' Make sure the light type is supported by the device. If ' VertexProcessingCaps.PositionAllLights is not set, the device ' does not support point or spot lights, so change light #2's ' type to a directional light. If Not _ device.DeviceCaps.VertexProcessingCaps.SupportsPositionalLights _ Then If device.LightsFixed(2).Type = LightType.Point Then device.LightsFixed(2).Type = LightType.Directional End If End If ' Values for the light position, direction, and color Dim x As Single = System.Convert.ToSingle(Math.Sin(appTime * 2.0F)) Dim y As Single = System.Convert.ToSingle( _ Math.Sin(appTime * 2.246F)) Dim z As Single = System.Convert.ToSingle( _ Math.Sin(appTime * 2.64F)) Dim r As Byte = System.Convert.ToByte((0.5F + 0.5F * x) * &HFF) Dim g As Byte = System.Convert.ToByte((0.5F + 0.5F * y) * &HFF) Dim b As Byte = System.Convert.ToByte((0.5F + 0.5F * z) * &HFF) device.LightsFixed(2).DiffuseColor = _ ColorValueFixed.FromColor( _ System.Drawing.Color.FromArgb(r, g, b)) device.LightsFixed(2).Range = 100.0F Select Case device.LightsFixed(2).Type Case LightType.Point device.LightsFixed(2).Position = _ New Vector3Fixed(4.5F * x, 4.5F * y, 4.5F * z) device.LightsFixed(2).Attenuation1 = 0.4F Case LightType.Directional device.LightsFixed(2).Direction = _ New Vector3Fixed(x, y, z) End Select device.LightsFixed(2).Update() End Sub
// This code example is from the // Direct3D Mobile Fixed Point Lighting Sample // of the .NET Compact Framework Samples // in the .NET Framework SDK. // The FrameMove method is called once per frame, // and is the entry point for animating the scene. public void FrameMove() { lightData = device.LightsFixed[2]; // Rotate through the various light types if (((int)appTime % 20) < 10) device.LightsFixed[2].Type = LightType.Point; else device.LightsFixed[2].Type = LightType.Directional; // Make sure the light type is supported by the device. If // VertexProcessingCaps.PositionAllLights is not set, the // device does not support point or spot lights, so change // light #2's type to a directional light. if (!device.DeviceCaps.VertexProcessingCaps.SupportsPositionalLights) { if (device.LightsFixed[2].Type == LightType.Point) device.LightsFixed[2].Type = LightType.Directional; } // Values for the light position, direction, and color float x = (float)Math.Sin(appTime*2.000f); float y = (float)Math.Sin(appTime*2.246f); float z = (float)Math.Sin(appTime*2.640f); byte r = (byte)((0.5f + 0.5f * x) * 0xff); byte g = (byte)((0.5f + 0.5f * y) * 0xff); byte b = (byte)((0.5f + 0.5f * z) * 0xff); device.LightsFixed[2].DiffuseColor = ColorValueFixed.FromColor(System.Drawing.Color.FromArgb(r, g, b)); device.LightsFixed[2].Range = 100.0f; switch(device.LightsFixed[2].Type) { case LightType.Point: device.LightsFixed[2].Position = new Vector3Fixed(4.5f * x, 4.5f * y, 4.5f * z); device.LightsFixed[2].Attenuation1 = 0.4f; break; case LightType.Directional: device.LightsFixed[2].Direction = new Vector3Fixed(x, y, z); break; } device.LightsFixed[2].Update(); }

Microsoft.WindowsMobile.DirectX.Direct3D.BaseMesh
Microsoft.WindowsMobile.DirectX.Direct3D.LightFixed


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


LightFixed コンストラクタ
アセンブリ: Microsoft.WindowsMobile.DirectX (microsoft.windowsmobile.directx.dll 内)



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


LightFixed プロパティ
LightFixed メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | FromLightFixed | 既存のライトに基づいて新しいライトを作成します。 |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |
![]() | Update | 現在の Light オブジェクトの設定を更新します。 |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

LightFixed メンバ
一連のライト プロパティを表します。このクラスは継承できません。
LightFixed データ型で公開されるメンバを以下の表に示します。



名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | FromLightFixed | 既存のライトに基づいて新しいライトを作成します。 |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |
![]() | Update | 現在の Light オブジェクトの設定を更新します。 |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

- LightFixedのページへのリンク