Enumerations
Vector2 è un vettore a doppia precisione a 2 componenti con x e y componenti. È principalmente usato per le coordinate di texture UV e per calcoli 2D.
Enumerations: com.aspose.threed
Enumerations
| Enumerations | Enumerations |
|---|
Vector2() | Costruisce il vettore zero (0, 0) |
Vector2(double x, double y) | Costruisce da due componenti |
Vector2(Vector2 other) | Costruttore di copia |
Campi Pubblici
Vector2 usa campi pubblici per l’accesso ai componenti (non metodi getter/setter):
| Enumerations | Enumerations | Enumerations | Enumerations |
|---|
x | double | v.x | componente X |
y | double | v.y | componente Y |
Proprietà Calcolate
| Enumerations | Enumerations | Enumerations | Enumerations |
|---|
length | double | getLength() | lunghezza euclidea, sola lettura |
length2 | double | getLength2() | lunghezza al quadrato, sola lettura |
Enumerations
| Enumerations | Tipo di ritorno | Enumerations |
|---|
dot(Vector2 rhs) | double | Prodotto scalare con un altro Vector2 |
normalize() | Vector2 | Restituisce una copia di lunghezza unitaria |
set(double x, double y) | void | Imposta entrambi i componenti al loro posto |
compareTo(Vector2 other) | int | Confronto lessicografico: restituisce -1, 0 o 1 |
Enumerations
Vedi anche