Methods
Vector2 ir dubultas precizitātes 2-komponentu vektors ar x un y komponentes. Tas galvenokārt tiek izmantots UV tekstūras koordinātām un 2D aprēķiniem.
Methods: com.aspose.threed
Methods
| Methods | Methods |
|---|
Vector2() | Izveido nulles vektoru (0, 0) |
Vector2(double x, double y) | Izveido no divām komponentēm |
Vector2(Vector2 other) | Kopijas konstruktoru |
Publiskie lauki
Vector2 izmanto publiskos laukus komponentu piekļuvei (nevis getter/setter metodes):
| Methods | Methods | Methods | Methods |
|---|
x | double | v.x | X komponente |
y | double | v.y | Y komponente |
Aprēķinātās īpašības
| Methods | Methods | Methods | Methods |
|---|
length | double | getLength() | Eiklīda garums, tikai lasāms |
length2 | double | getLength2() | Kvadrātveida garums, tikai lasāms |
Methods
| Methods | Atgriešanas tips | Methods |
|---|
dot(Vector2 rhs) | double | Skalarprodukts ar citu Vector2 |
normalize() | Vector2 | Atgriež vienības garuma kopiju |
set(double x, double y) | void | Iestata abus komponentus uz vietas |
compareTo(Vector2 other) | int | Leksikogrāfiska salīdzināšana: atgriež -1, 0 vai 1 |
Methods
Skatīt arī