Share via


ColorValueFixed 構造体

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

固定小数点構造体の、特定の色を共に定義する赤、緑、青、およびアルファ チャネル値を格納します。

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

構文

'宣言
Public Structure ColorValueFixed
'使用
Dim instance As ColorValueFixed
public struct ColorValueFixed
public value class ColorValueFixed
[<SealedAttribute>]
type ColorValueFixed =  struct end

ColorValueFixed 構造体を使用する方法を次のコード例に示します。

' This code example is taken from the' Managed Direct3D Mobile Fixed-Point Lighting Sample' of the .NET Compact Framework Samples in the SDK.
' Set light #0 to be a simple, faint grey directional light so' the walls and floor are slightly different shades of grey
device.LightsFixed(0).Type = LightType.Directional
device.LightsFixed(0).Direction = New Vector3Fixed(0.3F, -0.5F, 0.2F)
device.LightsFixed(0).Update()
' Set light #1 to be a simple, bright directional light to use' on the mesh representing light #2
device.LightsFixed(1).Type = LightType.Directional
device.LightsFixed(1).Direction = New Vector3Fixed(0.5F, -0.5F, 0.5F)
device.LightsFixed(1).DiffuseColor = ColorValueFixed.FromColor(System.Drawing.Color.Blue)
device.LightsFixed(1).Update()

' Light #2 will be the light used to light the floor and' walls.  It will be set up in FrameMove() since it changes' every frame.
// This code example is taken from the// Managed Direct3D Mobile Fixed-Point Lighting Sample// in the .NET Compact Framework Samples in the SDK.// Set light #0 to be a simple, faint grey directional light so// the walls and floor are slightly different shades of grey
device.LightsFixed[0].Type = LightType.Directional;
device.LightsFixed[0].Direction = new Vector3Fixed(0.3f, -0.5f,
    0.2f);
device.LightsFixed[0].DiffuseColor =
    ColorValueFixed.FromColor(System.Drawing.Color.FromArgb(64,
    64, 64));
device.LightsFixed[0].Update();
        // Set light #1 to be a simple, bright directional light to use// on the mesh representing light #2
        device.LightsFixed[1].Type = LightType.Directional;
        device.LightsFixed[1].Direction =
            new Vector3Fixed(0.5f, -0.5f, 0.5f);
        device.LightsFixed[1].DiffuseColor =
            ColorValueFixed.FromColor((System.Drawing.Color.Blue));
        device.LightsFixed[1].Update();

        // Light #2 will be the light used to light the floor and// walls.  It will be set up in FrameMove() since it changes// every frame.

スレッド セーフ

この型のすべてのパブリック 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

参照

参照

ColorValueFixed メンバー

Microsoft.WindowsMobile.DirectX.Direct3D 名前空間

その他の技術情報

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