Compartir a través de


ColorValueFixed (Estructura)

Actualización: noviembre 2007

Almacena los valores de canal rojo, verde, azul y alfa que, juntos, en una estructura de punto fijo, definen un color específico.

Espacio de nombres:  Microsoft.WindowsMobile.DirectX.Direct3D
Ensamblado:  Microsoft.WindowsMobile.DirectX (en Microsoft.WindowsMobile.DirectX.dll)

Sintaxis

'Declaración
Public Structure ColorValueFixed
'Uso
Dim instance As ColorValueFixed
public struct ColorValueFixed
public value class ColorValueFixed
JScript admite el uso de estructuras, pero no admite la declaración de estructuras nuevas.

Ejemplos

En el ejemplo de código siguiente se muestra cómo se utiliza una estructura 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.

Seguridad para subprocesos

Todos los miembros static (Shared en Visual Basic) públicos de este tipo son seguros para la ejecución de subprocesos. No se garantiza que los miembros de instancias sean seguros para la ejecución de subprocesos.

Plataformas

Windows CE, Windows Mobile para Smartphone, Windows Mobile para Pocket PC

.NET Framework y .NET Compact Framework no admiten todas las versiones de cada plataforma. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.

Información de versión

.NET Compact Framework

Compatible con: 3.5, 2.0

Vea también

Referencia

ColorValueFixed (Miembros)

Microsoft.WindowsMobile.DirectX.Direct3D (Espacio de nombres)

Otros recursos

Programar Mobile Direct3D en .NET Compact Framework