Condividi tramite


Struttura Vector3

Aggiornamento: novembre 2007

Descrive e modifica un vettore nello spazio tridimensionale (3D).

Spazio dei nomi:  Microsoft.WindowsMobile.DirectX
Assembly:  Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)

Sintassi

'Dichiarazione
Public Structure Vector3
'Utilizzo
Dim instance As Vector3
public struct Vector3
public value class Vector3
JScript supporta l'utilizzo di strutture ma non la dichiarazione di nuove.

Esempi

Nell'esempio riportato di seguito viene illustrato come utilizzare una struttura Vector3. Questo esempio è tratto dall'Esempio Direct3D Mobile Matrices contenuto in Windows Software Development Kit (SDK).

' Set up the view matrix. A view matrix can be defined given an eye point,
' a point to lookat, and a direction indicating which way is up. Here, you set
' the eye five units back along the z-axis and up three units, look at the
' origin, and define "up" to be in the y-direction.
device.Transform.View = Matrix.LookAtLH(New Vector3(0.0F, 3.0F, -5.0F), New Vector3(0.0F, 0.0F, 0.0F), New Vector3(0.0F, 1.0F, 0.0F))
// Set up the view matrix. A view matrix can be defined given an eye point,
// a point to look at, and a direction indicating which way is up. Here, you set
// the eye five units back along the z-axis and up three units, look at the
// origin, and define "up" to be in the y-direction.
device.Transform.View = Matrix.LookAtLH(new Vector3(0.0f, 3.0f, -5.0f), new Vector3(0.0f, 0.0f, 0.0f), new Vector3(0.0f, 1.0f, 0.0f));

Codice thread safe

Qualsiasi membro static (Shared in Visual Basic) pubblico di questo tipo è thread-safe. I membri di istanza non sono garantiti come thread-safe.

Piattaforme

Windows CE, Windows Mobile per Smartphone, Windows Mobile per Pocket PC

.NET Framework e .NET Compact Framework non supportano tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.

Informazioni sulla versione

.NET Compact Framework

Supportato in: 3.5, 2.0

Vedere anche

Riferimenti

Membri Vector3

Spazio dei nomi Microsoft.WindowsMobile.DirectX

Altre risorse

Programmazione per Mobile Direct3D in .NET Compact Framework